1234567891011121314151617181920212223242526272829303132333435363738 |
- #include "app_conf.h"
- #include "core_cmFunc.h"
- #include "dev_conf.h"
- #include "hal_can.h"
- #include "hal_conf.h"
- #include "misc.h"
- #define APP_FLASH_OFFSET 0x8000
- #define BOOT_EN 1
- int main(void)
- {
- #if (BOOT_EN == 1)
- NVIC_SetVectorTable(NVIC_VectTab_FLASH, APP_FLASH_OFFSET);
- __set_PRIMASK(0);
- #endif
- NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
- hal_systick_init();
- hal_gpio_init();
- // can_queue_init();
- dev_can_network_init();
- usart_config_init(&usart1_context, 115200);
- hal_i2c1_init();
- dev_key_button_init();
- set_firmver();
- iap_flag_release();
- iap_param_init();
- while (1)
- {
- app_task_schdule();
- }
- return 0;
- }
|