sentry_gimbal_hzz/modules/super_cap/super_cap.h

38 lines
646 B
C
Raw Normal View History

2022-12-05 15:59:47 +08:00
/*
* @Descripttion:
* @version:
2022-12-05 15:59:47 +08:00
* @Author: Chenfu
* @Date: 2022-12-02 21:32:47
* @LastEditTime: 2022-12-05 15:25:46
*/
#ifndef SUPER_CAP_H
#define SUPER_CAP_H
2022-12-05 15:59:47 +08:00
#include "bsp_can.h"
typedef struct
2022-12-05 15:59:47 +08:00
{
uint16_t vol;
uint16_t current;
uint16_t power;
} SuperCap_Msg_s;
2022-12-05 15:59:47 +08:00
#pragma pack(1)
typedef struct
{
CANInstance *can_ins;
2022-12-05 15:59:47 +08:00
SuperCap_Msg_s cap_msg;
} SuperCapInstance;
#pragma pack()
typedef struct
{
CAN_Init_Config_s can_config;
2022-12-05 15:59:47 +08:00
} SuperCap_Init_Config_s;
SuperCapInstance *SuperCapInit(SuperCap_Init_Config_s *supercap_config);
2022-12-05 15:59:47 +08:00
void SuperCapSend(SuperCapInstance *instance, uint8_t *data);
#endif // !SUPER_CAP_Hd