This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CLA调用结构体,结构体中包含函数,如何定义不报错



定义Pwm_Off,,在CLA中调用报错,如何解决?

typedef struct {
dcdc_state DcdcState;
Uint32 Adress_cmp;
Uint32 Adress_On_off;
float32 Vbat;
float32 Vtem;
float32 Vpol;
float32 Current_Ch1;
float32 Current_Ch2;
float32 Current_Ch3;
float32 Current_Ch4;
float32 Current_all;
TFDLT2 TFD_Voltage;
TFDLT2 TFD_Current;
CALIBRATION Ad_Calibration[8];
float32 Ad_Point[8];
Uint16 DcdcRunCnt;
Uint16 DcdcRunOK;
CHANNEL_PARA Channel_para;
DCDC dcdc;
void (*Charge_On)(void);
void (*Discharge_On)(void);
void (*ChargeOrDischarge_Off)(void);
void (*Pwm_On)(void);
void (*Pwm_Off)(void);
} CNANNEL;

调用

switch (s->DcdcState)
{
case DCDC_STOP:
// if (sysctrl.Dcstate==1) s->DcdcState = DCDC_STANDBY;
if (s->Channel_para.DcdcRun) s->DcdcState = DCDC_BOOT;
s->Pwm_Off();
// s->ChargeOrDischarge_Off();
break;