RC
Dependents: WizFi250_AP_HelloWorld
Fork of WizFi250Interface by
Diff: WizFi250/WizFi250.cpp
- Revision:
- 14:1f5121c5efcd
- Parent:
- 13:0b8e51d3c0e8
- Child:
- 15:8044670e2995
diff -r 0b8e51d3c0e8 -r 1f5121c5efcd WizFi250/WizFi250.cpp --- a/WizFi250/WizFi250.cpp Fri Jun 26 04:19:01 2015 +0000 +++ b/WizFi250/WizFi250.cpp Tue Jul 14 06:53:34 2015 +0000 @@ -52,12 +52,18 @@ cmdAT(); } -int WizFi250::join() +int WizFi250::join(WiFiMode mode) { char sec[10]; - _state.wm = WM_STATION; if( cmdMMAC() ) return -1; + + if(mode == WM_AP) + _state.wm = WM_AP; + else + _state.wm = WM_STATION; + + if ( cmdWNET(_state.dhcp) ) return -1; if ( cmdWSET(_state.wm, _state.ssid) ) return -1; switch (_state.sec)