serial: stm32: Implement configure and config_get api calls

Implement these two new api calls. Allows on-the-fly configuration
adjustment of uarts.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
This commit is contained in:
Pushpal Sidhu 2019-01-07 13:52:24 -08:00 committed by Anas Nashif
commit acd0e25384
2 changed files with 338 additions and 51 deletions

View file

@ -17,12 +17,12 @@ struct uart_stm32_config {
struct uart_device_config uconf;
/* clock subsystem driving this peripheral */
struct stm32_pclken pclken;
/* Baud rate */
u32_t baud_rate;
};
/* driver data */
struct uart_stm32_data {
/* Baud rate */
u32_t baud_rate;
/* clock device */
struct device *clock;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN