Implement library functions to compute effective U(S)ART baudrate as counterparts to usart_set_baudrate().
This code is extracted from https://github.com/blackmagic-debug/blackmagic/pull/1864
TM4C seems to have an instance of ARM PrimeCell UART PL011. I cannot test my implementation as I don't have the hardware.
STM32F4 has USART v1 IP with OVER8 support (pending). The value in these functions is that they should handle OVER8 enabled/disabled differences in calculations. STM32F1 does not support OVER8 and can use this already. I remember testing on either bluepill or blackpill-f411ce, and I can test on these devices.
This is required for Blackmagic Debug Firmware to support reporting precise baud rates used in TraceSWO Async capture.