1 /* 2 * Copyright 2012-2020, 2022-2023 NXP 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef _PHNXPUCIHAL_EXT_H_ 17 #define _PHNXPUCIHAL_EXT_H_ 18 19 #include <phNxpUciHal.h> 20 #include <string.h> 21 22 #define UCI_GID_NXP_PROPRIETARY 0x0D /* 1101b Proprietary Group */ 23 24 /* Extended device core configirations */ 25 #define EXTENDED_DEVICE_CONFIG_ID 0xE4 26 27 #define UCI_EXT_PARAM_DELAY_CALIBRATION_VALUE 0x00 28 #define UCI_EXT_PARAM_AOA_CALIBRATION_CTRL 0x01 29 #define UCI_EXT_PARAM_DPD_WAKEUP_SRC 0x02 30 #define UCI_EXT_PARAM_WTX_COUNT_CONFIG 0x03 31 #define UCI_EXT_PARAM_DPD_ENTRY_TIMEOUT 0x04 32 #define UCI_EXT_PARAM_WIFI_COEX_FEATURE 0x05 33 #define UCI_EXT_PARAM_TX_BASE_BAND_CONFIG 0x26 34 #define UCI_EXT_PARAM_DDFS_TONE_CONFIG 0x27 35 #define UCI_EXT_PARAM_TX_PULSE_SHAPE_CONFIG 0x28 36 #define UCI_EXT_PARAM_CLK_CONFIG_CTRL 0x30 37 #define UCI_EXT_PARAM_DBG_RFRAME_LOG_NTF 0x22 38 39 #define UCI_PARAM_ID_LOW_POWER_MODE 0x01 40 41 /* customer specific calib params */ 42 #define VENDOR_CALIB_PARAM_TX_POWER_PER_ANTENNA 0x04 43 44 /* Proprietary GID */ 45 #define UCI_GID_PROPRIETARY_0x0F 0x0F 46 47 /* Customer Specific OID */ 48 #define SET_VENDOR_SET_CALIBRATION 0x21 49 50 #define RMS_TX_POWER_SHIFT 8 51 #define UCI_RMS_TX_POWER_INDEX 7 52 #define UCI_RMS_TX_POWER_LEN 2 53 54 /* Extended Uci status Reason code */ 55 #define UCI_EXT_STATUS_SE_RECOVERY_FAILURE 0x72 56 #define UCI_EXT_STATUS_SE_RECOVERY_SUCCESS 0x73 57 #define UCI_EXT_STATUS_SE_APDU_CMD_FAIL 0x74 58 #define UCI_EXT_STATUS_SE_AUTH_FAIL 0x75 59 60 tHAL_UWB_STATUS phNxpUciHal_send_ext_cmd(uint16_t cmd_len, const uint8_t* p_cmd); 61 tHAL_UWB_STATUS phNxpUciHal_process_ext_rsp(uint16_t cmd_len, uint8_t* p_buff); 62 tHAL_UWB_STATUS phNxpUciHal_set_board_config(); 63 void phNxpUciHal_handle_set_calibration(const uint8_t *p_data, uint16_t data_len); 64 void phNxpUciHal_extcal_handle_coreinit(void); 65 void phNxpUciHal_process_response(); 66 void phNxpUciHal_handle_set_country_code(const char country_code[2]); 67 bool phNxpUciHal_handle_set_app_config(uint16_t *data_len, uint8_t *p_data); 68 void phNxpUciHal_handle_get_caps_info(uint16_t data_len, uint8_t *p_data); 69 void apply_per_country_calibrations(void); 70 #endif /* _PHNXPNICHAL_EXT_H_ */ 71