For readability, define a signature for the function to be called:
typedef void signature_t(int, int);
Then you can cast your ROM location
#define IAP_EXECUTE_CMD(a, b) ((signature_t*)IAP_ROM_LOCATION) ((a),(b))
and with a recent GCC (current version of GCC is 4.6) I would make that an inline function
static inline void iap_execute_cmd(int a, int b) {
((signature_t*)IAP_ROM_LOCATION) ((a),(b));
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…