ql_wifi_net.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /**
  2. @file
  3. ql_wifi_net.h
  4. @brief
  5. Quectel wifi net api header.
  6. */
  7. /*============================================================================
  8. Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
  9. Quectel Wireless Solution Proprietary and Confidential.
  10. =============================================================================*/
  11. /*===========================================================================
  12. EDIT HISTORY FOR MODULE
  13. This section contains comments describing changes made to the module.
  14. Notice that changes are listed in reverse chronological order.
  15. WHEN WHO WHAT, WHERE, WHY
  16. ---------- ------------ ----------------------------------------------------
  17. =============================================================================*/
  18. #ifndef QL_WIFI_NET_H
  19. #define QL_WIFI_NET_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /*========================================================================
  24. * Macro Definition
  25. *========================================================================*/
  26. /*========================================================================
  27. * Enumeration Definition
  28. *========================================================================*/
  29. typedef enum
  30. {
  31. QL_WIFI_NET_SUCCESS = 0,
  32. QL_WIFI_NET_EXECUTE_ERR = 1 | (QL_COMPONENT_LWIP_WIFI << 16),
  33. QL_WIFI_NET_INVALID_PARAM_ERR,
  34. QL_WIFI_NET_TASK_CREATE_ERR,
  35. QL_WIFI_NET_MUTEX_CREATE_ERR,
  36. } ql_wifi_net_errcode_e;
  37. /*========================================================================
  38. * Type Definition
  39. *========================================================================*/
  40. typedef void (*ql_wifi_net_app_notify_cb)(void *ctx);
  41. /*========================================================================
  42. * function Definition
  43. *========================================================================*/
  44. /*****************************************************************
  45. * Function: ql_wifi_net_app_notify_cb_register
  46. *
  47. * Description: Register Wi-Fi APP engine notification from NET engine callback.
  48. *
  49. * Parameters:
  50. * cb [in] Wi-Fi APP engine notification from NET engine callback.
  51. * Once the NET engine parses the corresponding command,the command will be passed to APP engine.
  52. *
  53. * Return:
  54. * 0 success
  55. * other error code
  56. *
  57. *****************************************************************/
  58. ql_wifi_net_errcode_e ql_wifi_net_app_notify_cb_register(ql_wifi_net_app_notify_cb cb);
  59. /*****************************************************************
  60. * Function: ql_wifi_net_init
  61. *
  62. * Description: Initialize Wi-Fi net engine.
  63. *
  64. * Parameters:
  65. * argv [in] No defined yet.
  66. *
  67. * Return:
  68. * 0 success
  69. * other error code
  70. *
  71. *****************************************************************/
  72. ql_wifi_net_errcode_e ql_wifi_net_init(void *argv);
  73. /*****************************************************************
  74. * Function: ql_wifi_net_deint
  75. *
  76. * Description: Deinitialize Wi-Fi net engine.
  77. *
  78. * Parameters:
  79. * argv [in] No defined yet.
  80. *
  81. * Return:
  82. * 0 success
  83. * other error code
  84. *
  85. *****************************************************************/
  86. ql_wifi_net_errcode_e ql_wifi_net_deint(void *argv);
  87. #ifdef __cplusplus
  88. } /*"C" */
  89. #endif
  90. #endif