stm32-rs / stm32f4xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F4 family
BSD Zero Clause License
572 stars 212 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 5 months ago

@llamington Did you ever make any progress on this?

llamington commented 5 months ago

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

bluespider42 commented 5 months ago

embassy-stm32 hal has a half-duplex uart.

bluespider42 commented 4 weeks ago

PR currently in draft https://github.com/stm32-rs/stm32f4xx-hal/pull/781