stm32-rs / stm32f4xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F4 family
BSD Zero Clause License
550 stars 208 forks source link

Support half-duplex serial #592

Open llamington opened 1 year ago

llamington commented 1 year ago

Currently the serial function requires a tuple of RX/TX pins. The reference manual states that "the TX and RX lines are internally connected", so only one pin would be required as an argument.

burrbull commented 1 year ago

You mean both read and write on TX line?

llamington commented 1 year ago

Yes that's correct

burrbull commented 1 year ago

Not implemented yet.

It's better to create independent SerialHalfDuplex structure for this with new::(pin: TX) and its own methods. As I understand it will be semantically incompatible with read/write from embedded-hal.

bluespider42 commented 3 months ago

@llamington Did you ever make any progress on this?

llamington commented 3 months ago

@bluespider42 no, unfortunately I didn't (I ended up using the STM32HAL library in C)

bluespider42 commented 3 months ago

embassy-stm32 hal has a half-duplex uart.