2024-12-07 09:52:46 +00:00
|
|
|
|
|
|
|
|
|
#include "Init.h"
|
|
|
|
|
#include "capture.h"
|
|
|
|
|
#include "FM_GPIO.h"
|
|
|
|
|
#include "inFlash.h"
|
|
|
|
|
#include "parameter.h"
|
|
|
|
|
#include "FM_GPIO.h"
|
|
|
|
|
#include "FM_TIM.h"
|
2024-12-10 10:29:05 +00:00
|
|
|
|
#include "uart_dev.h"
|
2024-12-07 09:52:46 +00:00
|
|
|
|
|
2024-12-09 09:53:43 +00:00
|
|
|
|
extern int getMPPT_Mode(void);
|
|
|
|
|
|
2024-12-10 10:29:05 +00:00
|
|
|
|
/**
|
|
|
|
|
* @brief 初始化外设,同时通过配置文件初始化系统参数
|
|
|
|
|
* @param None
|
|
|
|
|
* @retval None
|
|
|
|
|
*
|
|
|
|
|
*/
|
2024-12-07 09:52:46 +00:00
|
|
|
|
void Init(void)
|
|
|
|
|
{
|
|
|
|
|
config_info_start();
|
|
|
|
|
ADC_Capture_Init();
|
|
|
|
|
proportionalInt(getMPPT_Mode());
|
|
|
|
|
|
|
|
|
|
FM_GPIO_Init();
|
|
|
|
|
tim_Init();
|
|
|
|
|
|
2024-12-10 10:29:05 +00:00
|
|
|
|
Init_debug_uart();
|
|
|
|
|
Init_BAT485_uart();
|
|
|
|
|
Init_GW485_uart();
|
|
|
|
|
start_gw485Rx_It();
|
|
|
|
|
start_bat485Rx_It();
|
2024-12-11 09:51:48 +00:00
|
|
|
|
|
|
|
|
|
POW_FF_PCON_Open();
|
|
|
|
|
POW_OUT_PCON_Open();
|
|
|
|
|
|
2024-12-07 09:52:46 +00:00
|
|
|
|
}
|