common.h 2.3 KB

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