chen
2025-05-15 67ca69985af9109a0603a1cde71f21b940c059ff
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);
    }
   
    //