mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Masked lower byte when writing to DLL.
This commit is contained in:
parent
286d80de7e
commit
d15be492cb
@ -35,7 +35,7 @@ void init_uart(uint32_t freq, uint32_t baud)
|
||||
|
||||
write_reg_u8(UART_IER, 0x00); // Disable all interrupts
|
||||
write_reg_u8(UART_LCR, 0x80); // Enable DLAB (set baud rate divisor)
|
||||
write_reg_u8(UART_DLL, divisor); // divisor (lo byte)
|
||||
write_reg_u8(UART_DLL, divisor & 0xFF); // divisor (lo byte)
|
||||
write_reg_u8(UART_DLM, (divisor >> 8) & 0xFF); // divisor (hi byte)
|
||||
write_reg_u8(UART_LCR, 0x03); // 8 bits, no parity, one stop bit
|
||||
write_reg_u8(UART_FCR, 0xC7); // Enable FIFO, clear them, with 14-byte threshold
|
||||
|
Loading…
Reference in New Issue
Block a user