2022-12-05 15:59:47 +08:00
|
|
|
/*
|
2022-12-05 21:01:26 +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
|
2022-12-05 21:01:26 +08:00
|
|
|
#define SUPER_CAP_H
|
2022-12-05 15:59:47 +08:00
|
|
|
|
|
|
|
#include "bsp_can.h"
|
|
|
|
|
2022-12-05 21:01:26 +08:00
|
|
|
typedef struct
|
2022-12-05 15:59:47 +08:00
|
|
|
{
|
|
|
|
uint16_t vol;
|
|
|
|
uint16_t current;
|
|
|
|
uint16_t power;
|
2022-12-05 21:01:26 +08:00
|
|
|
} SuperCap_Msg_s;
|
2022-12-05 15:59:47 +08:00
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
typedef struct
|
|
|
|
{
|
2022-12-05 21:01:26 +08:00
|
|
|
CANInstance *can_ins;
|
2022-12-05 15:59:47 +08:00
|
|
|
SuperCap_Msg_s cap_msg;
|
|
|
|
} SuperCapInstance;
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2022-12-05 21:01:26 +08:00
|
|
|
CAN_Init_Config_s can_config;
|
2022-12-05 15:59:47 +08:00
|
|
|
} SuperCap_Init_Config_s;
|
|
|
|
|
2022-12-05 21:01:26 +08:00
|
|
|
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
|