private fork
Fork of GSwifiInterface by
GSwifiInterface.cpp
- Committer:
- gsfan
- Date:
- 2013-03-11
- Revision:
- 7:f94c59d0c735
- Parent:
- 5:78943b3945b5
File content as of revision 7:f94c59d0c735:
/* Copyright (C) 2013 gsfan, MIT License * port to the GainSpan Wi-FI module GS1011 */ #include "GSwifiInterface.h" GSwifiInterface::GSwifiInterface( PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, const char * ssid, const char * phrase, Security sec) : GSwifi(tx, rx, cts, rts, reset, ssid, phrase, sec) { } int GSwifiInterface::init() { _state.dhcp = true; return 0; } int GSwifiInterface::init(const char* ip, const char* mask, const char* gateway) { _state.dhcp = false; strncpy(_ip, ip, sizeof(_ip)); strncpy(_netmask, mask, sizeof(_netmask)); strncpy(_gateway, gateway, sizeof(_gateway)); return 0; } int GSwifiInterface::connect() { return join(); } int GSwifiInterface::disconnect() { return GSwifi::disconnect(); } char * GSwifiInterface::getIPAddress() { return _ip; } char * GSwifiInterface::getMACAddress() { return _mac; }