stm32-rs / stm32g0xx-hal

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

UART pins & RS485 #109

Closed dotcypress closed 2 years ago

dotcypress commented 2 years ago

Since we already have breaking changes with #102 we can safely change UART pins interface. This PR contains new serial ping configuration method(same as SPI have) and support for RS485. Also this change introduce new modes(TxOnly/RxOnly) and give an easy way to implement Half-Duplex mode(#70).

@justinlatimer could you please check uart_rs485 example on actual hardware, cause this PR contains your implementation from #106 and I want to be sure I didn't miss anything.

justinlatimer commented 2 years ago

I've integrated this branch and tested it on actual hardware (STM32G030F6) and can confirm it works. Thanks @dotcypress!

dotcypress commented 2 years ago

@justinlatimer thank you 🚀