0
#define IAP_LOCATION 0X1F00FFFF
int iap_program(unsigned int target_addr, unsigned int source_addr)
{
typedef void(*IAP)(unsigned int[], unsigned int[]);
IAP iap_entry;
iap_entry = (IAP) IAP_LOCATION;
command[0] = 50; // prepare the sector for write operation
command[1] = 7; // start sector no
command[2] = 7; // end sector no
iap_entry (command, result);
}
在上面的代碼我感到困惑的線IAP iap_entry; IAP是一個函數pointer.What不IAP iap_entry和iap_entry =(IAP)IAP_LOCATION;意思?質疑約指向一個函數
我習慣在下面
float funct(float num1, float num2)
{
return num1 * num2;
}
typedef float(*pt2Func)(float, float);
pt2Func *FnPtr = &funct;
float result = (*FnPtr)(2.0, 5.1);
}