1 /****************************************************************************** 2 * 3 * Copyright (C) 2011-2012 Broadcom Corporation 4 * Copyright 2018-2019, 2023 NXP 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 ******************************************************************************/ 19 20 #ifndef __CONFIG_H 21 #define __CONFIG_H 22 23 #include <stdint.h> 24 25 void NxpConfig_Init(void); 26 void NxpConfig_Deinit(void); 27 bool NxpConfig_SetCountryCode(const char country_code[2]); 28 29 int NxpConfig_GetStr(const char* name, char* p_value, unsigned long len); 30 int NxpConfig_GetNum(const char* name, void* p_value, unsigned long len); 31 int NxpConfig_GetByteArray(const char* name, uint8_t* pValue, long bufflen, long *len); 32 33 int NxpConfig_GetStrArrayLen(const char* name, unsigned long *pLen); 34 int NxpConfig_GetStrArrayVal(const char* name, int index, char* pValue, unsigned long len); 35 36 /* libuwb-nxp.conf parameters */ 37 #define NAME_UWB_BOARD_VARIANT_CONFIG "UWB_BOARD_VARIANT_CONFIG" 38 #define NAME_UWB_BOARD_VARIANT_VERSION "UWB_BOARD_VARIANT_VERSION" 39 #define NAME_UWB_CORE_EXT_DEVICE_DEFAULT_CONFIG "UWB_CORE_EXT_DEVICE_DEFAULT_CONFIG" 40 #define NAME_UWB_DEBUG_DEFAULT_CONFIG "UWB_DEBUG_DEFAULT_CONFIG" 41 #define NAME_ANTENNA_PAIR_SELECTION_CONFIG1 "ANTENNA_PAIR_SELECTION_CONFIG1" 42 #define NAME_ANTENNA_PAIR_SELECTION_CONFIG2 "ANTENNA_PAIR_SELECTION_CONFIG2" 43 #define NAME_ANTENNA_PAIR_SELECTION_CONFIG3 "ANTENNA_PAIR_SELECTION_CONFIG3" 44 #define NAME_ANTENNA_PAIR_SELECTION_CONFIG4 "ANTENNA_PAIR_SELECTION_CONFIG4" 45 #define NAME_ANTENNA_PAIR_SELECTION_CONFIG5 "ANTENNA_PAIR_SELECTION_CONFIG5" 46 #define NAME_NXP_CORE_CONF_BLK "NXP_CORE_CONF_BLK_" 47 #define NAME_UWB_FW_DOWNLOAD_LOG "UWB_FW_DOWNLOAD_LOG" 48 #define NAME_NXP_UWB_FLASH_CONFIG "NXP_UWB_FLASH_CONFIG" 49 #define NAME_NXP_UWB_XTAL_38MHZ_CONFIG "NXP_UWB_XTAL_38MHZ_CONFIG" 50 #define NAME_NXP_UWB_EXTENDED_NTF_CONFIG "NXP_UWB_EXTENDED_NTF_CONFIG" 51 #define NAME_UWB_CORE_EXT_DEVICE_SR1XX_T_CONFIG "UWB_CORE_EXT_DEVICE_SR1XX_T_CONFIG" 52 #define NAME_UWB_CORE_EXT_DEVICE_SR1XX_S_CONFIG "UWB_CORE_EXT_DEVICE_SR1XX_S_CONFIG" 53 #define NAME_COUNTRY_CODE_CAP_FILE_LOCATION "COUNTRY_CODE_CAP_FILE_LOCATION" 54 #define NAME_UWB_VENDOR_CAPABILITY "UWB_VENDOR_CAPABILITY" 55 56 #define NAME_UWB_BINDING_LOCKING_ALLOWED "UWB_BINDING_LOCKING_ALLOWED" 57 #define NAME_NXP_UWB_PROD_FW_FILENAME "NXP_UWB_PROD_FW_FILENAME" 58 #define NAME_NXP_UWB_DEV_FW_FILENAME "NXP_UWB_DEV_FW_FILENAME" 59 #define NAME_NXP_UWB_FW_FILENAME "NXP_UWB_FW_FILENAME" 60 #define NAME_NXP_UWB_EXT_APP_DEFAULT_CONFIG "NXP_UWB_EXT_APP_DEFAULT_CONFIG" 61 #define NAME_NXP_UWB_EXT_APP_SR1XX_T_CONFIG "NXP_UWB_EXT_APP_SR1XX_T_CONFIG" 62 #define NAME_NXP_UWB_EXT_APP_SR1XX_S_CONFIG "NXP_UWB_EXT_APP_SR1XX_S_CONFIG" 63 #define NAME_UWB_USER_FW_BOOT_MODE_CONFIG "UWB_USER_FW_BOOT_MODE_CONFIG" 64 #define NAME_NXP_UWB_COUNTRY_CODE_CAPS "UWB_COUNTRY_CODE_CAPS" 65 66 #define NAME_NXP_SECURE_CONFIG_BLK "NXP_SECURE_CONFIG_BLK_" 67 #define NAME_PLATFORM_ID "PLATFORM_ID" 68 69 #define NAME_REGION_MAP_PATH "REGION_MAP_PATH" 70 71 #define NAME_NXP_UCI_CONFIG_PATH "NXP_UCI_CONFIG_PATH" 72 73 /* libuwb-uci.conf parameters */ 74 #define NAME_NXP_UWB_LOW_POWER_MODE "UWB_LOW_POWER_MODE" 75 76 /* libuwb-countrycode.conf parameters */ 77 #define NAME_NXP_COUNTRY_CODE_VERSION "VERSION" 78 79 #define NAME_AUTO_SUSPEND_ENABLE "AUTO_SUSPEND_ENABLE" 80 #define NAME_AUTO_SUSPEND_TIMEOUT_MS "AUTO_SUSPEND_TIMEOUT_MS" 81 82 #define NAME_DELETE_URSK_FOR_CCC_SESSION "DELETE_URSK_FOR_CCC_SESSION" 83 84 /* In case the HAL has to set STS index for CCC */ 85 #define NAME_OVERRIDE_STS_INDEX_FOR_CCC_SESSION "OVERRIDE_STS_INDEX_FOR_CCC_SESSION" 86 87 /* default configuration */ 88 #define default_storage_location "/data/vendor/uwb" 89 90 #endif 91