Open dbrgn opened 4 years ago
IMO taking self
by value to work around limited HALs is not a good idea. HALs should consider implementing something like this API instead: https://github.com/stm32-rs/stm32l0xx-hal/pull/74
@jonas-schievink good call, I updated the proposal.
Okay, that wouldn't work with a nonblocking API I suppose
It seems like an embedded-hal driver cannot issue a USART break condition using only the embedded-hal serial trait, right?
Also, in Wikipedia: https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter#Break_condition
It seems that a HAL would have to reconfigure the pin as GPIO output pin, pull it low for a certain duration (depending on baudrate), then reconfigure it as serial pin again.
Would it make sense to add a
BreakCondition
trait to theserial
module?(Edit: Updated to take
&mut self
instead ofself
)