wlan_cmd.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * File : wlan_cmd.h
  3. * Wi-Fi common commands
  4. * This file is part of RT-Thread RTOS
  5. * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, write to the Free Software Foundation, Inc.,
  19. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  20. *
  21. * Change Logs:
  22. * Date Author Notes
  23. * 2018-06-05 RT-Thread first version
  24. */
  25. #ifndef WLAN_CMD_H__
  26. #define WLAN_CMD_H__
  27. struct netif;
  28. int wifi_get_mode(void);
  29. int wifi_set_mode(int mode);
  30. /* do the wifi default action: read wifi setting and then join or start soft-AP */
  31. int wifi_default(void);
  32. /* setup netif for soft-ap */
  33. int wifi_softap_setup_netif(struct netif *netif);
  34. int wifi_set_setting(const char *ssid, const char *pwd);
  35. #ifdef PKG_USING_CJSON
  36. int wifi_read_cfg(const char *filename);
  37. int wifi_save_cfg(const char *filename);
  38. #endif
  39. /* save wifi setting with default storage file */
  40. int wifi_save_setting(void);
  41. extern struct rt_wlan_info info;
  42. #endif