stm32f4xx-hal icon indicating copy to clipboard operation
stm32f4xx-hal copied to clipboard

Allow for changing serial baud rate after creation

Open iMobs opened this issue 3 years ago • 2 comments

My use case is to allow devices to negotiate a higher baud rate from an initial default. Currently, the speed gets set when creating a new Serial (or Rx/Tx). There isn't another way to change the speed afterward besides releasing and recreating the connection or manually changing the baud rate register. Would it make sense to move the setting of the baud rate from the new function to a separate public function that can be called on its own?

iMobs avatar Jul 08 '22 16:07 iMobs

Another more esoteric use is changing the baud rate to send the 100μs break before data of DMX512.

iMobs avatar Jul 08 '22 17:07 iMobs

It would be nice if you make PR. See f1xx-hal for example

burrbull avatar Jul 19 '22 18:07 burrbull