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:
10:49ffd373066b
Parent:
9:a98b45e766c8
--- a/SNICwifi/SNICwifi.h	Tue Mar 18 01:13:52 2014 +0000
+++ b/SNICwifi/SNICwifi.h	Tue Mar 18 02:57:24 2014 +0000
@@ -10,6 +10,7 @@
 
 namespace murata_wifi
 {
+#define UART_REQUEST_PAYLOAD_MAX 256
 
 #define MEMPOOL_BLOCK_SIZE  2048
 #define MEMPOOL_PAYLOAD_NUM 1
@@ -73,6 +74,19 @@
      */
     void freeCmdBuf( tagMEMPOOL_BLOCK_T *buf_p );
 
+    /** Preparation of the UART command
+        @param cmd_id           UART Command ID
+        @param cmd_sid          UART Command  SubID
+        @param req_buf_p        Pointer of UART request buffer
+        @param req_buf_len      Length of UART request buffer
+        @param response_buf_p   Pointer of UART response buffer
+        @param command_p        Pointer of UART command[output]
+        @return Length of UART command.
+    */
+    unsigned int preparationSendCommand( unsigned char cmd_id, unsigned char cmd_sid
+                                , unsigned char *req_buf_p,    unsigned int req_buf_len
+                                , unsigned char *response_buf_p, unsigned char *command_p );
+
 protected:
     /** GEN_FW_VER_GET_REQ Command */
     typedef struct 
@@ -139,11 +153,11 @@
     }tagWIFI_SCAN_REQ_T;
 
     static C_SNICwifi     *mInstance_p;
-    Thread              *mUartRecvThread_p;
-    Mutex               mUartMutex;
+    Thread                *mUartRecvThread_p;
+    Mutex                 mUartMutex;
 //    DigitalInOut        mModuleReset;
     C_SNICwifiUartCommand mUartCommand;
-    RawSerial           mUart;
+    RawSerial             mUart;
     
     /** Constructor
      * \param tx mbed pin to use for tx line of Serial interface