main.c 639 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "app_conf.h"
  2. #include "core_cmFunc.h"
  3. #include "dev_conf.h"
  4. #include "hal_can.h"
  5. #include "hal_conf.h"
  6. #include "misc.h"
  7. #define APP_FLASH_OFFSET 0x7000
  8. #define BOOT_EN 1
  9. int main(void)
  10. {
  11. #if (BOOT_EN == 1)
  12. NVIC_SetVectorTable(NVIC_VectTab_FLASH, APP_FLASH_OFFSET);
  13. __set_PRIMASK(0);
  14. #endif
  15. NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
  16. hal_systick_init();
  17. hal_gpio_init();
  18. // can_queue_init();
  19. dev_can_network_init();
  20. usart_config_init(&usart1_context, 115200);
  21. hal_i2c1_init();
  22. dev_key_button_init();
  23. while (1)
  24. {
  25. app_task_schdule();
  26. }
  27. return 0;
  28. }