From 67ca69985af9109a0603a1cde71f21b940c059ff Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期四, 15 五月 2025 09:12:53 +0800 Subject: [PATCH] 完全将免布线标签代码移植过来版本 --- keil/include/main/main.c | 74 ++++++++++++++++++------------------ 1 files changed, 37 insertions(+), 37 deletions(-) diff --git a/keil/include/main/main.c b/keil/include/main/main.c index f98589e..0f062ee 100644 --- a/keil/include/main/main.c +++ b/keil/include/main/main.c @@ -109,7 +109,7 @@ // //***************************************************************************** #define WSF_BUF_POOLS 5 -void Fira_Ranging_Task(void); +void Fira_Change_Task(void); // Default pool descriptor. static wsfBufPoolDesc_t poolDescriptors[WSF_BUF_POOLS] = { {32, 26}, {64, 24}, {128, 4}, {256 + 32, 4}, {1024 + 32, 2}, @@ -191,13 +191,45 @@ break; } } -wsfHandlerId_t handlerId; -void Fira_Ranging_Task(void) + +void Fira_Change_Task(void) { - // +} +extern uint8_t normal_flag; +int main(void) +{ + // Initialize MCU system + board_init(); + + // Disable watchdog timer + wdt_close(WDT_ID0); + LOG_INFO(TRACE_MODULE_APP, "UCI FiRa example\r\n"); + + // Platform init for WSF + PalSysInit(); + + // Initialize os + + // + // Set up timers for the WSF scheduler. + // + WsfOsInit(); + WsfTimerInit(); + sys_tick_callback_set(WsfTimerUpdateTicks); + + // + // Initialize a buffer pool for WSF dynamic memory needs. + // + uint32_t wsfBufMemLen = WsfBufInit(WSF_BUF_POOLS, poolDescriptors); + + if (wsfBufMemLen > FREE_MEM_SIZE) + { + LOG_INFO(TRACE_MODULE_APP, "Memory pool is not enough %d\r\n", wsfBufMemLen - FREE_MEM_SIZE); + } +// // Create app task // - handlerId = WsfOsSetNextHandler(app_handler); + wsfHandlerId_t handlerId = WsfOsSetNextHandler(app_handler); app_init(handlerId); // @@ -239,38 +271,6 @@ uwb_app_config.filter_en = (uint8_t)(FILTER_EN); uwb_app_config.session_param.tx_power_level = board_param.tx_power_fcc[CALIB_CH(uwb_app_config.ppdu_params.ch_num)]; uwb_app_config.ppdu_params.rx_ant_id = (uint8_t)(RX_MAIN_ANT_PORT); -} -int main(void) -{ - // Initialize MCU system - board_init(); - - // Disable watchdog timer - wdt_close(WDT_ID0); - LOG_INFO(TRACE_MODULE_APP, "UCI FiRa example\r\n"); - - // Platform init for WSF - PalSysInit(); - - // Initialize os - - // - // Set up timers for the WSF scheduler. - // - WsfOsInit(); - WsfTimerInit(); - sys_tick_callback_set(WsfTimerUpdateTicks); - - // - // Initialize a buffer pool for WSF dynamic memory needs. - // - uint32_t wsfBufMemLen = WsfBufInit(WSF_BUF_POOLS, poolDescriptors); - - if (wsfBufMemLen > FREE_MEM_SIZE) - { - LOG_INFO(TRACE_MODULE_APP, "Memory pool is not enough %d\r\n", wsfBufMemLen - FREE_MEM_SIZE); - } - // -- Gitblit v1.9.3