pl011: Fix baud divisor (correctly this time)
* Order of operations error, seen after writing a quick test app.. sorry for spam
This commit is contained in:
parent
96ca76504f
commit
b0df02004f
@ -79,8 +79,8 @@ UartPL011::InitPort(uint32 baud)
|
||||
// Calculate baud divisor
|
||||
uint32 baudDivisor = BOARD_UART_CLOCK / (16 * baud);
|
||||
uint32 remainder = BOARD_UART_CLOCK % (16 * baud);
|
||||
uint32 baudFractional = ((8 * remainder) / baud) >> 1
|
||||
+ ((8 * remainder) / baud) & 1;
|
||||
uint32 baudFractional = ((8 * remainder) / BAUD >> 1)
|
||||
+ ((8 * remainder) / BAUD & 1);
|
||||
|
||||
// Disable UART
|
||||
Disable();
|
||||
|
Loading…
Reference in New Issue
Block a user