Files
1CAR/interface_uart.h

158 lines
1.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _INTERFACE_UART_H_
#define _INTERFACE_UART_H_
#include "interface_config.h"
#include <sdrv_uart.h>
#define ZERO_VALUE 1022//根据遥控器回0时数据为1022
#define remote_speed un_remote_control_input.bit_data.speed//速度
#define remote_curvature un_remote_control_input.bit_data.curvature//转弯
#define remote_Reserve un_remote_control_input.bit_data.reserve1//保留
#define emergency_stop un_remote_control_input.bit_data.switch_a//DF_SwA
#define remote_switch_b un_remote_control_input.bit_data.switch_b//DF_SwB
#define remote_switch_c un_remote_control_input.bit_data.switch_c//DF_SwC
#define remote_switch_d un_remote_control_input.bit_data.switch_d//DF_SwD
#define remote_enable un_remote_control_input.bit_data.enable//手柄使能状态
typedef struct
{
uint16_t remote_count; //遥控计数器
uint8_t remote_state; //遥控状态
}UartFaultInfo;
void uart_Initialize(void);
void callback(sdrv_uart_t *ctrl, sdrv_uart_callback_status_e status,
void *userData);
#endif /* _INTERFACE_H_ */