#ifndef _BSP_CAN_H
#define _BSP_CAN_H


#include "bsp.h"
#include "usart.h"


#define SBUS_RX_BUF_NUM 50u
#define RC_FRAME_LENGTH 25u

typedef enum {
  BSP_UART_REMOTE,
  BSP_UART_RS485,
  BSP_UART_NUC,
	BSP_UART_VOFA,
  /* BSP_UART_XXX, */
  BSP_UART_NUM,
  BSP_UART_ERR,
} BSP_UART_t;



typedef enum {
  BSP_UART_TX_HALF_CPLT_CB,
  BSP_UART_TX_CPLT_CB,
  BSP_UART_RX_HALF_CPLT_CB,
  BSP_UART_RX_CPLT_CB,
  BSP_UART_ERROR_CB,
  BSP_UART_ABORT_CPLT_CB,
  BSP_UART_ABORT_TX_CPLT_CB,
  BSP_UART_ABORT_RX_CPLT_CB,

  BSP_UART_IDLE_LINE_CB,
  BSP_UART_CB_NUM,
} BSP_UART_Callback_t;

/* Exported functions prototypes -------------------------------------------- */
void UART_IdleIRQHandler(UART_HandleTypeDef *huart);
UART_HandleTypeDef *BSP_UART_GetHandle(BSP_UART_t uart);
int8_t BSP_UART_RegisterCallback(BSP_UART_t uart, BSP_UART_Callback_t type,
                                 void (*callback)(void));







#endif

