123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include "app_task.h"
- #include "ble_core.h"
- #include "gpio.h"
- #include "i2c1.h"
- #include "iap.h"
- #include "key.h"
- #include "misc.h"
- #include "pwm.h"
- #include "systick.h"
- #include "uart4.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);
- systick_init();
- gpio_init();
- pwm_init(&pwm_timer3_content);
- pwm_mode(&pwm_timer3_content, 1);
- dev_can_network_init();
- usart_config_init(&usart1_context, 115200);
- usart_config_init(&usart2_context, 9600);
- usart_config_init(&usart3_context, 115200);
- uart4_init();
- ble_init();
- i2c1_init();
- key_button_init();
- set_firmver();
- iap_flag_release();
- iap_param_init();
- while (1)
- {
- app_task_schdule();
- }
- return 0;
- }
|