RC

Dependents:   WizFi250_AP_HelloWorld

Fork of WizFi250Interface by DongEun Koak

Revision:
6:e149bf87a1bd
Parent:
4:085e7efeae47
Child:
7:ba28fe711055
diff -r 8a0702aa91e3 -r e149bf87a1bd WizFi250/WizFi250.cpp
--- a/WizFi250/WizFi250.cpp	Fri Nov 14 15:14:56 2014 +0900
+++ b/WizFi250/WizFi250.cpp	Fri Nov 14 15:22:27 2014 +0900
@@ -26,8 +26,8 @@
 WizFi250 * WizFi250::_inst;
 
 
-WizFi250::WizFi250(PinName tx,PinName rx,PinName cts, PinName rts,PinName reset, PinName alarm, int baud):
-    _wizfi(tx,rx), _reset(reset), _debug(USBTX, USBRX)
+WizFi250::WizFi250(PinName tx,PinName rx,PinName cts, PinName rts,PinName reset, PinName alarm, int baud, mbed::Serial *debug):
+    _wizfi(tx,rx), _reset(reset)
 {
     _inst = this;
     memset(&_state, 0, sizeof(_state));
@@ -36,7 +36,17 @@
     _state.cid = -1;
     _state.buf = new CircBuffer<char>(CFG_DATA_SIZE);
 
-    setReset(true);
+    if(debug == NULL)
+    {
+    	_debug = new Serial(USBTX,USBRX);
+    	_debug->baud(baud);
+    }
+    else
+    {
+    	_debug = debug;
+    	_debug->baud(baud);
+    }
+
     initUart(cts, rts, alarm, baud);
     wait_ms(300);
     setReset(false);