24 lines
418 B
C
24 lines
418 B
C
#ifndef __CAN2_H
|
|
#define __CAN2_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#include "stm32f4xx_hal.h"
|
|
#include "remote.h"
|
|
// CAN数据包结构
|
|
typedef struct {
|
|
uint8_t data[8];
|
|
} can_packet_t;
|
|
|
|
// 函数声明
|
|
void rc_can_init(void);
|
|
void send_rc_data(const rc_info_t *rc);
|
|
void pack_rc_to_can(const rc_info_t *rc, can_packet_t *packet1, can_packet_t *packet2);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __CAN2_H */
|