Embedded C - Too many arguments to function (pointer)

前端 未结 4 647
刺人心
刺人心 2020-12-19 11:57

I am trying to invoke the following macro in my .cpp file:

#define IAP_ROM_LOCATION                0x1FFF1FF1UL
#define IAP_EXECUTE_CMD(a, b)           ((voi         


        
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 12:32

    OK, my C is rather rusty, but it seems to me that your IAP_EXECUTE_CMD() macro is casting the unsigned long address as a pointer to a function which returns void and accepts zero arguments. Therefore, any arguments passed to the function call would be too many.

提交回复
热议问题