stm32-rs / stm32g0xx-hal

Peripheral access API for STM32G0 series microcontrollers
Apache License 2.0
73 stars 51 forks source link

Initial implementation of driver enable. #106

Closed justinlatimer closed 2 years ago

justinlatimer commented 2 years ago

I've implemented Driver Enable pins for the USART abstraction. Tested with RS485 hardware on an STM32G030. Happy for feedback. Thanks!

andresv commented 2 years ago

Thanks for the PR. CI fails at the moment, could you run cargo fmt.

justinlatimer commented 2 years ago

Formatting updated!

andresv commented 2 years ago

Could you also add rs485 example.

justinlatimer commented 2 years ago

I've added an example of using the usart_with_driver_enable() function.

andresv commented 2 years ago

@dotcypress do you have any objections?

dotcypress commented 2 years ago

@justinlatimer thank you for your help!

I'm not happy with paste! macro. Maybe we can implement this feature without macro hell. I will take a deep look into it a bit later this week.

justinlatimer commented 2 years ago

Superseded by #109