David-OConnor / stm32-hal

This library provides access to STM32 peripherals in Rust.
MIT License
147 stars 44 forks source link

Added Sawtooth waveform generator to DAC, and refactored COMP #92

Closed boondocklabs closed 9 months ago

boondocklabs commented 9 months ago

Please review and provide any suggestions.

DAC Sawtooth generation was added to the DAC module, as well as a standalone example app that works on a Nucleo G474RE board. I have also tested with HRTIM as the set/reset event sources.

I refactored the comparator module to use PAC accessors rather than direct bit manipulation and generics using CxCSR type aliases, but it would have some breaking API changes and is targeting G474 with 7 comparators.

David-OConnor commented 9 months ago

Great stuff! Love the additions for DAC and COMP/G4, and the refactor.