Library to use a wifly module: RN 131 C/G
Dependents: RN-XV_simple_server
Revision 5:9890eb81f730, committed 2011-08-12
- Comitter:
- samux
- Date:
- Fri Aug 12 15:12:57 2011 +0000
- Parent:
- 4:06ca04e2e279
- Child:
- 6:f2d3f1528280
- Commit message:
Changed in this revision
Wifly.cpp | Show annotated file Show diff for this revision Revisions of this file |
Wifly.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Wifly.cpp Fri Aug 12 14:46:42 2011 +0000 +++ b/Wifly.cpp Fri Aug 12 15:12:57 2011 +0000 @@ -8,12 +8,12 @@ Wifly::Wifly( PinName tx, PinName rx, PinName _reset, char * ssid, char * phrase, - bool wpa, char * ip, char * netmask, bool dhcp, int baudrate, int bits,Serial::Parity parity, - int stop_bits): wifi(tx, rx), reset_pin(_reset) + bool wpa, char * ip, char * netmask, bool dhcp, int baudrate): + wifi(tx, rx), reset_pin(_reset) { wifi.baud(baudrate); reset_pin = 1; - wifi.format(bits, parity, stop_bits); + wifi.format(8, Serial::None, 1); this->wpa = wpa; this->phrase = phrase; this->ssid = ssid; @@ -28,11 +28,12 @@ Wifly::Wifly( PinName tx, PinName rx, PinName _reset, char * ssid, char * ip, char * netmask, int channel, - int baudrate, int bits,Serial::Parity parity,int stop_bits): wifi(tx, rx), reset_pin(_reset) + int baudrate): + wifi(tx, rx), reset_pin(_reset) { wifi.baud(baudrate); reset_pin = 1; - wifi.format(bits, parity, stop_bits); + wifi.format(8, Serial::None, 1); adhoc = true; this->ssid = ssid; this->ip = ip;
--- a/Wifly.h Fri Aug 12 14:46:42 2011 +0000 +++ b/Wifly.h Fri Aug 12 15:12:57 2011 +0000 @@ -74,13 +74,9 @@ * @param ip ip of the wifi module (default: NULL) * @param netmask netmask (default: NULL) * @param baudrate speed of the communication (default: 9600) - * @param bits number of bits for the communication (default: 8) - * @param parity parity used for the communication (default: Serial::None) - * @param stop_bits number of stop bits (default: 1) */ Wifly( PinName tx, PinName rx, PinName reset, char * ssid, char * phrase, bool wpa, - char * ip = NULL, char * netmask = NULL, bool dhcp = true, int baudrate = 9600, int bits = 8, - Serial::Parity parity = Serial::None, int stop_bits = 1); + char * ip = NULL, char * netmask = NULL, bool dhcp = true, int baudrate = 9600); @@ -94,13 +90,9 @@ * @param netmask netmask (default: "255.255.0.0") * @param channelchannel (default: "1") * @param baudrate speed of the communication (default: 9600) - * @param bits number of bits for the communication (default: 8) - * @param parity parity used for the communication (default: Serial::None) - * @param stop_bits number of stop bits (default: 1) */ Wifly( PinName tx, PinName rx, PinName reset, char * ssid, char * ip = "169.254.1.1", - char * netmask = "255.255.0.0", int channel = 1, int baudrate = 9600, int bits = 8, - Serial::Parity parity = Serial::None, int stop_bits = 1); + char * netmask = "255.255.0.0", int channel = 1, int baudrate = 9600); /** * Send a string to the wifi module by serial port