main.c 639 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "ac780x.h"
  2. #include "timer.h"
  3. #include "gpio.h"
  4. #include "cfg.h"
  5. #include "IAP.h"
  6. #include "process.h"
  7. #include "main_task.h"
  8. #include "watchdog.h"
  9. /*!
  10. * @brief entry
  11. *
  12. * @param[in] none
  13. * @return none
  14. */
  15. int main(void)
  16. {
  17. #ifndef IS_BOOTLOADER
  18. __ASM("CPSIE I");///使能全局中断
  19. SCB->VTOR = APP1_ADDRESS; ///<重映射向量表
  20. #endif
  21. InitDelay();
  22. Config_Init();
  23. Watchdog_Init();
  24. #ifdef IS_BOOTLOADER
  25. Start_BootLoader();
  26. #endif
  27. GPIO_PortInit();
  28. IAP_Init();
  29. Process_Init();
  30. TIMER_PrdInit();
  31. Task_Init();
  32. while (1)
  33. {
  34. Watchdog_Feed();
  35. Task_Handle();
  36. }
  37. }