GSwifiInterface library (interface for GainSpan Wi-Fi GS1011 modules) Please see https://mbed.org/users/gsfan/notebook/GSwifiInterface/

Dependents:   GSwifiInterface_HelloWorld GSwifiInterface_HelloServo GSwifiInterface_UDPEchoServer GSwifiInterface_UDPEchoClient ... more

Fork of WiflyInterface by mbed official

GainSpan Wi-Fi library

The GS1011/GS2100 is an ultra low power 802.11b wireless module from GainSpan.

mbed RTOS supported.

/media/uploads/gsfan/gs_im_002.jpg /media/uploads/gsfan/gs1011m_2.jpg

ゲインスパン Wi-Fi モジュール ライブラリ

ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011/GS2100 シリーズ用のライブラリです。

mbed RTOS に対応しています。(mbed2.0)

Revision:
22:d25a5a0d2497
Parent:
19:d035412a7803
--- a/GSwifi/GSwifi.h	Thu Jun 05 06:12:59 2014 +0000
+++ b/GSwifi/GSwifi.h	Tue Sep 24 06:24:37 2019 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013 gsfan, MIT License
+/* Copyright (C) 2019 gsfan, MIT License
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
  * and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -17,13 +17,14 @@
  *
  * @section DESCRIPTION
  *
- * GainSpan GS1011, Wi-Fi module
+ * GainSpan (Telit) GS1011, GS2000, GS2100 Wi-Fi module
  *
+ *   https://www.telit.com/m2m-iot-products/wifi-bluetooth-modules/
  *   http://www.gainspan.com/modules
  */
 /** @file
- * @brief Gainspan wi-fi module library for mbed
- * GS1011MIC, GS1011MIP, GainSpan WiFi Breakout, etc.
+ * @brief GainSpan (Telit) wi-fi module library for mbed
+ * GS1011MIC, GS1011MIP, GS2100MIP, GainSpan WiFi Breakout, etc.
  */
 
 #ifndef GSwifi_H
@@ -147,7 +148,13 @@
      * \param alarm alarm pin of the wifi module (default NULL)
      * \param baud baud rate of Serial interface (default 9600)
      */
+#ifdef CFG_SPI_DATAINTERFACE
+    GSwifi (PinName tx, PinName rx, PinName cts, PinName rts, PinName reset,
+      PinName mosi, PinName miso, PinName sclk, PinName cs, PinName wake,
+      PinName alarm = NC, int baud = 9600, int freq = 2000000);
+#else
     GSwifi (PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 9600);
+#endif
 
     /** Connect the wifi module to the ssid contained in the constructor.
      * @param sec Security type (NONE, WEP_128 or WPA)
@@ -437,6 +444,11 @@
 
 //    Serial _gs;
     RawSerial _gs;
+#ifdef CFG_SPI_DATAINTERFACE
+    SPI _spi;
+    InterruptIn _wake;
+    Mutex _mutexSpi;
+#endif
     int _baud;
     DigitalIn *_cts;
     DigitalOut *_rts;
@@ -469,7 +481,7 @@
         bool dhcp;
         time_t time;
 
-        bool initialized;
+        bool initialized, datainterface;
         bool associated;
         volatile Mode mode;
         volatile Status status;
@@ -608,6 +620,7 @@
     void msgReset (const char*);
     void msgOutofStandby (const char*);
     void msgOutofDeepsleep (const char*);
+    void msgDataInterfaceReady (const char*);
     void resNormal (const char*);
     void resConnect (const char*);
     void resWpapsk (const char *buf);
@@ -680,6 +693,13 @@
     int lockUart (int ms);
     void unlockUart ();
     void initUart (PinName cts, PinName rts, PinName alarm, int baud);
+#ifdef CFG_SPI_DATAINTERFACE
+    void isrSpi ();
+    void putSpi (char c);
+    int lockSpi (int ms);
+    void unlockSpi ();
+    void initSpi (PinName cs, int freq);
+#endif
 
 };