Embedded C - Too many arguments to function (pointer)

前端 未结 4 679
刺人心
刺人心 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:30

    You can also do it with macros only:

    #define IAP_ROM_LOCATION        0x1FFF1FF1UL
    #define IAP_FUNC_SIGNATURE      void (*)(int, int)
    #define IAP_EXECUTE_CMD(a, b)   ((IAP_FUNC_SIGNATURE)(IAP_ROM_LOCATION))((a), (b))
    

提交回复
热议问题