TI中文支持网
TI专业的中文技术问题搜集分享网站

28335编译警告 a value of type "void (*)(HALLTHETA__handle)" cannot be assigned to an entity of type "PINT”

函数HALL_THETA__Isr 在头文件#include "hall_theta.h"中声明:

typedef struct

{
……参数……
void (*isr)();
} HALL_THETA;

typedef HALL_THETA *HALLTHETA__handle;

void HALL_THETA__Isr(HALLTHETA__handle);

/****************************************************************/

hall_theta.c中定义

void HALL_THETA__Isr(HALL_THETA* p) 

{p->canshu1=p->canshu2;
p->canshu2=0;}

/***********************************************************/

头文件包含进了主程序

主函数中

EALLOW; 
PieVectTable. ECAP1_INT = &HALL_THETA__Isr;
PieVectTable. ECAP2_INT = &HALL_THETA__Isr;
PieVectTable. ECAP3_INT = &HALL_THETA__Isr;
EDIS;

这三句出现警告Description Resource Path Location Type

a value of type "void (*)(HALLTHETA__handle)" cannot be assigned to an entity of type "PINT" 

中断函数HALL_THETA__Isr是在头文件#include "hall_theta.h"中声明,hall_theta.c中定义,PieVectTable. ECAP1_INT = &HALL_THETA__Isr;这一局出现警告,请问该怎样解决呢?

谢谢各位老师。

赞(0)
未经允许不得转载:TI中文支持网 » 28335编译警告 a value of type "void (*)(HALLTHETA__handle)" cannot be assigned to an entity of type "PINT”
分享到: 更多 (0)