2016-03-03 22:33:20 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Open-RnD Sp. z o.o.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-03-03 22:33:20 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2016-11-18 00:00:49 +08:00
|
|
|
* @brief Driver for UART port on STM32 family processor.
|
2016-03-03 22:33:20 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _STM32_UART_H_
|
|
|
|
#define _STM32_UART_H_
|
|
|
|
|
|
|
|
/* device config */
|
|
|
|
struct uart_stm32_config {
|
|
|
|
struct uart_device_config uconf;
|
|
|
|
/* clock subsystem driving this peripheral */
|
2017-01-24 00:55:57 +08:00
|
|
|
struct stm32_pclken pclken;
|
2018-04-11 20:21:16 +08:00
|
|
|
/* Baud rate */
|
|
|
|
u32_t baud_rate;
|
2016-03-03 22:33:20 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* driver data */
|
|
|
|
struct uart_stm32_data {
|
|
|
|
/* clock device */
|
|
|
|
struct device *clock;
|
2016-03-14 02:37:25 +08:00
|
|
|
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
2018-07-17 02:12:26 +08:00
|
|
|
uart_irq_callback_user_data_t user_cb;
|
|
|
|
void *user_data;
|
2016-03-14 02:37:25 +08:00
|
|
|
#endif
|
2016-03-03 22:33:20 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _STM32_UART_H_ */
|