初始提交
This commit is contained in:
48
MDK-ARM/remote.h
Normal file
48
MDK-ARM/remote.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#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 */
|
||||
Reference in New Issue
Block a user