1 /*
2  * Copyright 2022-2023 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 	Linflexd_Uart_Ip_UserConfigType hw_cfg;
15 };
16 
17 #ifdef CONFIG_UART_INTERRUPT_DRIVEN
18 struct uart_nxp_s32_int {
19 	bool tx_fifo_busy;
20 	bool rx_fifo_busy;
21 	bool irq_tx_enable;
22 	bool irq_rx_enable;
23 	uint8_t rx_fifo_data;
24 };
25 #endif
26 
27 #ifdef CONFIG_UART_INTERRUPT_DRIVEN
28 struct uart_nxp_s32_data {
29 	struct uart_nxp_s32_int int_data;
30 	uart_irq_callback_user_data_t callback;
31 	void *cb_data;
32 };
33 #endif /* CONFIG_UART_INTERRUPT_DRIVEN */
34 
35 extern Linflexd_Uart_Ip_StateStructureType
36 Linflexd_Uart_Ip_apStateStructure[LINFLEXD_UART_IP_NUMBER_OF_INSTANCES];
37 
38 #endif /* ZEPHYR_DRIVERS_SERIAL_UART_S32_LINFLEXD_H_ */
39