1234567891011121314151617181920 |
- #include "global.h"
- #include "led.h"
- u8 boot_goto_app(u32 addr)
- {
- pFunction Jump_To_Application;
- __IO u32 JumpAddress;
- LED_RUN_OFF();
- CAN_DeInit(CAN1);
- if (((*(__IO u32 *)addr) & 0x2FFE0000) == 0x20000000)
- {
- JumpAddress = *(__IO u32 *)(addr + 4);
- Jump_To_Application = (pFunction)JumpAddress;
- __set_MSP(*(__IO u32 *)addr);
- Jump_To_Application();
- }
- return 1;
- }
|