_Very_ simple wrapper to a WiFly module connected via serial port.
Embed:
(wiki syntax)
Show/hide line numbers
wifly.h
00001 /** 00002 * Wrapper for the WiFly module, using the serial port. 00003 * 00004 * Copyright 2010 Pulse-Robotics, Inc. 00005 * John Sosoka, Tyler Wilson 00006 */ 00007 00008 #ifndef __wifly_h__ 00009 #define __wifly_h__ 00010 00011 #include "mbed.h" 00012 00013 00014 class WiFly { 00015 00016 public: 00017 /** Create a WiFly object connected to the specified serial pins 00018 * 00019 * @param tx TX pin of the Serial port 00020 * @param rx RX pin of the Serial port 00021 */ 00022 WiFly(PinName tx, PinName rx); 00023 00024 void commandMode() const; 00025 void dataMode() const; 00026 00027 // Serial methods. Could also derive from Serial... 00028 void baud(int baudrate=9600); 00029 int getc(); 00030 void putc(int c); 00031 int readable(); 00032 00033 private: 00034 Serial* port; 00035 }; 00036 00037 00038 #endif /* __wifly_h__ */
Generated on Sun Jul 17 2022 22:34:36 by 1.7.2