lm4f/uart: Implemented a function to get the current stop bits setting for a UART

This commit is contained in:
dragonmux
2022-08-23 03:14:45 +01:00
committed by Piotr Esden-Tempski
parent 78ace36308
commit f0262cb4a9
2 changed files with 8 additions and 0 deletions

View File

@@ -172,6 +172,13 @@ void uart_set_stopbits(uint32_t uart, uint8_t stopbits)
}
}
uint8_t uart_get_stopbits(uint32_t uart)
{
if (UART_LCRH(uart) & UART_LCRH_STP2)
return 2;
return 1;
}
/**
* \brief Set UART parity
*