SNIC UART Interface library: Serial to Wi-Fi library for Murata TypeYD Wi-Fi module. For more information about TypeYD: http://www.murata.co.jp/products/microwave/module/lbwb1zzydz/index.html

Dependents:   SNIC-xively-jumpstart-demo SNIC-FluentLogger-example TCPEchoServer murataDemo ... more

Fork of YDwifiInterface by Takao Kishino

Revision:
4:99cc93fe7d88
Parent:
3:9f90024d7fb2
Child:
5:ef3befe3edad
--- a/YDwifi/YDwifi.h	Thu Mar 13 01:34:56 2014 +0000
+++ b/YDwifi/YDwifi.h	Thu Mar 13 03:38:25 2014 +0000
@@ -43,33 +43,6 @@
         e_ADHOC = 1
     }E_NETWORK_TYPE;
 
-    // ----- YDwifi.cpp -----
-    /** Constructor
-     * \param tx mbed pin to use for tx line of Serial interface
-     * \param rx mbed pin to use for rx line of Serial interface
-     * \param cts mbed pin to use for cts line of Serial interface
-     * \param rts mbed pin to use for rts line of Serial interface
-     * \param reset reset pin of the wifi module
-     * \param alarm alarm pin of the wifi module
-     * \param baud baud rate of Serial interface
-     */
-    C_YDwifi (PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm, int baud);
-
-    int initUart();
-
-    static C_YDwifi * getInstance() {
-        return mInstance_p;
-    };
-    Thread          *mUartRecvThread_p;
-
-    /** Send data to UART
-        @param len  Length of send data
-        @param data Pointer of send data
-        @return 0:success/other:fail
-    */
-    int sendUart( unsigned int len, unsigned char *data );
-
-    
 protected:
     /** GEN_FW_VER_GET_REQ Command */
     typedef struct 
@@ -97,13 +70,41 @@
         unsigned char ssid[SSID_MAX_LENGTH+1];
     }tagWIFI_SCAN_REQ_T;
 
-    static C_YDwifi *mInstance_p;
-    
+    static C_YDwifi     *mInstance_p;
+    Thread              *mUartRecvThread_p;
     Mutex               mUartMutex;
     DigitalInOut        mModuleReset;
     C_YDwifiUartCommand mUartCommand;
     RawSerial           mUart;
     
+    /** Constructor
+     * \param tx mbed pin to use for tx line of Serial interface
+     * \param rx mbed pin to use for rx line of Serial interface
+     * \param cts mbed pin to use for cts line of Serial interface
+     * \param rts mbed pin to use for rts line of Serial interface
+     * \param reset reset pin of the wifi module
+     * \param alarm alarm pin of the wifi module
+     * \param baud baud rate of Serial interface
+     */
+    C_YDwifi (PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm, int baud);
+
+    /** Initialize UART
+    */
+    int initUart();
+
+    static C_YDwifi * getInstance() {
+        return mInstance_p;
+    };
+
+    /** Send data to UART
+        @param len  Length of send data
+        @param data Pointer of send data
+        @return 0:success/other:fail
+    */
+    int sendUart( unsigned int len, unsigned char *data );
+
+    /** Receiving thread of UART
+    */
     static void uartRecvThread( void const *args_p );
     
 };