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

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Tue Mar 31 03:16:46 2015 +0000
Parent:
52:29b4d0adddf3
Commit message:
Added default constructor and create() method

Changed in this revision

SNIC_WifiInterface.cpp Show annotated file Show diff for this revision Revisions of this file
SNIC_WifiInterface.h Show annotated file Show diff for this revision Revisions of this file
diff -r 29b4d0adddf3 -r b53ccb9989c4 SNIC_WifiInterface.cpp
--- a/SNIC_WifiInterface.cpp	Tue Mar 31 03:12:35 2015 +0000
+++ b/SNIC_WifiInterface.cpp	Tue Mar 31 03:16:46 2015 +0000
@@ -33,6 +33,16 @@
     mModuleReset = reset;
 }
 
+void C_SNIC_WifiInterface::create( PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm, int baud)
+{
+    mUART_tx     = tx;
+    mUART_rx     = rx;
+    mUART_cts    = cts;
+    mUART_rts    = rts;;
+    mUART_baud   = baud;
+    mModuleReset = reset;
+}
+
 C_SNIC_WifiInterface::~C_SNIC_WifiInterface()
 {
 }
diff -r 29b4d0adddf3 -r b53ccb9989c4 SNIC_WifiInterface.h
--- a/SNIC_WifiInterface.h	Tue Mar 31 03:12:35 2015 +0000
+++ b/SNIC_WifiInterface.h	Tue Mar 31 03:16:46 2015 +0000
@@ -38,6 +38,10 @@
 class C_SNIC_WifiInterface : public C_MurataObject {
 
 public:
+    /** Default constructor
+    */
+    C_SNIC_WifiInterface() {};
+    
     /** 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
@@ -50,7 +54,11 @@
     C_SNIC_WifiInterface(PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 115200);
     virtual ~C_SNIC_WifiInterface();
 
-    /** Initialize the interface.
+    /** Create instance.
+    */
+    void create(PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 115200);
+
+     /** Initialize the interface.
         @return 0 on success, a negative number on failure
     */
     int init();