cfw_nb_nv_api.h 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _CFW_NB_NV_API_H_
  13. #define _CFW_NB_NV_API_H_
  14. #include <stdint.h>
  15. #include <stdbool.h>
  16. #include "cfw_config.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. int nvmWriteStatic(void);
  21. uint8_t nbiot_nvGetVersionControl(void);
  22. void nbiot_nvSetVersionControl(uint8_t version);
  23. uint8_t nbiot_nvGetPdnAutoAttach(void);
  24. void nbiot_nvSetPdnAutoAttach(uint8_t pdn_auto_attach);
  25. uint8_t nbiot_nvGetDirectIpMode(void);
  26. void nbiot_nvSetDirectIpMode(uint8_t value);
  27. uint8_t nbiot_nvGetEdrxEnable(void);
  28. void nbiot_nvSetEdrxEnable(uint8_t enable);
  29. uint8_t nbiot_nvGetEdrxValue(void);
  30. void nbiot_nvSetEdrxValue(uint8_t value);
  31. uint8_t nbiot_nvGetEdrxPtw(void);
  32. void nbiot_nvSetEdrxPtw(uint8_t ptw);
  33. uint8_t nbiot_nvGetPsmEnable(void);
  34. void nbiot_nvSetPsmEnable(uint8_t psmEnable);
  35. uint8_t nbiot_nvGetPsmT3412(void);
  36. void nbiot_nvSetPsmT3412(uint8_t t3412Val);
  37. uint8_t nbiot_nvGetPsmT3324(void);
  38. void nbiot_nvSetPsmT3324(uint8_t t3324Val);
  39. uint8_t nbiot_nvGetCiotReport(void);
  40. void nbiot_nvSetCiotReport(uint8_t ciotReport);
  41. uint8_t nbiot_nvGetCiotNonip(void);
  42. void nbiot_nvSetCiotNonip(uint8_t nonip);
  43. uint8_t nbiot_nvGetCiotCpciot(void);
  44. void nbiot_nvSetCiotCpciot(uint8_t cpciot);
  45. uint8_t nbiot_nvGetCiotUpciot(void);
  46. void nbiot_nvSetCiotUpciot(uint8_t upciot);
  47. uint8_t nbiot_nvGetCiotErwopdn(void);
  48. void nbiot_nvSetCiotErwopdn(uint8_t erwopdn);
  49. uint8_t nbiot_nvGetCiotSmsWoCombAtt(void);
  50. void nbiot_nvSetCiotSmsWoCombAtt(uint8_t sms_wo_comb_att);
  51. uint8_t nbiot_nvGetCiotApnRateCtrl(void);
  52. void nbiot_nvSetCiotApnRateCtrl(uint8_t apn_rate_control);
  53. uint8_t nbiot_nvGetCiotEpco(void);
  54. void nbiot_nvSetCiotEpco(uint8_t epco);
  55. uint8_t nbiot_nvGetCpBackOffEnable(void);
  56. void nbiot_nvSetCpBackOffEnable(uint8_t enable);
  57. uint8_t nbiot_nvGetCiotRoam(void);
  58. void nbiot_nvSetCiotRoam(uint8_t roam);
  59. uint8_t nbiot_nvGetNasRai(void);
  60. void nbiot_nvSetNasRai(uint8_t nasRai);
  61. uint8_t nbiot_nvGetMacRai(void);
  62. void nbiot_nvSetMacRai(uint8_t macRai);
  63. uint8_t nbiot_nvGetDefaultPdnType(void);
  64. void nbiot_nvSetDefaultPdnType(uint8_t pdnType);
  65. uint8_t *nbiot_nvGetDefaultApn(uint8_t i);
  66. void nbiot_nvSetDefaultApn(uint8_t i, const char *apn, uint8_t apnLen);
  67. uint8_t *nbiot_nvGetDefaultUsername();
  68. void nbiot_nvSetDefaultUsername(uint8_t *username, uint8_t usernameLen);
  69. uint8_t *nbiot_nvGetDefaultPassword();
  70. void nbiot_nvSetDefaultPassword(uint8_t *password, uint8_t passwordLen);
  71. uint8_t nbiot_nvGetHccpEnable(void);
  72. void nbiot_nvSetHccpEnable(uint8_t enable);
  73. uint16_t nbiot_nvGetHccpMaxcid(void);
  74. void nbiot_nvSetHccpMaxcid(uint16_t maxCid);
  75. uint8_t nbiot_nvGetHccpProfile(void);
  76. void nbiot_nvSetHccpProfile(uint8_t profile);
  77. uint8_t nbiot_nvGetAttachWithImsi(void);
  78. void nbiot_nvSetAttachWithImsi(uint8_t attachWithImsi);
  79. uint8_t nbiot_nvGetNasSigLowPri(void);
  80. void nbiot_nvSetNasSigLowPri(uint8_t nasSigLowPri);
  81. uint8_t nbiot_nvGetNasSigDualPri(void);
  82. void nbiot_nvSetNasSigDualPri(uint8_t overrideNasSigLowPri);
  83. uint8_t nbiot_nvGetExceptionDataReporting(void);
  84. void nbiot_nvSetExceptionDataReporting(uint8_t exceptionDataReportingAllowed);
  85. uint8_t nbiot_nvGetT3245Behave(void);
  86. void nbiot_nvSetT3245Behave(uint8_t t3245Behaviour);
  87. uint8_t nbiot_nvGetPsDataOff();
  88. void nbiot_nvSetPsDataOff(uint8_t psdataOff);
  89. uint16_t nbiot_nvGetExemptedServiceType();
  90. void nbiot_nvSetExemptedServiceType(uint16_t exempted_service_type);
  91. uint8_t nbiot_nvGetDcnIdEnable(void);
  92. void nbiot_nvSetDcnIdEnable(uint8_t enable);
  93. uint8_t nbiot_nvGetDefaultDcnIdValidFlag(void);
  94. void nbiot_nvSetDefaultDcnIdValidFlag(uint8_t enable);
  95. uint16_t nbiot_nvGetDcnIdValue(void);
  96. void nbiot_nvSetDcnIdValue(uint16_t dcnid);
  97. uint8_t nbiot_nvSetUserHplmn(uint8_t *mcc, uint8_t *mnc);
  98. uint8_t nbiot_nvGetUserHplmn(uint8_t *mcc, uint8_t *mnc);
  99. void nbiot_nvClearUserHplmn();
  100. uint8_t nbiot_nvGetMultiUeOptFlag(void);
  101. void nbiot_nvSetMultiUeOptFlag(uint8_t multiUeOptFlag);
  102. void nbiot_nvSetDualmodeFlag(uint8_t dualmodeFlag);
  103. uint8_t nbiot_nvGetDualmodeFlag();
  104. void nbiot_nvSetDualmodeFastSwitch(uint8_t dualmodeFastSwitch);
  105. uint8_t nbiot_nvGetDualmodeFastSwitch();
  106. void nbiot_nvSetRatPriority(uint8_t ratPriority);
  107. uint8_t nbiot_nvGetRatPriority();
  108. void nbiot_nvSetNbGoodCellSignal(uint8_t NbGoodCellSignal);
  109. uint8_t nbiot_nvGetNbGoodCellSignal();
  110. void nbiot_nvSetGsmGoodCellSignal(uint8_t GsmGoodCellSignal);
  111. uint8_t nbiot_nvGetGsmGoodCellSignal();
  112. void nbiot_nvSetlossCovBackOffMaxCnt(uint32_t lossCovBackOffMaxCnt);
  113. uint32_t nbiot_nvGetlossCovBackOffMaxCnt();
  114. void nbiot_nvSetLossCovLen(uint32_t lossCovLen);
  115. uint32_t nbiot_nvGetLossCovLen();
  116. void nbiot_nvSetRatChangeLen(uint32_t ratChangeLen);
  117. uint32_t nbiot_nvGetRatChangeLen();
  118. void nbiot_nvSetActProcLen(uint32_t actProcLen);
  119. uint32_t nbiot_nvGetActProcLen();
  120. void nbiot_nvSetProhibitNbRecoverLen(uint32_t prohibitNbRecoverLen);
  121. uint32_t nbiot_nvGetProhibitNbRecoverLen();
  122. void nbiot_nvSetNasCellSelectLen(uint32_t nasCellSelectLen);
  123. uint32_t nbiot_nvGetNasCellSelectLen();
  124. void nbiot_nvSetRrcCellSelectLen(uint32_t rrcCellSelectLen);
  125. uint32_t nbiot_nvGetRrcCellSelectLen();
  126. void nbiot_nvSetDualLossCovLen(uint32_t dualLossCovLen);
  127. uint32_t nbiot_nvGetDualLossCovLen();
  128. void nbiot_nvSetLogRank(uint8_t logrank);
  129. uint8_t nbiot_nvGetLogRank();
  130. void nbiot_nvSetLogModule(uint32_t module);
  131. uint32_t nbiot_nvGetLogModule();
  132. uint8_t nbiot_nvGetPM();
  133. void nbiot_nvSetPM(uint8_t pm);
  134. void nbiot_nvSetRsrpOffset(int8_t offset);
  135. int8_t nbiot_nvGetRsrpOffset();
  136. void nbiot_nvSetSwitchBs(uint8_t switchBs);
  137. uint8_t nbiot_nvGetSwitchBs();
  138. void nbiot_nvSetMultiToneSupport(uint8_t multiToneSupport);
  139. uint8_t nbiot_nvGetMultiToneSupport();
  140. uint8_t nbiot_nvGetScrambleMode();
  141. void nbiot_nvSetScrambleMode(uint8_t mode);
  142. uint8_t nbiot_nvGetRrcRlsTimer();
  143. void nbiot_nvSetRrcRlsTimer(uint8_t rrcRlsTimer10);
  144. void nbiot_nvSetRelVersion(uint8_t val);
  145. uint8_t nbiot_nvGetRelVersion();
  146. void nbiot_nvSetsnrLevel(uint8_t snrLevel);
  147. uint8_t nbiot_nvGetsnrLevel();
  148. void nbiot_nvSetUserInactLen(uint32_t userInactLen);
  149. uint32_t nbiot_nvGetUserInactLen(void);
  150. bool nbiot_nvIsInputNumber(const char input[]);
  151. uint8_t nbiot_nvGetMultiUeOptFlag(void);
  152. void nbiot_nvSetSupportBand(uint8_t bandNum, uint8_t band[]);
  153. void nbiot_nvGetSupportBand(uint8_t *pBandNum, uint8_t band[]);
  154. uint8_t nbiot_nvGetFakeBsr(void);
  155. void nbiot_nvSetFakeBsr(uint8_t fakeBsr);
  156. uint16_t nbiot_nvGetFakeBsrTime(void);
  157. void nbiot_nvSetFakeBsrTime(uint16_t fakeBsrTime);
  158. void nbiot_nvSetlossCovSearchFlag(uint8_t lossCovSearchFlag);
  159. uint8_t nbiot_nvGetlossCovSearchFlag();
  160. void nbiot_nvSetlossCovSearchCnt(uint8_t lossCovSearchCnt);
  161. uint8_t nbiot_nvGetlossCovSearchCnt();
  162. void sdb_nvDeleteLastRegFreq(void);
  163. void *nbiot_atGetUeStatsPara();
  164. uint8_t nbiot_nvGetPowerClass();
  165. void nbiot_nvSetPowerClass(uint8_t val);
  166. void nbiot_nvSetRabTxNum(uint8_t ucRabTxNum);
  167. uint8_t nbiot_nvGetRabTxNum(void);
  168. void nbiot_nvSetSearchTimePerfreq(uint8_t time);
  169. uint8_t nbiot_nvGetSearchTimePerfreq();
  170. void nbiot_nvSetNoLock();
  171. void nbiot_nvSetLockCell(uint16_t pci, uint32_t earfcn, int8_t offset);
  172. void nbiot_nvSetLockFreqList(uint8_t freq_num, uint32_t a_earfcn[], int8_t a_offset[]);
  173. void nbiot_nvGetLockFreqList(uint8_t *pfreq_num, uint32_t a_earfcn[], int8_t a_offset[], uint16_t *ppci);
  174. void nbiot_nvSetFreqList(uint8_t freq_num, uint32_t a_earfcn[], int8_t a_offset[]);
  175. void nbiot_nvGetFreqList(uint8_t *p_freq_num, uint32_t a_earfcn[], int8_t a_offset[]);
  176. void nbiot_nvSetEmmTabTimerLen(uint16_t tabTimerLen);
  177. uint16_t nbiot_nvGetEmmTabTimerLen(void);
  178. uint8_t nbiot_nvGetSmartRfMode(void);
  179. void nbiot_nvSetSmartRfMode(uint8_t smartRfMode);
  180. void nbiot_sdbSetLockCell(uint16_t pci, uint32_t earfcn, int8_t offset);
  181. void nbiot_sdbSetLockFreqList(uint8_t freq_num, uint32_t a_earfcn[], int8_t a_offset[]);
  182. uint8_t nbiot_nvGetAutoAttAfterNormalDetach();
  183. void nbiot_nvSetAutoAttAfterNormalDetach(uint8_t autoAttAfterNormalDetach);
  184. void nbiot_sdbSetNoLock();
  185. void nbiot_sdbSetLockCell(uint16_t pci, uint32_t earfcn, int8_t offset);
  186. void nbiot_sdbSetLockFreqList(uint8_t freq_num, uint32_t a_earfcn[], int8_t a_offset[]);
  187. void nbiot_sdbGetLockFreqList(uint8_t *pfreq_num, uint32_t a_earfcn[], int8_t a_offset[], uint16_t *ppci);
  188. #ifdef NBIOT_POSITION_SUPPORT
  189. void nbiot_nvGetLppPara(uint32_t *type, uint32_t *idle);
  190. void nbiot_nvSetLppPara(uint32_t type, uint32_t idle);
  191. void nbiot_nvSetMolrEnable(uint8_t enable);
  192. uint8_t nbiot_nvGetMolrEnable();
  193. void nbiot_nvSetMtlrNotify(uint8_t notify);
  194. uint8_t nbiot_nvGetMtlrNotify();
  195. void nbiot_nvSetMolreFormat(uint8_t format);
  196. uint8_t nbiot_nvGetMolreFormat();
  197. #endif
  198. #ifdef __cplusplus
  199. }
  200. #endif
  201. #endif