第一次提交
This commit is contained in:
58
ETH/UdpServer/User/interface_boot.c
Normal file
58
ETH/UdpServer/User/interface_boot.c
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
#include <debug.h>
|
||||
#include "interface_config.h"
|
||||
#include "ch32v30x_iwdg.h"
|
||||
|
||||
Timer boot_timer_interface;
|
||||
|
||||
// ι<><CEB9>
|
||||
void feedWatchdog(void)
|
||||
{
|
||||
IWDG_ReloadCounter(); //<2F>ⲿwdtι<74><CEB9>
|
||||
}
|
||||
|
||||
|
||||
void bootmian(void *signal_id)
|
||||
{
|
||||
//------------------------------------------------------------------------------
|
||||
(void)signal_id; // <20><><EFBFBD>DZ<EFBFBD><C7B1><EFBFBD>Ϊ<EFBFBD><CEAA>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
feedWatchdog();
|
||||
|
||||
timerStart(&boot_timer_interface, 100,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// APPģ<50><C4A3><EFBFBD>ij<EFBFBD>ʼ<EFBFBD><CABC>
|
||||
void bootInterfaceInit(void)
|
||||
{
|
||||
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
timerInit(&boot_timer_interface);
|
||||
// <20><><EFBFBD>Ķ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>źţ<C5BA><C5A3><EFBFBD><EFBFBD>ڶ<EFBFBD>ʱ<EFBFBD>ɼ<EFBFBD>
|
||||
subscribe(&boot_timer_interface, bootmian);
|
||||
|
||||
timerStart(&boot_timer_interface, 100,1); //15ms
|
||||
|
||||
feedWatchdog();//ι<><CEB9>,<2C><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ιһ<CEB9><D2BB>
|
||||
|
||||
printf("bootInterface: initial OK %d\n",getCurrentTime());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user