Marco Hsu / WIFI_API_32kRAM
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WIFIDevice.h Source File

WIFIDevice.h

00001 #ifndef WIFIDEVICE_H_
00002 #define WIFIDEVICE_H_
00003 
00004 #include "nmi_wlan_if.h"
00005 #include "nmi_wlan.h"
00006 
00007  /** Interface using WI-FI to connect to Ethernet
00008  *
00009  */
00010 class WIFIDevice {
00011 public:
00012 
00013   /** Set WIFI in sleep mode.
00014   * Disable WIFI and set into sleep mode to conserve energy (no WIFI function is available at this point).
00015   * \return 0 on success, a negative number on failure
00016   */
00017   int sleep(void);
00018 
00019   /** Set the position of embedded RF switch.
00020   * Set the position of RF switch between WIFI and BLE.
00021   * \param position set 1 on WIFI to use, set 0 on BLE to use.
00022   * \return 0 on success, a negative number on failure
00023   */
00024   int setSwitch(int position);
00025   
00026   /** Get the position of embedded RF switch.
00027   * Get the current position of RF switch
00028   * \return get 1 on WIFI to use, get 0 on BLE to use
00029   */
00030   int getSwitch(void);
00031     
00032 //  /** Perform one time WIFI scan.
00033 //  * Scan for available access point on all channels.
00034 //  * \return number of scanned WIFI access point
00035 //  */
00036 //  int oneTimeScan(void);
00037 //
00038 //  /** Get the scanned access point information.
00039 //  * Get the scanned associated access point information table on least oneTimeScan.
00040 //  * \param index query the information of result table in index number [0~19]
00041 //  * \param SSID access point SSID name on query index
00042 //  * \param RSSI access point RSSI (Received Signal Strength Indicator) on query index
00043 //  * \param security access point security type on query index, get 0 on no security, 1 on WEP, 2 on WPA, 3 on WPA2 
00044 //  * \return 0 on success, a negative number on failure when empty
00045 //  */
00046 //  int getScanResult(uint8_t index, uint8_t* SSID, int* RSSI, uint8_t security);
00047     
00048   /** Set network connection in priority.
00049   * Set SSID, password and priority to connect.
00050   * \param SSID name of access point to connect
00051   * \param PW password of the given SSID
00052   * \param priority range from 0 to 2, set 0 for the highest priority
00053   */
00054   void setNetwork(char* SSID, char* PW, uint8_t priority);
00055 
00056 //  /** Get the status of embedded WIFI chipset.
00057 //  * Get the current status of embedded WIFI chipset
00058 //  * \return get 1 on WIFI to use, get 0 on BLE to use
00059 //  */
00060 //  int getStatus(void);
00061   
00062 //  /** Set WIFI output power.
00063 //  * Set WIFI output power level 
00064 //  * \param output power level
00065 //  * \return 0 on success, a negative number on failure
00066 //  */
00067 //  int setTxPower(uint8_t powerIndex);
00068   
00069 };
00070 
00071 //#include "EthernetInterface.h"
00072 
00073 #endif /* WIFIDEVICE_H_ */