28 lines
636 B
Plaintext
28 lines
636 B
Plaintext
/**
|
|||
|
|
* @file initial.cpp
|
||
|
|
* @brief 应用启动初始化实现。
|
||
|
|
*/
|
||
|
|
|
||
|
|
#include "initial.h"
|
||
|
|
|
||
|
|
#include "../device/canfd.h"
|
||
|
|
#include "../device/temp_sensor.h"
|
||
|
|
#include "../device/usart0.h"
|
||
|
|
#include "../device/Timer.h"
|
||
|
|
#include "systick.h"
|
||
|
|
#include "task_manager.h"
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief 执行应用启动所需的底层模块初始化。
|
||
|
|
* @note 初始化顺序:系统时基 → 串口 → 温度采集 → CAN 通信 → 任务调度 → 定时器。
|
||
|
|
*/
|
||
|
|
void app_init(void)
|
||
|
|
{
|
||
|
|
systick_config_ms();
|
||
|
|
usart0_gpio_config();
|
||
|
|
usart0_config();
|
||
|
|
temp_sensor_init();
|
||
|
|
canfd_init();
|
||
|
|
task_manager_init();
|
||
|
|
user_timer_init();
|
||
|
|
}
|