2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
#ifndef FM_CAPTURE_H_
|
|
|
|
#define FM_CAPTURE_H_
|
|
|
|
|
|
|
|
#include "arm_math.h"
|
|
|
|
|
2024-12-10 10:29:05 +00:00
|
|
|
#define indata16_size 10
|
|
|
|
#define IODataF_size 4
|
2024-12-07 09:52:46 +00:00
|
|
|
#pragma pack(push,4)
|
|
|
|
typedef struct _adcCapture
|
|
|
|
{
|
2024-12-10 10:29:05 +00:00
|
|
|
int16_t inData16[indata16_size];
|
|
|
|
uint32_t totalInData;
|
|
|
|
float32_t IODataF[IODataF_size];
|
2024-12-07 09:52:46 +00:00
|
|
|
int16_t outData;
|
|
|
|
}adcCapture;
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
2024-12-11 09:51:48 +00:00
|
|
|
// extern adcCapture WORK_VOLT_capture;
|
|
|
|
// extern adcCapture DSG_CURR_capture;
|
|
|
|
// extern adcCapture PV_VOLT_IN_capture;
|
|
|
|
// extern adcCapture CHG_CURR_capture;
|
2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
void ADC_Capture_Init(void);
|
2024-12-09 09:53:43 +00:00
|
|
|
void proportionalInt(int mode);
|
2025-01-08 09:50:37 +00:00
|
|
|
uint16_t setfirstStageProtectionValue(float curr);
|
2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
float get_CHG_CURR(void);
|
|
|
|
float get_PV_VOLT_OUT(void);
|
|
|
|
float get_DSG_CURR(void);
|
|
|
|
float get_PV1_VOLT_IN(void);
|
|
|
|
float get_PV_VOLT_IN1(void);
|
|
|
|
float get_MOSFET_Temper(void);
|
2025-01-21 10:02:52 +00:00
|
|
|
float get_EXCHG_CURR(void);
|
2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
void adcCaptureFir();
|
|
|
|
|
2024-12-26 03:48:54 +00:00
|
|
|
extern void setSoftShortCircuit(uint16_t disChargCurrAdcNum);
|
|
|
|
|
2025-01-17 12:32:22 +00:00
|
|
|
extern void chargControl(void);
|
|
|
|
|
2024-12-07 09:52:46 +00:00
|
|
|
#endif
|