esp_modem_compat.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright 2019 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #pragma once
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #include "lwip/ip.h"
  19. /**
  20. * @brief ESP Modem Event backward compatible version
  21. */
  22. typedef enum {
  23. MODEM_EVENT_PPP_START = 0x100,
  24. MODEM_EVENT_PPP_CONNECT = 0x101,
  25. MODEM_EVENT_PPP_DISCONNECT = 0x102,
  26. MODEM_EVENT_PPP_STOP = 0x103,
  27. MODEM_EVENT_UNKNOWN = 0x104,
  28. } esp_modem_compat_event_t;
  29. /**
  30. * @brief PPPoS Client IP Information backward compatible version
  31. *
  32. */
  33. typedef struct {
  34. ip4_addr_t ip; /*!< IP Address */
  35. ip4_addr_t netmask; /*!< Net Mask */
  36. ip4_addr_t gw; /*!< Gateway */
  37. ip4_addr_t ns1; /*!< Name Server1 */
  38. ip4_addr_t ns2; /*!< Name Server2 */
  39. } ppp_client_ip_info_t;
  40. /**
  41. * @brief Backward compatible version of esp_modem_set_event_handler()
  42. */
  43. esp_err_t esp_modem_add_event_handler(modem_dte_t *dte, esp_event_handler_t handler, void *handler_args) __attribute__ ((deprecated));
  44. /**
  45. * @brief Backward compatible version of creating esp-netif(PPP) and attaching to esp_modem_start_ppp()
  46. */
  47. esp_err_t esp_modem_setup_ppp(modem_dte_t *dte) __attribute__ ((deprecated));
  48. /**
  49. * @brief Backward compatible version of deleting esp-netif and esp_modem_stop_ppp()
  50. */
  51. esp_err_t esp_modem_exit_ppp(modem_dte_t *dte) __attribute__ ((deprecated));
  52. #ifdef __cplusplus
  53. }
  54. #endif