49 lines
1.0 KiB
C
49 lines
1.0 KiB
C
#ifndef __REMOTE_H
|
|
#define __REMOTE_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "stm32f4xx_hal.h"
|
|
|
|
/* Private includes ----------------------------------------------------------*/
|
|
/* USER CODE BEGIN Includes */
|
|
#include "stm32f4xx_it.h"
|
|
#define DBUS_MAX_LEN (50)
|
|
#define DBUS_BUFLEN (18)
|
|
#define DBUS_HUART huart3
|
|
typedef __packed struct
|
|
{
|
|
int16_t ch0;
|
|
int16_t ch1;
|
|
int16_t ch2;
|
|
int16_t ch3;
|
|
int16_t roll;
|
|
uint8_t sw1;
|
|
uint8_t sw2;
|
|
} rc_info_t;//遥控器数据包
|
|
|
|
#define rc_Init \
|
|
{ \
|
|
0, \
|
|
0, \
|
|
0, \
|
|
0, \
|
|
0, \
|
|
0, \
|
|
0, \
|
|
}//遥控器初始化
|
|
extern void uart_receive_handler(UART_HandleTypeDef *huart);
|
|
extern void dbus_uart_init(void);
|
|
void rc_callback_handler(rc_info_t *rc, uint8_t *buff);
|
|
void can_filter_init(void);
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __REMOTE_H */
|