SNIC UART Interface library for Murata Type-YD module

Dependents:   WebSocketServerTest

Fork of SNICInterface_mod by Toyomasa Watarai

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Sun Mar 22 14:13:10 2015 +0000
Parent:
49:5a5cae02bdf0
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
--- a/SNIC_WifiInterface.cpp	Sat Jan 31 13:41:56 2015 +0000
+++ b/SNIC_WifiInterface.cpp	Sun Mar 22 14:13:10 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()
 {
 }
--- a/SNIC_WifiInterface.h	Sat Jan 31 13:41:56 2015 +0000
+++ b/SNIC_WifiInterface.h	Sun Mar 22 14:13:10 2015 +0000
@@ -47,9 +47,14 @@
         @param alarm alarm pin of the wifi module (default: NC)
         @param baud baud rate of Serial interface (default: 115200)
     */
+    C_SNIC_WifiInterface() {};
     C_SNIC_WifiInterface(PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 115200);
     virtual ~C_SNIC_WifiInterface();
 
+    /** 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
     */