/*
 * hal_adapter.h
 *
 *  Created on: 2022Äê1ÔÂ18ÈÕ
 *      Author: QiXiang_CHENJIE
 */

#ifndef HAL_ADAPTER_H_
#define HAL_ADAPTER_H_


#include "Mcal.h"
#include "CAN.h"
#include "SchM_Can.h"
#include "Mcu.h"
#include "Mcl.h"
#include "Port.h"
#include "Dio.h"
#include "Uart.h"
#include "Platform.h"
#include "Lpuart_Uart_Ip_Irq.h"
#include "Flexio_Uart_Ip_Irq.h"
#include <string.h>
#include <stdlib.h>
#include "Dma_Ip.h"
#include "Dma_Ip_Irq.h"
#include "Lpuart_Uart_Ip.h"
#include "FreeRTOS.h"
#include "timers.h"
#include "task.h"
#include "semphr.h"
#define UART_LPUART0 0
#define UART_LPUART1 1
#define UART_LPUART2 2
#define FLEXIO_RX 3
#define FLEXIO_TX 4

#define AT_TEST "AT"
#define main_TASK_PRIORITY                ( tskIDLE_PRIORITY + 2 )

#define MSG_LEN 50U
#define TJA1153_START_ID (uint32_t)(0x555u)
#define TJA1153_CONFIG_ID (uint32_t)(0x18DA00F1u)

#define BUFFER_SIZE 500
#define DMA_SIZE 20
extern uint8_t RX_Buffer[UART_CH_MAX_CONFIG][BUFFER_SIZE];
Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 *rxBuffer, uint32 T_timeout);
Std_ReturnType UART_Send_Data(uint8 transChannel, const uint8 *txBuffer, uint32 sendLength, uint32 T_timeout);
uint32 UART_Receive_Data(uint8 recvChannel, uint8 *rxBuffer, uint32 T_timeout);
void UART_Callback(uint32 hwInstance, Lpuart_Uart_Ip_EventType event, void *userData);
#endif /* HAL_ADAPTER_H_ */
