common.h.bak 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef __COMMON_H__
  2. #define __COMMON_H__
  3. #include "sys.h"
  4. #include "usart.h"
  5. #include "delay.h"
  6. #include "led.h"
  7. #include "string.h"
  8. #include "text.h"
  9. #include "ff.h"
  10. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  11. //本程序只供学习使用,未经作者许可,不得用于其它任何用途
  12. //ALIENTEK STM32开发板
  13. //ATK-ESP8266 WIFI模块 公用驱动代码
  14. //正点原子@ALIENTEK
  15. //技术论坛:www.openedv.com
  16. //修改日期:2014/4/3
  17. //版本:V1.0
  18. //版权所有,盗版必究。
  19. //Copyright(C) 广州市星翼电子科技有限公司 2009-2019
  20. //All rights reserved
  21. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  22. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  23. void atk_8266_init(void);
  24. u8 atk_8266_mode_cofig(u8 netpro);
  25. void atk_8266_at_response(u8 mode);
  26. u8* atk_8266_check_cmd(u8 *str);
  27. u8 atk_8266_apsta_check(void);
  28. u8 atk_8266_send_data(u8 *data,u8 *ack,u16 waittime);
  29. u8 atk_8266_send_cmd(u8 *cmd,u8 *ack,u16 waittime);
  30. u8 atk_8266_quit_trans(void);
  31. u8 atk_8266_consta_check(void);
  32. void atk_8266_load_keyboard(u16 x,u16 y);
  33. void atk_8266_key_staset(u16 x,u16 y,u8 keyx,u8 sta);
  34. u8 atk_8266_get_keynum(u16 x,u16 y);
  35. void atk_8266_get_wanip(u8* ipbuf);
  36. void atk_8266_get_ip(u8 x,u8 y);
  37. void atk_8266_msg_show(u16 x,u16 y,u8 wanip);
  38. void atk_8266_wificonf_show(u16 x,u16 y,u8* rmd,u8* ssid,u8* encryption,u8* password);
  39. u8 atk_8266_netpro_sel(u16 x,u16 y,u8* name);
  40. void atk_8266_mtest_ui(u16 x,u16 y);
  41. u8 atk_8266_ip_set(u8* title,u8* mode,u8* port,u8* ip);
  42. void atk_8266_test(void);
  43. u8 atk_8266_apsta_test(void); //WIFI AP+STA模式测试
  44. u8 atk_8266_wifista_test(void); //WIFI STA测试
  45. u8 atk_8266_wifiap_test(void); //WIFI AP测试
  46. //用户配置参数
  47. extern const u8* portnum; //连接端口
  48. extern const u8* wifista_ssid; //WIFI STA SSID
  49. extern const u8* wifista_encryption;//WIFI STA 加密方式
  50. extern const u8* wifista_password; //WIFI STA 密码
  51. extern const u8* wifiap_ssid; //WIFI AP SSID
  52. extern const u8* wifiap_encryption; //WIFI AP 加密方式
  53. extern const u8* wifiap_password; //WIFI AP 密码
  54. extern u8* kbd_fn_tbl[2];
  55. extern const u8* ATK_ESP8266_CWMODE_TBL[3];
  56. extern const u8* ATK_ESP8266_WORKMODE_TBL[3];
  57. extern const u8* ATK_ESP8266_ECN_TBL[5];
  58. #endif