SNIC UART Interface library: Serial to Wi-Fi library for Murata TypeYD Wi-Fi module. For more information about TypeYD: http://www.murata.co.jp/products/microwave/module/lbwb1zzydz/index.html
Dependents: SNIC-xively-jumpstart-demo SNIC-FluentLogger-example TCPEchoServer murataDemo ... more
Fork of YDwifiInterface by
YDwifi/YDwifi.h
- Committer:
- kishino
- Date:
- 2014-03-06
- Revision:
- 0:61c402886fbb
- Child:
- 2:0ba43344c814
File content as of revision 0:61c402886fbb:
#ifndef _YD_WIFI_H_
#define _YD_WIFI_H_
#include "mbed.h"
#include "rtos.h"
#include "RawSerial.h"
//#include "CBuffer.h"
/** C_YDwifi class
*/
class C_YDwifi
{
public:
/** Wi-Fi security
*/
typedef enum SECURITY {
e_SEC_OPEN = 0x00,
e_SEC_WEP = 0x01,
e_SEC_WPA_TKIP = 0x02,
e_SEC_WPA2_AES = 0x04,
e_SEC_WPA2_MIXED = 0x06,
e_SEC_WPA_AES = 0x07
}E_SECURITY;
// ----- YDwifi.cpp -----
/** Constructor
* \param tx mbed pin to use for tx line of Serial interface
* \param rx mbed pin to use for rx line of Serial interface
* \param cts mbed pin to use for cts line of Serial interface
* \param rts mbed pin to use for rts line of Serial interface
* \param reset reset pin of the wifi module
* \param alarm alarm pin of the wifi module
* \param baud baud rate of Serial interface
*/
C_YDwifi (PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm, int baud);
int initUart();
static C_YDwifi * getInstance() {
return mInstance_p;
};
Thread *mUartRecvThread_p;
protected:
static C_YDwifi *mInstance_p;
Mutex mUartMutex;
// RawSerial mUart;
Serial mUart;
DigitalInOut mModuleReset;
/* Function */
void uartIntr_callback( void );
static void uartRecvThread( void const *args_p );
};
#endif
muRata

Murata TypeYD