espconn_udp.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef __ESPCONN_UDP_H__
  2. #define __ESPCONN_UDP_H__
  3. #ifndef ESPCONN_UDP_DEBUG
  4. #define ESPCONN_UDP_DEBUG LWIP_DBG_OFF
  5. #endif
  6. #include "lwip/app/espconn.h"
  7. /******************************************************************************
  8. * FunctionName : espconn_udp_client
  9. * Description : Initialize the client: set up a PCB and bind it to the port
  10. * Parameters : pespconn -- the espconn used to build client
  11. * Returns : none
  12. *******************************************************************************/
  13. extern sint8 espconn_udp_client(struct espconn *pespconn);
  14. /******************************************************************************
  15. * FunctionName : espconn_udp_disconnect
  16. * Description : A new incoming connection has been disconnected.
  17. * Parameters : espconn -- the espconn used to disconnect with host
  18. * Returns : none
  19. *******************************************************************************/
  20. extern void espconn_udp_disconnect(espconn_msg *pdiscon);
  21. /******************************************************************************
  22. * FunctionName : espconn_udp_server
  23. * Description : Initialize the server: set up a PCB and bind it to the port
  24. * Parameters : pespconn -- the espconn used to build server
  25. * Returns : none
  26. *******************************************************************************/
  27. extern sint8 espconn_udp_server(struct espconn *espconn);
  28. /******************************************************************************
  29. * FunctionName : espconn_udp_sent
  30. * Description : sent data for client or server
  31. * Parameters : void *arg -- client or server to send
  32. * uint8* psent -- Data to send
  33. * uint16 length -- Length of data to send
  34. * Returns : none
  35. *******************************************************************************/
  36. extern void espconn_udp_sent(void *arg, uint8 *psent, uint16 length);
  37. #endif /* __ESPCONN_UDP_H__ */