U32 downloadAddress = 0;

void main(void)
{

     void (*startp)(void);                                     //定义一个函数指针

     startp = (void (*)(void))downloadAddress;     //把一个32位的数转换成指针,且指针类型为函数指针。然后把这个指针付给; 前面定义好的函数指针

     (*startp)();   //用函数指针执行指定地址的代码

}

相关文章:

  • 2021-12-09
  • 2021-12-30
  • 2021-12-22
  • 2021-05-30
  • 2022-12-23
  • 2022-01-27
  • 2021-12-01
猜你喜欢
  • 2021-07-19
  • 2021-10-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-07-23
相关资源
相似解决方案