1 /*
2  * Copyright 2022 NXP
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_DRIVERS_SERIAL_UART_S32_LINFLEXD_H_
8 #define ZEPHYR_DRIVERS_SERIAL_UART_S32_LINFLEXD_H_
9 
10 struct uart_nxp_s32_config {
11 	uint32_t instance;
12 	LINFLEXD_Type *base;
13 	const struct pinctrl_dev_config *pincfg;
14 };
15 
16 #ifdef CONFIG_UART_INTERRUPT_DRIVEN
17 struct uart_nxp_s32_int {
18 	bool tx_fifo_busy;
19 	bool rx_fifo_busy;
20 	bool irq_tx_enable;
21 	bool irq_rx_enable;
22 	uint8_t rx_fifo_data;
23 };
24 #endif
25 
26 struct uart_nxp_s32_data {
27 	Linflexd_Uart_Ip_UserConfigType hw_cfg;
28 
29 #ifdef CONFIG_UART_INTERRUPT_DRIVEN
30 	struct uart_nxp_s32_int int_data;
31 	uart_irq_callback_user_data_t callback;
32 	void *cb_data;
33 #endif /* CONFIG_UART_INTERRUPT_DRIVEN */
34 
35 };
36 
37 extern Linflexd_Uart_Ip_StateStructureType
38 Linflexd_Uart_Ip_apStateStructure[LINFLEXD_UART_IP_NUMBER_OF_INSTANCES];
39 
40 #endif /* ZEPHYR_DRIVERS_SERIAL_UART_S32_LINFLEXD_H_ */
41