添加普冉 PY32F040 OTA 双工程代码生成模板
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#include "application.h"
|
||||
#include "iwdg.h"
|
||||
#include "jb_port.h"
|
||||
#include "jb_protocol.h"
|
||||
|
||||
/*******************状态机应用层开始********************/
|
||||
void app_machine_handle(void)
|
||||
{
|
||||
}
|
||||
|
||||
/***************状态机应用层结束************************/
|
||||
|
||||
void version_printf(void)
|
||||
{
|
||||
appPrintf(LOG_NOTIC, "Developer:%s\r\n", __DEVELOPER__);
|
||||
appPrintf(LOG_NOTIC, "Email:%s\r\n", __EMAIL__);
|
||||
appPrintf(LOG_NOTIC, "Version:%s\r\n", __VERSION__);
|
||||
appPrintf(LOG_NOTIC, "Compiler Date:%s\r\n", __DATE__);
|
||||
appPrintf(LOG_NOTIC, "Compiler Time:%s\r\n", __TIME__);
|
||||
}
|
||||
|
||||
void app_Init(void)
|
||||
{
|
||||
// 系统初始化
|
||||
DEBUG_USART_Config(); /* 将串口配置成日志口 */
|
||||
version_printf(); /* 打印版本信息 */
|
||||
timerInit(); /* TIM6 1ms 节拍,供协议超时/重传 */
|
||||
jbInit(); /* 协议初始化 */
|
||||
userInit(); /* 用户初始化 */
|
||||
uartInit(); /* USART3 PB10/PB11,9600 8N1 */
|
||||
}
|
||||
|
||||
void app_lication(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
app_machine_handle(); /* 状态机处理函数 */
|
||||
jb_port_uart_run(); /* 串口调试日志 */
|
||||
userHandle(); /* 用户处理函数 */
|
||||
jbProtocolHandle(&gDevData); /* 协议处理函数 */
|
||||
iwdg_feed(); /* 看门狗喂狗 */
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user