| | |
| | | |
| | | // This function will be called by uwbapi_session_init() |
| | | void app_session_init(void) |
| | | { |
| | | normal_uwb_change_to_fira();//变为fira配置的uwb |
| | | { |
| | | #ifdef MY_MODE |
| | | normal_uwb_change_to_fira(); |
| | | #endif |
| | | // register process handler for MAC TX done and RX done |
| | | mac_register_process_handler(ranging_tx_process, ranging_rx_process); |
| | | uwbs_handler_init(&op); |
| | | |
| | | uwbs_handler_init(&op); |
| | | } |
| | | |
| | | void ranging_configure(void) |
| | |
| | | .phy_cfg.rx_ant_id = UWB_RX_ANT_3, /* UWB RX antenna port */ |
| | | }; |
| | | #endif |
| | | uint8_t normal_flag=1; |
| | | |
| | | void uwb_fira_init(void) |
| | | { |
| | | uwb_open(); |
| | | // uwb_open(); |
| | | |
| | | // set advanced parameters |
| | | struct PHY_ADV_CONFIG_T adv_config = |
| | |
| | | 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); |
| | | } |
| | | uint8_t normal_flag=0; |
| | | void uwb_normal_init(void) |
| | | { |
| | | Uwb_init(); |
| | |
| | | void ranging_stop(void) |
| | | { |
| | | ranging_env.enable = 0; |
| | | #ifdef MY_MODE |
| | | fira_uwb_change_to_normal();//变为normal配置的uwb |
| | | #endif |
| | | ranging_monitor_stop(); |
| | | LOG_INFO(TRACE_NO_REPORT_HOST | TRACE_MODULE_APP, "Ranging stop\r\n"); |
| | | } |