52 lines
995 B
C
52 lines
995 B
C
|
|
#include "Init.h"
|
|
#include "capture.h"
|
|
#include "inFlash.h"
|
|
#include "FM_GPIO.h"
|
|
#include "FM_TIM.h"
|
|
#include "uart_dev.h"
|
|
#include "parameter.h"
|
|
#include "abnormalManage.h"
|
|
#include "pDebug.h"
|
|
#include "interruptSend.h"
|
|
#include "FM_RTC.h"
|
|
|
|
/**
|
|
* @brief 初始化外设,同时通过配置文件初始化系统参数
|
|
* @param None
|
|
* @retval None
|
|
*
|
|
*/
|
|
void Init(void)
|
|
{
|
|
// HAL_Delay(10000);
|
|
|
|
config_info_start();
|
|
ADC_Capture_Init();
|
|
proportionalInt(g_cfgParameter.onlyPower);
|
|
|
|
FM_GPIO_Init();
|
|
tim_Init();
|
|
|
|
FM_RTC_Init();
|
|
|
|
Init_debug_uart();
|
|
Init_BAT485_uart(g_cfgParameter.bat485_Baud);
|
|
Init_GW485_uart(g_cfgParameter.gw485_Baud);
|
|
// Init_BAT485_uart(115200);
|
|
// Init_GW485_uart(115200);
|
|
start_gw485Rx_It();
|
|
start_bat485Rx_It();
|
|
|
|
send_init();
|
|
// POW_FF_PCON_Open();
|
|
// POW_OUT_PCON_Open();
|
|
|
|
HAL_Delay(100);
|
|
setPowerOutput(TRUE);
|
|
|
|
// EN_PWMOUT_Eable();
|
|
// setDutyRatio(0.5);
|
|
// while(1);
|
|
}
|