quec_virt_func_bsp.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. /** @file
  2. quec_virt_func_common.c
  3. @brief
  4. This file is used to run virt function.
  5. */
  6. /*================================================================
  7. Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
  8. Quectel Wireless Solution Proprietary and Confidential.
  9. =================================================================*/
  10. /*=================================================================
  11. EDIT HISTORY FOR MODULE
  12. This section contains comments describing changes made to the module.
  13. Notice that changes are listed in reverse chronological order.
  14. WHEN WHO WHAT, WHERE, WHY
  15. ------------ ------- -------------------------------------------------------------------------------
  16. 22/06/2021 neo Init version
  17. =================================================================*/
  18. #include "quec_atresp.h"
  19. #include "ql_uart_internal.h"
  20. #include "quec_cust_feature.h"
  21. #include "quec_common.h"
  22. #include "quec_at_param.h"
  23. #include "at_param.h"
  24. #include "ql_api_osi.h"
  25. #include "quec_at_engine.h"
  26. #include "quec_log.h"
  27. #include "ql_lcd.h"
  28. #include "ql_sdmmc.h"
  29. #include "ql_audio.h"
  30. #include "ql_gnss.h"
  31. #include "ql_usb.h"
  32. #include "ql_api_spi4_ext_nor_sffs.h"
  33. #include "ql_api_spi6_ext_nor_flash.h"
  34. #include "at_command.h"
  35. #include "drv_sdio.h"
  36. #include "drv_sdmmc.h"
  37. #include "drv_emmc.h"
  38. #include "sdmmc.h"
  39. #include "drv_sdmmc_imp.h"
  40. #include "ql_wifi_scan.h"
  41. #include "ql_api_spi_nand_flash.h"
  42. #include "audio_device.h"
  43. #define QUEC_VIRT_FUNC_LOG(msg, ...) custom_log("VIRT_FUNC", msg, ##__VA_ARGS__)
  44. __attribute__((weak)) int sbc_encode = 0;
  45. __attribute__((weak)) const atCmdDesc_t *ql_atcmd_search_desc(const char *name, size_t length)
  46. {
  47. QUEC_VIRT_FUNC_LOG("weak ql at search");
  48. return NULL;
  49. }
  50. //LCD
  51. #ifndef CONFIG_QUEC_PROJECT_FEATURE_LCD
  52. __attribute__((weak)) int ql_compute_threshold(uint16_t *in_buf, int width, int height)
  53. {
  54. return 0;
  55. }
  56. __attribute__((weak)) ql_errcode_lcd ql_spi_lcd_write_cmd(uint8_t cmd)
  57. {
  58. return QL_LCD_EXECUTE_ERR;
  59. }
  60. __attribute__((weak)) ql_errcode_lcd ql_spi_lcd_write_data(uint8_t data)
  61. {
  62. return QL_LCD_EXECUTE_ERR;
  63. }
  64. #endif/*CONFIG_QUEC_PROJECT_FEATURE_LCD*/
  65. #ifndef CONFIG_QUEC_PROJECT_FEATURE_INTERNAL_GNSS
  66. __attribute__((weak)) uint8_t pamGetModuleWorkType(void)
  67. {
  68. return 0;
  69. }
  70. __attribute__((weak)) void pamSetModuleWorkType(uint8_t type)
  71. {
  72. }
  73. __attribute__((weak)) ql_pam_work_type_e ql_pamGetModuleWorkType(void)
  74. {
  75. return QUEC_PAM_NO_WORK;
  76. }
  77. __attribute__((weak)) void ql_pamSetModuleWorkType(uint8_t type)
  78. {
  79. }
  80. #endif
  81. #ifndef CONFIG_QUEC_PROJECT_FEATURE_WIFISCAN
  82. __attribute__((weak)) bool ql_wifiscan_get_open_state(void)
  83. {
  84. return false;
  85. }
  86. #endif
  87. #ifndef CONFIG_QUEC_PROJECT_FEATURE_BT
  88. __attribute__((weak)) bool ql_bt_ble_is_using()
  89. {
  90. return false;
  91. }
  92. #endif
  93. #if (!(defined CONFIG_QUEC_PROJECT_FEATURE_SDMMC || defined CONFIG_QUEC_PROJECT_FEATURE_EMMC))
  94. __attribute__((weak)) void quec_sdmmc_sdio1_vdd_off(void)
  95. {
  96. }
  97. __attribute__((weak)) drvEmmc_t *drvEmmcCreate(uint32_t name)
  98. {
  99. return NULL;
  100. }
  101. __attribute__((weak)) void drvEmmcDestroy(void *ctx)
  102. {
  103. }
  104. __attribute__((weak)) bool drvEmmcOpen(void *ctx)
  105. {
  106. return FALSE;
  107. }
  108. __attribute__((weak)) void drvEmmcClose(void *ctx)
  109. {
  110. }
  111. __attribute__((weak)) uint32_t drvEmmcGetBlockNum(void *ctx)
  112. {
  113. return 0;
  114. }
  115. __attribute__((weak)) bool drvEmmcWrite(void *ctx, uint32_t block_number, const void *buffer, uint32_t size)
  116. {
  117. return FALSE;
  118. }
  119. __attribute__((weak)) bool drvEmmcRead(void *ctx, uint32_t block_number, void *buffer, uint32_t size)
  120. {
  121. return FALSE;
  122. }
  123. __attribute__((weak)) uint32_t drvEmmcGetType(void *ctx)
  124. {
  125. return 0;
  126. }
  127. __attribute__((weak)) bool quec_drvEmmcSetClk(void *ctx, uint32_t freq)
  128. {
  129. return FALSE;
  130. }
  131. #endif
  132. #if (!(defined CONFIG_QUEC_PROJECT_FEATURE_SDMMC2 || defined CONFIG_QUEC_PROJECT_FEATURE_EMMC2))
  133. __attribute__((weak)) sdmmcCardTypeInit_t prvSdmmcDeviceTypeInit = SDMMC_EMMC_INIT;
  134. __attribute__((weak)) drvSdmmc_t *drvSdmmcCreate(uint32_t name)
  135. {
  136. return NULL;
  137. }
  138. __attribute__((weak)) void drvSdmmcDestroy(void *ctx)
  139. {
  140. }
  141. __attribute__((weak)) bool drvSdmmcOpen(void *ctx)
  142. {
  143. return FALSE;
  144. }
  145. __attribute__((weak)) void drvSdmmcClose(void *ctx)
  146. {
  147. }
  148. __attribute__((weak)) uint32_t drvSdmmcGetBlockNum(void *ctx)
  149. {
  150. return 0;
  151. }
  152. __attribute__((weak)) bool drvSdmmcWrite(void *ctx, uint32_t block_number, const void *buffer, uint32_t size)
  153. {
  154. return FALSE;
  155. }
  156. __attribute__((weak)) bool drvSdmmcRead(void *ctx, uint32_t block_number, void *buffer, uint32_t size)
  157. {
  158. return FALSE;
  159. }
  160. __attribute__((weak)) uint32_t drvSdmmcGetType(void *ctx)
  161. {
  162. return 0;
  163. }
  164. __attribute__((weak)) bool quec_drvSdmmcSetClk(void *ctx, uint32_t freq)
  165. {
  166. return FALSE;
  167. }
  168. __attribute__((weak)) bool quec_sdmmc_init_is_sd(void)
  169. {
  170. return FALSE;
  171. }
  172. __attribute__((weak)) bool quec_sdmmcOpen_sub(drvSdmmc_t *d)
  173. {
  174. return FALSE;
  175. }
  176. __attribute__((weak)) bool quec_sdmmcWriteBlocksSendCmd_SD(drvSdmmc_t *d,uint32_t count)
  177. {
  178. return FALSE;
  179. }
  180. __attribute__((weak)) bool quec_sdmmcCheckResp(drvSdmmc_t *d, sdmmcCmd_t cmd)
  181. {
  182. return FALSE;
  183. }
  184. __attribute__((weak)) void quec_sdmmcSendCmdSetEXT_CSD(REG_SDMMC_SDMMC_CONFIG_T *sdmmc_config){}
  185. __attribute__((weak)) void quec_sdmmcSendCmdSetWR_BLK_COUNT(REG_SDMMC_SDMMC_CONFIG_T *sdmmc_config){}
  186. __attribute__((weak)) void quec_sdmmcSendCmdSetWR_BLK_COUNT_SD(REG_SDMMC_SDMMC_CONFIG_T *sdmmc_config){}
  187. __attribute__((weak)) void quec_sdmmcCreateSet(drvSdmmc_t *d){}
  188. __attribute__((weak)) void quec_sdmmcCreateSetPower(void){}
  189. __attribute__((weak)) void quec_sdmmcCmdArg_Clear(drvSdmmc_t *d){}
  190. __attribute__((weak)) void quec_sdmmcReadAdress(drvSdmmc_t *d, uint32_t nr,unsigned *adress){}
  191. __attribute__((weak)) void quec_sdmmcReadMultiAdress(drvSdmmc_t *d,unsigned rcount,unsigned rsize,unsigned *adress){}
  192. __attribute__((weak)) void quec_sdmmcSetCard_is_sdhc(drvSdmmc_t *d){}
  193. __attribute__((weak)) void quec_sdmmcReadCsd(drvSdmmc_t *d){}
  194. __attribute__((weak)) void quec_set_sdmmc_pin_func(void){}
  195. __attribute__((weak)) int quec_sdmmc_reset(drvSdmmc_t *d)
  196. {
  197. return 0;
  198. }
  199. #endif
  200. __attribute__((weak)) void quec_exec_sdmmc_mkfs_cmd(ql_at_cmd_t *cmd)
  201. {
  202. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  203. return ;
  204. }
  205. __attribute__((weak)) void quec_exec_sdmmc_mount_cmd(ql_at_cmd_t *cmd)
  206. {
  207. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  208. return ;
  209. }
  210. __attribute__((weak)) void quec_exec_sdmmc_qft_cmd(ql_at_cmd_t *cmd)
  211. {
  212. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  213. return ;
  214. }
  215. #if (!(defined CONFIG_QUEC_PROJECT_FEATURE_SDMMC || defined CONFIG_QUEC_PROJECT_FEATURE_EMMC || defined CONFIG_QUEC_PROJECT_FEATURE_SDMMC2 || defined CONFIG_QUEC_PROJECT_FEATURE_EMMC2))
  216. __attribute__((weak)) bool ql_sdmmc_is_mount(void)
  217. {
  218. return FALSE;
  219. }
  220. __attribute__((weak)) bool ql_sdmmc_is_mount_ex(ql_sdmmc_partition_num_e part)
  221. {
  222. return FALSE;
  223. }
  224. __attribute__((weak)) ql_errcode_sdmmc_e ql_sdmmc_mkfs(uint8_t opt)
  225. {
  226. return QL_SDMMC_MKFS_ERR;
  227. }
  228. __attribute__((weak)) ql_errcode_sdmmc_e ql_sdmmc_mount(void)
  229. {
  230. return QL_SDMMC_MOUNT_ERR;
  231. }
  232. __attribute__((weak)) ql_errcode_sdmmc_e ql_sdmmc_umount(void)
  233. {
  234. return QL_SDMMC_MOUNT_ERR;
  235. }
  236. __attribute__((weak)) drvSdio_t *ql_sdmmc_handle = NULL;
  237. ql_errcode_sdmmc_e ql_sdmmc_open(void)
  238. {
  239. return QL_SDMMC_INIT_ERR;
  240. }
  241. ql_errcode_sdmmc_e ql_sdmmc_close(void)
  242. {
  243. return QL_SDMMC_INIT_ERR;
  244. }
  245. __attribute__((weak)) drvSdio_t *drvSdioCreate(uint32_t name)
  246. {
  247. return NULL;
  248. }
  249. __attribute__((weak)) bool drvSdioOpen(drvSdio_t *d)
  250. {
  251. return FALSE;
  252. }
  253. __attribute__((weak)) uint32_t drvSdioGetBlockNum(drvSdio_t *d)
  254. {
  255. return 0;
  256. }
  257. __attribute__((weak)) uint32_t drvSdioGetType(drvSdio_t *d)
  258. {
  259. return 0;
  260. }
  261. __attribute__((weak)) bool drvSdioWrite(drvSdio_t *d, uint32_t nr, const void *buf, uint32_t size)
  262. {
  263. return FALSE;
  264. }
  265. __attribute__((weak)) bool drvSdioRead(drvSdio_t *d, uint32_t nr, void *buf, uint32_t size)
  266. {
  267. return FALSE;
  268. }
  269. __attribute__((weak)) void drvSdioClose(drvSdio_t *d)
  270. {
  271. }
  272. __attribute__((weak)) void drvSdioDestroy(drvSdio_t *d)
  273. {
  274. }
  275. __attribute__((weak)) bool drvSdioSetClk(drvSdio_t *d,uint32_t freq)
  276. {
  277. return FALSE;
  278. }
  279. #endif
  280. #ifndef CONFIG_QUEC_PROJECT_FEATURE_SPI6_EXT_NOR
  281. uint8_t ql_spi6_clk_div = SPI6_EXT_NOR_FLASH_CLK_166MHZ;
  282. __attribute__((weak)) bool ql_get_spi6_ext_nor_status(void)
  283. {
  284. return false;
  285. }
  286. __attribute__((weak)) void quec_set_spi6_ext_nor_flash_capacity(void)
  287. {
  288. return ;
  289. }
  290. __attribute__((weak)) int ql_spi6_ext_nor_flash_clk_set(uint8_t clk)
  291. {
  292. return 0;
  293. }
  294. __attribute__((weak)) int quec_spi6_ext_nor_flash_mount(bool format_on_fail)
  295. {
  296. return 0;
  297. }
  298. __attribute__((weak)) void quec_boot_spi6_ext_norflash_gpio_init(void)
  299. {
  300. return ;
  301. }
  302. __attribute__((weak)) void quec_boot_get_spi6_ext_norflash_gpio_default_fuction(void)
  303. {
  304. return ;
  305. }
  306. __attribute__((weak)) void quec_boot_spi6_ext_norflash_gpio_deinit(void)
  307. {
  308. return ;
  309. }
  310. __attribute__((weak)) void quec_exec_efs_mkfs_cmd(ql_at_cmd_t *cmd)
  311. {
  312. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  313. return ;
  314. }
  315. __attribute__((weak)) void ql_boot_set_skip_spi6_ext_norflash_init(bool onff)
  316. {
  317. return ;
  318. }
  319. __attribute__((weak)) void quec_spi6_ext_norflash_set_mount_status(bool onff)
  320. {
  321. return ;
  322. }
  323. __attribute__((weak)) bool quec_spi6_ext_norflash_get_mount_status(void)
  324. {
  325. return false;
  326. }
  327. __attribute__((weak)) ql_errcode_spi6_nor_e ql_spi6_ext_nor_flash_sffs_mkfs(void)
  328. {
  329. return QL_SPI6_EXT_NOR_FLASH_NOT_INIT_ERROR;
  330. }
  331. #endif
  332. #ifndef CONFIG_QUEC_PROJECT_FEATURE_SPI4_EXT_NOR_SFFS
  333. __attribute__((weak)) bool quec_spi4_exnsffs_is_mount(void)
  334. {
  335. return false;
  336. }
  337. __attribute__((weak)) void quec_exec_exnsffs_mkfs_cmd(ql_at_cmd_t *cmd)
  338. {
  339. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  340. return ;
  341. }
  342. __attribute__((weak)) ql_spi4_extnsffs_status_e ql_spi4_ext_nor_sffs_is_mount(void)
  343. {
  344. return (ql_spi4_extnsffs_status_e)0;
  345. }
  346. #endif
  347. #ifndef CONFIG_QUEC_PROJECT_FEATURE_FS_NAND_FLASH
  348. __attribute__((weak)) uint32_t ql_nand_total_erase_cnt = 0;
  349. __attribute__((weak)) unsigned int *ql_nand_erase_count_table = NULL;
  350. __attribute__((weak)) unsigned int ql_nand_block_totalnum = 0;
  351. __attribute__((weak)) ql_spi_port_e ql_nand_spi_port = QL_SPI_PORT1;
  352. __attribute__((weak)) ql_nand_ops_t *nand_opt = NULL;
  353. __attribute__((weak)) void quec_exec_nand_mkfs_cmd(ql_at_cmd_t *cmd)
  354. {
  355. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  356. return ;
  357. }
  358. __attribute__((weak)) void quec_exec_nand_mount_cmd(ql_at_cmd_t *cmd)
  359. {
  360. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  361. return ;
  362. }
  363. __attribute__((weak)) bool ql_nand_flash_is_mount(void)
  364. {
  365. return false;
  366. }
  367. #endif
  368. #ifndef CONFIG_QUEC_PROJECT_FEATURE_FS_NOR_FLASH
  369. __attribute__((weak)) void quec_exec_nor_mkfs_cmd(ql_at_cmd_t *cmd)
  370. {
  371. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  372. return ;
  373. }
  374. __attribute__((weak)) void quec_exec_nor_mount_cmd(ql_at_cmd_t *cmd)
  375. {
  376. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  377. return ;
  378. }
  379. #endif
  380. #ifndef CONFIG_QUEC_PROJECT_FEATURE_GNSS
  381. nmeasrc_sentences nmea_handle = {0};
  382. //quec_gps_handle quec_gps_config_param = {0};
  383. __attribute__((weak)) ql_GnssState ql_gnss_state_info_get(void)
  384. {
  385. return GNSS_CLOSE;
  386. }
  387. #endif
  388. //FILE_AT
  389. #ifndef CONFIG_QUEC_PROJECT_FEATURE_FILE_AT
  390. __attribute__((weak)) QuecOSStatus quec_file_task_init(void)
  391. {
  392. QUEC_VIRT_FUNC_LOG("weak name function");
  393. return QUEC_GENERAL_ERROR;
  394. }
  395. __attribute__((weak)) void quec_exec_file_qfmkdir_cmd(ql_at_cmd_t *cmd)
  396. {
  397. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  398. return ;
  399. }
  400. __attribute__((weak)) void quec_exec_file_qfrmdir_cmd(ql_at_cmd_t *cmd)
  401. {
  402. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  403. return ;
  404. }
  405. __attribute__((weak)) void quec_exec_qfupl_cmd(ql_at_cmd_t *cmd)
  406. {
  407. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  408. return ;
  409. }
  410. __attribute__((weak)) void quec_exec_qfopen_cmd(ql_at_cmd_t *cmd)
  411. {
  412. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  413. return ;
  414. }
  415. __attribute__((weak)) void quec_exec_file_qflst_cmd(ql_at_cmd_t *cmd)
  416. {
  417. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  418. return ;
  419. }
  420. __attribute__((weak)) void quec_exec_file_qfdel_cmd(ql_at_cmd_t *cmd)
  421. {
  422. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  423. return ;
  424. }
  425. __attribute__((weak)) void quec_file_qfclose_cmd(ql_at_cmd_t *cmd)
  426. {
  427. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  428. return ;
  429. }
  430. __attribute__((weak)) void quec_exec_file_qfread_cmd(ql_at_cmd_t *cmd)
  431. {
  432. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  433. return ;
  434. }
  435. __attribute__((weak)) void quec_exec_file_qfdwl_cmd(ql_at_cmd_t *cmd)
  436. {
  437. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  438. return ;
  439. }
  440. __attribute__((weak)) void quec_exec_file_qflds_cmd(ql_at_cmd_t *cmd)
  441. {
  442. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  443. return ;
  444. }
  445. __attribute__((weak)) void quec_exec_file_qfwrite_cmd(ql_at_cmd_t *cmd)
  446. {
  447. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  448. return ;
  449. }
  450. __attribute__((weak)) void quec_exec_file_qfseek_cmd(ql_at_cmd_t *cmd)
  451. {
  452. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  453. return ;
  454. }
  455. __attribute__((weak)) void quec_exec_file_qfposition_cmd(ql_at_cmd_t *cmd)
  456. {
  457. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  458. return ;
  459. }
  460. __attribute__((weak)) void quec_exec_file_qftestwr_cmd(ql_at_cmd_t *cmd)
  461. {
  462. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  463. return ;
  464. }
  465. __attribute__((weak)) void quec_exec_file_qftucat_cmd(ql_at_cmd_t *cmd)
  466. {
  467. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  468. return ;
  469. }
  470. #endif /*CONFIG_QUEC_PROJECT_FEATURE_FILE_AT*/
  471. #ifndef CONFIG_QUEC_PROJECT_FEATURE_AUDIO
  472. ql_audio_errcode_e ql_aud_get_ext_codec_cfg(ql_extcodec_info_t *codec_cfg)
  473. {
  474. return QL_AUDIO_UNKNOWN_ERROR;
  475. }
  476. __attribute__((weak)) void ql_audio_start_ring_handler(void)
  477. {
  478. return;
  479. }
  480. __attribute__((weak)) void ql_audio_stop_ring_handler(void)
  481. {
  482. return;
  483. }
  484. __attribute__((weak)) QL_AUD_RING_TYPE_E ql_aud_get_ringtone_type(void)
  485. {
  486. return QL_AUD_RING_NONE;
  487. }
  488. __attribute__((weak)) ql_audio_errcode_e ql_aud_set_ringtone_type(QL_AUD_RING_TYPE_E type)
  489. {
  490. return QL_AUDIO_OPER_NOT_SUPPORTED;
  491. }
  492. __attribute__((weak)) bool ql_aud_nvm_init(void)
  493. {
  494. return -1;
  495. }
  496. __attribute__((weak)) uint8 uinsoc_volume_to_ql_vol(uint8 volume, uint8 *res)
  497. {
  498. return 0;
  499. }
  500. __attribute__((weak)) uint8 ql_volume_to_unisoc_vol(AUDIOHAL_SPK_LEVEL_T volume, uint8 *res)
  501. {
  502. return 0;
  503. }
  504. __attribute__((weak)) ql_audio_errcode_e ql_set_volume(AUDIOHAL_SPK_LEVEL_T vol)
  505. {
  506. return QL_AUDIO_OPER_NOT_SUPPORTED;
  507. }
  508. __attribute__((weak)) ql_audio_errcode_e ql_aud_set_adc_gain(ql_aud_adc_cfg * adc_cfg)
  509. {
  510. return QL_AUDIO_OPER_NOT_SUPPORTED;
  511. }
  512. __attribute__((weak)) ql_audio_errcode_e ql_aud_set_dac_gain(ql_aud_dac_cfg * dac_cfg)
  513. {
  514. return QL_AUDIO_OPER_NOT_SUPPORTED;
  515. }
  516. #endif
  517. #ifndef CONFIG_QUEC_PROJECT_FEATURE_GNSS
  518. __attribute__((weak)) void quec_gnss_pam_cfw_hsl_abort_ind(const ql_event_t *event)
  519. {
  520. return ;
  521. }
  522. __attribute__((weak)) void quec_gnss_pam_cfw_hsl_recovery_ind(const ql_event_t *event)
  523. {
  524. return ;
  525. }
  526. __attribute__((weak)) void quec_gps_config_param_read(void)
  527. {
  528. return ;
  529. }
  530. __attribute__((weak)) bool pamVarIsNullPointer(void *VarPointer)
  531. {
  532. return false;
  533. }
  534. #endif
  535. #ifndef CONFIG_QUEC_PROJECT_FEATURE_USB
  536. __attribute__((weak)) ql_errcode_usb_e ql_set_usb_detect_max_time(uint32_t ms)
  537. {
  538. return QL_USB_SYS_ERROR;
  539. }
  540. __attribute__((weak)) ql_errcode_usb_e ql_usb_set_detmode(ql_usb_detmdoe_t *usb_mode)
  541. {
  542. return QL_USB_SYS_ERROR;
  543. }
  544. __attribute__((weak)) ql_errcode_usb_e ql_usb_get_detmode(ql_usb_detmdoe_t *mode)
  545. {
  546. return QL_USB_SYS_ERROR;
  547. }
  548. __attribute__((weak)) ql_errcode_usb_e ql_usb_hotplug_init(void)
  549. {
  550. return QL_USB_SYS_ERROR;
  551. }
  552. #endif
  553. #ifndef CONFIG_QUEC_PROJECT_FEATURE_FIREWALL_AT
  554. __attribute__((weak)) void at_firewall_qfirewallcfg_cmd_func(ql_at_cmd_t *cmd)
  555. {
  556. quec_atResp(cmd->engine, ATCI_RESULT_CODE_CME_ERROR, CMD_RC_NOTSUPPORT, NULL, 1);
  557. return ;
  558. }
  559. #endif
  560. #ifndef CONFIG_QUEC_PROJECT_FEATURE_USBNET
  561. #include "drv_if_ether.h"
  562. #include "netif.h"
  563. uint8_t g_ecmHostMac[ETH_ALEN];
  564. __attribute__((weak)) int ql_usbnet_read_mac(void)
  565. {
  566. return -1;
  567. }
  568. __attribute__((weak)) bool quec_usbnet_send_osi_event_set_if(quec_netif *net_if, quec_netif *wan_if)
  569. {
  570. return false;
  571. }
  572. #endif
  573. #ifndef CONFIG_AUDIO_CVS_SUPPORT
  574. __attribute__((weak)) int32 CVS_Version_recd(void)
  575. {
  576. return false;
  577. }
  578. __attribute__((weak)) int32 CVS_Version(void)
  579. {
  580. return false;
  581. }
  582. __attribute__((weak)) int32 CVSI_TX_frame(void *CVSI_ptr,int16 *data_in,int16 *data_rf,int16 *data_rx,int16 *data_out,int32 volume)
  583. {
  584. return false;
  585. }
  586. __attribute__((weak)) int32 CVSI_RX_frame(void *CVSI_ptr,int16 *data_in,int16 *data_out,int32 volume)
  587. {
  588. return false;
  589. }
  590. __attribute__((weak)) int32 CVSI_open(void **h_CVSI_ptr,int32 *EX_PARA)
  591. {
  592. return false;
  593. }
  594. __attribute__((weak)) int32 CVSI_close(void **h_CVSI_ptr)
  595. {
  596. return false;
  597. }
  598. __attribute__((weak)) int32 CVSI_open_recd(void **h_CVSI_ptr ,int32 *EX_PARA)
  599. {
  600. return false;
  601. }
  602. __attribute__((weak)) int32 CVSI_RX_frame_recd(void *CVSI_ptr,int16 *data_in,int16 *data_out,int32 volume)
  603. {
  604. return false;
  605. }
  606. __attribute__((weak)) int32 CVSI_close_recd(void **h_CVSI_ptr)
  607. {
  608. return false;
  609. }
  610. __attribute__((weak)) int32 CVSI_para_set(void *CVSI_ptr,int32 *EX_PARA)
  611. {
  612. return false;
  613. }
  614. __attribute__((weak)) int32 CVSI_para_set_recd(void *CVSI_ptr ,int32 *EX_PARA)
  615. {
  616. return false;
  617. }
  618. #endif