Driver for CC3000 Wi-Fi module

Dependencies:   NVIC_set_all_priorities

Dependents:   CC3000_Simple_Socket Wi-Go_IOT_Demo

Information

The current code has been reworked to a full object oriented application and contains an mbed socket compatible API.

CC3000 Wi-Fi module library

Info

This is the low level driver for TI's SimpleLink CC3000 device.
Port from Avnet's Wi-Go KEIL code (based on TI's CC3000 code).
Special thanks to Jim Carver from Avnet for providing the Wi-Go board and for his assistance.

Differences with TI's original code

The code functionality stays exactly the same.
In order to make it easier to use the code, following changes were made :

  • Addition of a tool to shift all IRQ priorities to a lower level since it is very important to keep the SPI handler at the highest system priority, the WLAN interrupt the second highest and all other system interrupts at a lower priority, so their handlers can be preempted by the CC3000 interrupts.
  • Addition of low level I/O controls and conditional compiler controls in cc3000_common.h.
  • CC3000 initialisation, pin declarations, SPI and WLAN irq priorities are set in Init_HostDriver , we need to call this function at the start of the main function.
  • The SPI and HCI code are joined into one file.
  • The include list has been rearranged - Only #include "wlan.h" is needed in the user API.
  • Part of the CC3000's user eeprom memory is used to store additional info (52 bytes in NVMEM_USER_FILE_1):
# bytesDescriptionInfo
1First time config parameterUseful when connecting
2Firmware updater versionused with the Firmware update tool
2Service Pack versionused with the Firmware update tool
3Driver Versionused with the Firmware update tool
3Firmware Versionused with the Firmware update tool
1CIK validation (Client Interface Key)
40CIK data (Client Interface Key)used with the exosite

Using the Library

A user API is needed to access the CC3000 functions.
Examples:

Using the library with other processors

cc3000_common.cpp loads the irq tool for all targets:
All current mbed targets are supported by this library.

#include "NVIC_set_all_priorities.h"


All low level settings that need to change are available in cc3000_common.h

//*****************************************************************************
//              PIN CONTROLS & COMPILE CONTROLS
//*****************************************************************************
// Compiler control
#define CC3000_UNENCRYPTED_SMART_CONFIG   // No encryption
//#define CC3000_TINY_DRIVER                // Driver for small memory model CPUs

//Interrupt controls
#define NVIC_ALL_IRQ        NVIC_set_all_irq_priorities(3);         // Set ALL interrupt priorities to level 3
#define NVIC_SPI_IRQ        NVIC_SetPriority(SPI0_IRQn, 0x0);       // Wi-Fi SPI interrupt must be higher priority than SysTick
#define NVIC_PORT_IRQ       NVIC_SetPriority(PORTA_IRQn, 0x1);
#define NVIC_SYSTICK_IRQ    NVIC_SetPriority(SysTick_IRQn, 0x2);    // SysTick set to lower priority than Wi-Fi SPI bus interrupt
//#define NVIC_ADC_IRQ        NVIC_SetPriority(ADC0_IRQn, 0x3);       // ADC is the lowest of all

// Wlan controls
#define WLAN_ISF_PCR        PORTA->PCR[16]
#define WLAN_ISF_ISFR       PORTA->ISFR
#define WLAN_ISF_MASK       (1<<16)

#define WLAN_ASSERT_CS      wlan_cs = 0;   //CS : active low
#define WLAN_DEASSERT_CS    wlan_cs = 1;

#define WLAN_ASSERT_EN      wlan_en = 1;   //EN : active high
#define WLAN_DEASSERT_EN    wlan_en = 0;

#define WLAN_READ_IRQ       wlan_int

#define WLAN_ENABLE_IRQ     wlan_int.fall(&WLAN_IRQHandler);
#define WLAN_DISABLE_IRQ    wlan_int.fall(NULL);

#define WLAN_IRQ_PIN_CREATE         InterruptIn wlan_int (PTA16);
#define WLAN_EN_PIN_CREATE          DigitalOut  wlan_en  (PTA13);
#define WLAN_CS_PIN_CREATE          DigitalOut  wlan_cs  (PTD0);
#define WLAN_SPI_PORT_CREATE        SPI wlan(PTD2, PTD3, PTC5); // mosi, miso, sclk

#define WLAN_SPI_PORT_INIT          wlan.format(8,1);
#define WLAN_SPI_SET_FREQ           wlan.frequency(12000000);
#define WLAN_SPI_SET_IRQ_HANDLER    wlan_int.fall(&WLAN_IRQHandler);

#define WLAN_SPI_WRITE              wlan.write(*data++);
#define WLAN_SPI_READ               wlan.write(0x03);          // !! DO NOT MODIFY the 0x03 parameter (CC3000 will not respond).

API documentation

Due to a little problem with the links on the mbed site, the API documentation is not directly accessible (will be solved in a next release).
Currently, it is only accessible by adding modules.html to the API doc link: http://mbed.org/users/frankvnk/code/CC3000_Hostdriver/docs/tip/modules.html

Files at this revision

API Documentation at this revision

Comitter:
frankvnk
Date:
Mon Jul 15 19:54:53 2013 +0000
Parent:
4:d8255a5aad46
Child:
6:d733efcc2c56
Commit message:
Doxygen fixed

Changed in this revision

CC3000_spi.h Show annotated file Show diff for this revision Revisions of this file
cc3000.h Show annotated file Show diff for this revision Revisions of this file
cc3000_common.h Show annotated file Show diff for this revision Revisions of this file
evnt_handler.h Show annotated file Show diff for this revision Revisions of this file
hci.h Show annotated file Show diff for this revision Revisions of this file
netapp.h Show annotated file Show diff for this revision Revisions of this file
nvmem.h Show annotated file Show diff for this revision Revisions of this file
security.h Show annotated file Show diff for this revision Revisions of this file
socket.h Show annotated file Show diff for this revision Revisions of this file
wlan.h Show annotated file Show diff for this revision Revisions of this file
--- a/CC3000_spi.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/CC3000_spi.h	Mon Jul 15 19:54:53 2013 +0000
@@ -40,6 +40,13 @@
 #include "GlobalAssigns.h"
 #include "hci.h"
 
+//*****************************************************************************
+//
+//! \addtogroup CC3000_spi
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 SPI library
 *
 */
@@ -171,9 +178,9 @@
 extern long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength);
 
 /**
-* SPI interrupt Handler
-* The external WLAN device asserts the IRQ line when data is ready.
-* The host CPU needs to acknowledges the IRQ by asserting CS.
+* SPI interrupt Handler.
+* The external WLAN device asserts the IRQ line when data is ready.\n
+* The host CPU needs to acknowledges the IRQ by asserting CS.\n
 * @param  none
 * @return none
 */
@@ -183,6 +190,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif
 
 
--- a/cc3000.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/cc3000.h	Mon Jul 15 19:54:53 2013 +0000
@@ -47,6 +47,13 @@
 #include "CC3000_spi.h"
 #include "hci.h"
 
+//*****************************************************************************
+//
+//! \addtogroup cc3000
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Functions
 *
 */
@@ -86,25 +93,27 @@
     CC3000_CLIENT_CONNECTED = 0x20  // CC3000 Client Connected to Server
 };
 
-/**
-*  Returns a pointer to the driver patch: since there is no patch, it returns 0
-*  (the patches are taken from the EEPROM and not from the host)
-*  @param  pointer to the length
-*  @return NULL
+/** Return a pointer to the driver patch.
+* Since there is no patch, 0 is returned\n
+* (the patches are taken from the EEPROM and not from the host)\n
+* @param  pointer to the length
+* @return NULL
 */ 
 char *sendDriverPatch(unsigned long *Length);
 
 /**
-* Returns a pointer to the bootloader patch: since there is no patch, it returns 0 
-* (the patches are taken from the EEPROM and not from the host)
+* Return a pointer to the bootloader patch.
+* since there is no patch, 0 is returned \n
+* (the patches are taken from the EEPROM and not from the host)\n
 * @param  pointer to the length
 * @return NULL
 */
 char *sendBootLoaderPatch(unsigned long *Length);
 
 /**
-* Returns a pointer to the firmware patch: since there is no patch, it returns 0
-* (the patches are taken from the EEPROM and not from the host)
+* Return a pointer to the firmware patch.
+* since there is no patch, 0 is returned\n
+* (the patches are taken from the EEPROM and not from the host)\n
 * @param  pointer to the length
 * @return NULL
 */
@@ -156,16 +165,16 @@
 
 /**
 * parse the FAT table from eeprom 
-* @param[out] is_allocated      array of is_allocated in FAT table (0: not allocated - 1: allocated).
-*                               an allocated entry implies the address and length of the file are valid.
-* @param[out] is_valid          array of is_valid in FAT table (0: not valid - 1: valid).
-*                               a valid entry implies the content of the file is relevant.
-* @param[out] write_protected   array of write_protected in FAT table (0: not allocated - 1: allocated).
-*                               a write protected entry implies it is not possible to write into this entry.
-* @param[out] file_address      array of file address in FAT table.
-*                               this is the absolute address of the file in the EEPROM.
-* @param[out] file_length       array of file length in FAT table.
-*                               this is the upper limit of the file size in the EEPROM.
+* @param[out] is_allocated      array of is_allocated in FAT table (0: not allocated - 1: allocated).\n
+*                               an allocated entry implies the address and length of the file are valid.\n
+* @param[out] is_valid          array of is_valid in FAT table (0: not valid - 1: valid).\n
+*                               a valid entry implies the content of the file is relevant.\n
+* @param[out] write_protected   array of write_protected in FAT table (0: not allocated - 1: allocated).\n
+*                               a write protected entry implies it is not possible to write into this entry.\n
+* @param[out] file_address      array of file address in FAT table.\n
+*                               this is the absolute address of the file in the EEPROM.\n
+* @param[out] file_length       array of file length in FAT table.\n
+*                               this is the upper limit of the file size in the EEPROM.\n
 * @return 0 on succes, error otherwise
 */
 unsigned char fat_read_content(unsigned char *is_allocated,
@@ -176,10 +185,10 @@
 
 /**
 * Parse the FAT table from eeprom 
-* @param[in] file_address  array of file address in FAT table.
-*                          this is the absolute address of the file in the EEPROM.
-* @param[in] file_length   array of file length in FAT table.
-*                          this is the upper limit of the file size in the EEPROM.
+* @param[in] file_address  array of file address in FAT table.\n
+*                          this is the absolute address of the file in the EEPROM.\n
+* @param[in] file_length   array of file length in FAT table.\n
+*                          this is the upper limit of the file size in the EEPROM.\n
 * @return 0 on succes, error otherwise
 */
 unsigned char fat_write_content(unsigned short const *file_address, unsigned short const *file_length);
@@ -215,6 +224,12 @@
 
 tNetappIpconfigRetArgs * getCC3000Info(void);
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
 
 #endif
 
--- a/cc3000_common.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/cc3000_common.h	Mon Jul 15 19:54:53 2013 +0000
@@ -37,6 +37,12 @@
 
 #include <errno.h>
 
+//*****************************************************************************
+//
+//! \addtogroup cc3000_common
+//! @{
+//
+//*****************************************************************************
 /** CC3000 Host driver - common
 *
 */
@@ -260,6 +266,13 @@
 #ifdef  __cplusplus
 }
 #endif // __cplusplus
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
 
 #endif // __COMMON_H__
 
+
--- a/evnt_handler.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/evnt_handler.h	Mon Jul 15 19:54:53 2013 +0000
@@ -42,6 +42,13 @@
 #include "netapp.h"
 #include "CC3000_spi.h"
 
+//*****************************************************************************
+//
+//! \addtogroup evnt_handler
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Host driver - event handler
 *
 */
@@ -111,7 +118,7 @@
 //
 //*****************************************************************************
 
-/** Handle unsolicited event from type patch request
+/** Handle unsolicited event from type patch request.
 * @param  event_hdr  event header
 * @return none
 */
@@ -119,7 +126,7 @@
 
 
 /**
-* Parse the incoming event packets and issue corresponding event handler from global array of handlers pointers
+* Parse the incoming event packets and issue corresponding event handler from global array of handlers pointers.
 * @param  pRetParams     incoming data buffer
 * @param  from           from information (in case of data received)
 * @param  fromlen        from information length (in case of data received)
@@ -128,7 +135,7 @@
 extern unsigned char *hci_event_handler(void *pRetParams, unsigned char *from, unsigned char *fromlen);
 
 /**
-* Handle unsolicited events
+* Handle unsolicited events.
 * @param  event_hdr   event header
 * @return             1 if event supported and handled
 * @return             0 if event is not supported
@@ -165,21 +172,21 @@
 
 /**
 * Keep track on the number of packets transmitted and update the number of free buffer in the SL device.
-* Called when unsolicited event = HCI_EVNT_DATA_UNSOL_FREE_BUFF has received.
+* Called when unsolicited event = HCI_EVNT_DATA_UNSOL_FREE_BUFF has received.\n
 * @param  pEvent  pointer to the string contains parameters for IPERF
 * @return         ESUCCESS if successful, EFAIL if an error occurred
 */
 long hci_event_unsol_flowcontrol_handler(char *pEvent);
 
 /**
-* Get the socket status
+* Get the socket status.
 * @param  Sd  Socket IS
 * @return     Current status of the socket.   
 */
 extern long get_socket_active_status(long Sd);
 
 /**
-* Update the socket status
+* Update the socket status.
 * @param      resp_params  Socket IS
 * @return     Current status of the socket.   
 */
@@ -194,7 +201,7 @@
 void SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams);
 
 /**
-* Wait for data, pass it to the hci_event_handler and set the data available flag 
+* Wait for data, pass it to the hci_event_handler and set the data available flag.
 * @param  pBuf       data buffer
 * @param  from       from information
 * @param  fromlen    from information length
@@ -248,6 +255,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif // __EVENT_HANDLER_H__
 
 
--- a/hci.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/hci.h	Mon Jul 15 19:54:53 2013 +0000
@@ -41,6 +41,13 @@
 #include "wlan.h"
 #include "stdlib.h"
 
+//*****************************************************************************
+//
+//! \addtogroup hci
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Host driver - HCI
 *
 */
@@ -287,7 +294,7 @@
 
 
 /**
-* Prepeare HCI header and send HCI patch
+* Prepare HCI header and send HCI patch
 * @param  usOpcode      command operation code
 * @param  pucBuff       pointer to the command's arguments buffer
 * @param  patch         pointer to patch content buffer 
@@ -302,6 +309,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif // __HCI_H__
 
 
--- a/netapp.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/netapp.h	Mon Jul 15 19:54:53 2013 +0000
@@ -41,6 +41,13 @@
 #include "evnt_handler.h"
 #include "nvmem.h"
 
+//*****************************************************************************
+//
+//! \addtogroup netapp
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Host driver - netapp
 *
 */
@@ -96,8 +103,8 @@
 
 /**
 * Configure device MAC address and store it in NVMEM. 
-* The value of the MAC address configured through the API will be
-* stored in CC3000 non volatile memory, thus preserved over resets.
+* The value of the MAC address configured through the API will be\n
+* stored in CC3000 non volatile memory, thus preserved over resets.\n
 * @param  mac   device mac address, 6 bytes. Saved: yes 
 * @return       return on success 0, otherwise error.
 */
@@ -105,62 +112,62 @@
 
 /**
 * Configure the network interface, static or dynamic (DHCP).
-* In order to activate DHCP mode, aucIP, aucSubnetMask, aucDefaultGateway must be 0.
-* The default mode of CC3000 is DHCP mode. The configuration is saved in non volatile memory
-* and thus preserved over resets.
+* In order to activate DHCP mode, aucIP, aucSubnetMask, aucDefaultGateway must be 0.\n
+* The default mode of CC3000 is DHCP mode. The configuration is saved in non volatile memory\n
+* and thus preserved over resets.\n
 * @param  aucIP               device mac address, 6 bytes. Saved: yes 
 * @param  aucSubnetMask       device mac address, 6 bytes. Saved: yes 
 * @param  aucDefaultGateway   device mac address, 6 bytes. Saved: yes 
 * @param  aucDNSServer        device mac address, 6 bytes. Saved: yes 
 * @return       0 on success, otherwise error.
-* @note         If the mode is altered, a reset of CC3000 device is required to apply the changes.
-*               Also note that an asynchronous event of type 'DHCP_EVENT' is generated only when
-*               a connection to the AP was established. This event is generated when an IP address
-*               is allocated either by the DHCP server or by static allocation.
+* @note         If the mode is altered, a reset of CC3000 device is required to apply the changes.\n
+*               Also note that an asynchronous event of type 'DHCP_EVENT' is generated only when\n
+*               a connection to the AP was established. This event is generated when an IP address\n
+*               is allocated either by the DHCP server or by static allocation.\n
 */
 extern long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask,unsigned long *aucDefaultGateway, unsigned long *aucDNSServer);
 
 /**
 * Set new timeout values for DHCP lease timeout, ARP  refresh timeout, keepalive event timeout and socket inactivity timeout 
-* @param  aucDHCP    DHCP lease time request, also impact 
-*                    the DHCP renew timeout.
-*                    Range:               [0-0xffffffff] seconds,
-*                                         0 or 0xffffffff = infinite lease timeout.
-*                    Resolution:          10 seconds.
-*                    Influence:           only after reconnecting to the AP. 
-*                    Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds.
-*                    The parameter is saved into the CC3000 NVMEM. 
-*                    The default value on CC3000 is 14400 seconds.
+* @param  aucDHCP    DHCP lease time request, also impact\n 
+*                    the DHCP renew timeout.\n
+*                    Range:               [0-0xffffffff] seconds,\n
+*                                         0 or 0xffffffff = infinite lease timeout.\n
+*                    Resolution:          10 seconds.\n
+*                    Influence:           only after reconnecting to the AP. \n
+*                    Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds.\n
+*                    The parameter is saved into the CC3000 NVMEM.\n 
+*                    The default value on CC3000 is 14400 seconds.\n
 *
-* @param  aucARP     ARP refresh timeout, if ARP entry is not updated by
-*                    incoming packet, the ARP entry will be  deleted by
-*                    the end of the timeout. 
-*                    Range:               [0-0xffffffff] seconds, 0 = infinite ARP timeout
-*                    Resolution:          10 seconds.
-*                    Influence:           at runtime.
-*                    Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds
-*                    The parameter is saved into the CC3000 NVMEM. 
-*                    The default value on CC3000 is 3600 seconds.
+* @param  aucARP     ARP refresh timeout, if ARP entry is not updated by\n
+*                    incoming packet, the ARP entry will be  deleted by\n
+*                    the end of the timeout. \n
+*                    Range:               [0-0xffffffff] seconds, 0 = infinite ARP timeout\n
+*                    Resolution:          10 seconds.\n
+*                    Influence:           at runtime.\n
+*                    Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds\n
+*                    The parameter is saved into the CC3000 NVMEM.\n 
+*                    The default value on CC3000 is 3600 seconds.\n
 *
-* @param  aucKeepalive   Keepalive event sent by the end of keepalive timeout
-*                        Range:               [0-0xffffffff] seconds, 0 == infinite timeout
-*                        Resolution:          10 seconds.
-*                        Influence:           at runtime.
-*                        Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
-*                        The parameter is saved into the CC3000 NVMEM. 
-*                        The default value on CC3000 is 10 seconds.
+* @param  aucKeepalive   Keepalive event sent by the end of keepalive timeout\n
+*                        Range:               [0-0xffffffff] seconds, 0 == infinite timeout\n
+*                        Resolution:          10 seconds.\n
+*                        Influence:           at runtime.\n
+*                        Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec\n
+*                        The parameter is saved into the CC3000 NVMEM. \n
+*                        The default value on CC3000 is 10 seconds.\n
 *
-* @param  aucInactivity   Socket inactivity timeout, socket timeout is
-*                         refreshed by incoming or outgoing packet, by the
-*                         end of the socket timeout the socket will be closed
-*                         Range:               [0-0xffffffff] sec, 0 == infinite timeout.
-*                         Resolution:          10 seconds.
-*                         Influence:           at runtime.
-*                         Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
-*                         The parameter is saved into the CC3000 NVMEM. 
-*                         The default value on CC3000 is 60 seconds.
+* @param  aucInactivity   Socket inactivity timeout, socket timeout is\n
+*                         refreshed by incoming or outgoing packet, by the\n
+*                         end of the socket timeout the socket will be closed\n
+*                         Range:               [0-0xffffffff] sec, 0 == infinite timeout.\n
+*                         Resolution:          10 seconds.\n
+*                         Influence:           at runtime.\n
+*                         Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec\n
+*                         The parameter is saved into the CC3000 NVMEM.\n 
+*                         The default value on CC3000 is 60 seconds.\n
 *
-* @return 0 on success 0,otherwise error.
+* @return 0 on success,otherwise error.
 *
 * @note   A parameter set to a non zero value less than 20s automatically changes to 20s.
 */
@@ -176,8 +183,8 @@
 * @param  pingTimeout     Time to wait for a response,in milliseconds.
 * @return 0 on success, otherwise error.
 *
-* @note     A succesful operation will generate an asynchronous ping report event.
-*           The report structure is defined by structure netapp_pingreport_args_t.
+* @note     A succesful operation will generate an asynchronous ping report event.\n
+*           The report structure is defined by structure netapp_pingreport_args_t.\n
 * @warning  Calling this function while a Ping Request is in progress will kill the ping request in progress.
 */
 #ifndef CC3000_TINY_DRIVER
@@ -195,15 +202,15 @@
 #endif
 
 /**
-* Ping status request. This API triggers the CC3000 to send 
-* asynchronous events: HCI_EVNT_WLAN_ASYNC_PING_REPORT.
-* This event will create the report structure in netapp_pingreport_args_t.
-* This structure is filled with ping results until the API is triggered.
-* netapp_pingreport_args_t: packets_sent     - echo sent
-*                           packets_received - echo reply
-*                           min_round_time   - minimum round time
-*                           max_round_time   - max round time
-*                           avg_round_time   - average round time
+* Ping status request.
+* This API triggers the CC3000 to send asynchronous events: HCI_EVNT_WLAN_ASYNC_PING_REPORT.\n
+* This event will create the report structure in netapp_pingreport_args_t.\n
+* This structure is filled with ping results until the API is triggered.\n
+* netapp_pingreport_args_t: packets_sent     - echo sent\n
+*                           packets_received - echo reply\n
+*                           min_round_time   - minimum round time\n
+*                           max_round_time   - max round time\n
+*                           avg_round_time   - average round time\n
 *
 * @param   none
 * @return  none
@@ -216,20 +223,20 @@
 
 /**
 * Get the CC3000 Network interface information.
-* This information is only available after establishing a WLAN connection.
-* Undefined values are returned when this function is called before association.
-* @param[out]  ipconfig  pointer to a tNetappIpconfigRetArgs structure for storing the network interface configuration.
-*                        tNetappIpconfigRetArgs: aucIP             - ip address,
+* This information is only available after establishing a WLAN connection.\n
+* Undefined values are returned when this function is called before association.\n
+* @param[out]  ipconfig  pointer to a tNetappIpconfigRetArgs structure for storing the network interface configuration.\n
+*                        tNetappIpconfigRetArgs: aucIP             - ip address,\n
 *                                                aucSubnetMask     - mask
-*                                                aucDefaultGateway - default gateway address
-*                                                aucDHCPServer     - dhcp server address
-*                                                aucDNSServer      - dns server address
-*                                                uaMacAddr         - mac address
-*                                                uaSSID            - connected AP ssid
+*                                                aucDefaultGateway - default gateway address\n
+*                                                aucDHCPServer     - dhcp server address\n
+*                                                aucDNSServer      - dns server address\n
+*                                                uaMacAddr         - mac address\n
+*                                                uaSSID            - connected AP ssid\n
 * @return  none
-* @note    This function is useful for figuring out the IP Configuration of
-*          the device when DHCP is used and for figuring out the SSID of
-*          the Wireless network the device is associated with.
+* @note    This function is useful for figuring out the IP Configuration of\n
+*          the device when DHCP is used and for figuring out the SSID of\n
+*          the Wireless network the device is associated with.\n
 */
 extern void netapp_ipconfig( tNetappIpconfigRetArgs * ipconfig );
 
@@ -248,6 +255,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif    // __NETAPP_H__
 
 
--- a/nvmem.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/nvmem.h	Mon Jul 15 19:54:53 2013 +0000
@@ -41,6 +41,12 @@
 #include "socket.h"
 #include "evnt_handler.h"
 
+//*****************************************************************************
+//
+//! \addtogroup nvmem
+//! @{
+//
+//*****************************************************************************
 
 /** CC3000 Host driver - NVMEM
 *
@@ -92,32 +98,32 @@
 
 /**
 * Read 'length' data at offset 'ulOffset' from nvmem to file 'ulFileId'.
-* @param  ulFileId   Possible nvmem file id values:
-*                    NVMEM_NVS_FILEID, NVMEM_NVS_SHADOW_FILEID,
-*                    NVMEM_WLAN_CONFIG_FILEID, NVMEM_WLAN_CONFIG_SHADOW_FILEID,
-*                    NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
-*                    NVMEM_MAC_FILEID, NVMEM_FRONTEND_VARS_FILEID,
-*                    NVMEM_IP_CONFIG_FILEID, NVMEM_IP_CONFIG_SHADOW_FILEID,
-*                    NVMEM_BOOTLOADER_SP_FILEID, NVMEM_RM_FILEID,
-*                    and user files 12-15.
+* @param  ulFileId   Possible nvmem file id values:\n
+*                    NVMEM_NVS_FILEID, NVMEM_NVS_SHADOW_FILEID,\n
+*                    NVMEM_WLAN_CONFIG_FILEID, NVMEM_WLAN_CONFIG_SHADOW_FILEID,\n
+*                    NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,\n
+*                    NVMEM_MAC_FILEID, NVMEM_FRONTEND_VARS_FILEID,\n
+*                    NVMEM_IP_CONFIG_FILEID, NVMEM_IP_CONFIG_SHADOW_FILEID,\n
+*                    NVMEM_BOOTLOADER_SP_FILEID, NVMEM_RM_FILEID,\n
+*                    and user files 12-15.\n
 * @param  ulLength   number of bytes to read 
 * @param  ulOffset   ulOffset in file from where to read  
 * @param  buff       output buffer pointer
-* @return            number of bytes read, otherwise error.
-*                    Error conditions : file can't be used
-*                                       file is invalid
-*                                       read out of bounds. 
+* @return            number of bytes read, otherwise error.\n
+*                    Error conditions : file can't be used\n
+*                                       file is invalid\n
+*                                       read out of bounds. \n
 */
 extern signed long nvmem_read(unsigned long file_id, unsigned long length, unsigned long offset, unsigned char *buff);
 
 /**
 * Write 'length' data at offset 'ulOffset' from file 'ulFileId' to nvmem.
-* The file id is marked as invalid until writing is ended.
-* The file entry doesn't need to be valid - only allocated.
-* @param  ulFileId  Possible nvmem file id values:
-*                   NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
-*                   NVMEM_MAC_FILEID, NVMEM_BOOTLOADER_SP_FILEID,
-*                   and user files 12-15.
+* The file id is marked as invalid until writing is ended.\n
+* The file entry doesn't need to be valid - only allocated.\n
+* @param  ulFileId  Possible nvmem file id values:\n
+*                   NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,\n
+*                   NVMEM_MAC_FILEID, NVMEM_BOOTLOADER_SP_FILEID,\n
+*                   and user files 12-15.\n
 * @param  ulLength       number of bytes to write  
 * @param  ulEntryOffset  offset in file to start write operation from 
 * @param  buff           data to write
@@ -146,8 +152,8 @@
 
 /**
 * Write patch code to a specific file ID. Each write contains SP_PORTION_SIZE bytes.
-* @param    ulFileId   Possible nvmem file id values:
-*                      NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
+* @param    ulFileId   Possible nvmem file id values:\n
+*                      NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,\n
 * @param    spLength   number of bytes to write 
 * @param    spData     SP data to write
 *
@@ -156,7 +162,8 @@
 extern unsigned char nvmem_write_patch(unsigned long ulFileId, unsigned long spLength, const unsigned char *spData);
 
 /**
-* Read the patch version. read package version (WiFi FW patch, driver-supplicant-NS patch, bootloader patch)
+* Read the patch version.
+* Read package version (WiFi FW patch, driver-supplicant-NS patch, bootloader patch)\n
 * @param[out]  patchVer    first number indicates package ID and the second number indicates package build number   
 * @return      0 on success, error otherwise.
 */
@@ -166,15 +173,15 @@
 
 /**
 * Create a new file entry and allocate space in NVMEM. 
-* Applies only to user files.
-* Modify the size of file.
-* If the entry is unallocated - allocate it to size ulNewLen (marked invalid).
-* If it is allocated then deallocate it first.
-* To just mark the file as invalid without resizing - set ulNewLen=0.
-* @param       ulFileId    Possible nvmem file Ids:
-*                          * NVMEM_AES128_KEY_FILEID: 12
-*                          * NVMEM_SHARED_MEM_FILEID: 13
-*                          * and fileIDs 14 and 15
+* Applies only to user files.\n
+* Modify the size of file.\n
+* If the entry is unallocated - allocate it to size ulNewLen (marked invalid).\n
+* If it is allocated then deallocate it first.\n
+* To just mark the file as invalid without resizing - set ulNewLen=0.\n
+* @param       ulFileId    Possible nvmem file Ids:\n
+*                          * NVMEM_AES128_KEY_FILEID: 12\n
+*                          * NVMEM_SHARED_MEM_FILEID: 13\n
+*                          * and fileIDs 14 and 15\n
 * @param       ulNewLen    entry ulLength  
 *
 * @return      0 on success, error otherwise.
@@ -187,6 +194,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif // __NVRAM_H__
 
 
--- a/security.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/security.h	Mon Jul 15 19:54:53 2013 +0000
@@ -38,6 +38,13 @@
 #include "GlobalAssigns.h"
 #include "nvmem.h"
 
+//*****************************************************************************
+//
+//! \addtogroup security
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Host driver - Security
 *
 */
@@ -93,7 +100,7 @@
 const unsigned char Rcon[11] = {0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};
 
 /**
-* expend a 16 bytes key for AES128 implementation
+* expand a 16 bytes key for AES128 implementation.
 * @param   key          AES128 key - 16 bytes
 * @param   expandedKey  expanded AES128 key
 * @return  none
@@ -101,7 +108,7 @@
 void expandKey(unsigned char *expandedKey, unsigned char *key);
 
 /**
-* multiply by 2 in the galois field
+* multiply by 2 in the galois field.
 * @param   value    argument to multiply
 * @return  multiplied argument
 */
@@ -109,16 +116,17 @@
 
 /**
 * internal implementation of AES128 encryption.
-* straight forward aes encryption implementation
+* straight forward aes encryption implementation\n
 * first the group of operations
 * - addRoundKey
 * - subbytes
 * - shiftrows
-* - mixcolums
-* is executed 9 times, after this addroundkey to finish the 9th 
-* round, after that the 10th round without mixcolums
-* no further subfunctions to save cycles for function calls
-* no structuring with "for (....)" to save cycles.
+* - mixcolums\n
+*
+* is executed 9 times, after this addroundkey to finish the 9th\n 
+* round, after that the 10th round without mixcolums\n
+* no further subfunctions to save cycles for function calls\n
+* no structuring with "for (....)" to save cycles.\n
 * @param[in]  expandedKey expanded AES128 key
 * @param[in/out] state 16 bytes of plain text and cipher text
 * @return  none
@@ -127,15 +135,16 @@
 
 /**
 * internal implementation of AES128 decryption.
-* straightforward aes decryption implementation
-* the order of substeps is the exact reverse of decryption
+* straightforward aes decryption implementation\n
+* the order of substeps is the exact reverse of decryption\n
 * inverse functions:
 * - addRoundKey is its own inverse
 * - rsbox is inverse of sbox
 * - rightshift instead of leftshift
-* - invMixColumns = barreto + mixColumns
-* no further subfunctions to save cycles for function calls
-* no structuring with "for (....)" to save cycles
+* - invMixColumns = barreto + mixColumns\n
+*
+* no further subfunctions to save cycles for function calls\n
+* no structuring with "for (....)" to save cycles\n
 * @param[in]     expandedKey expanded AES128 key
 * @param[in\out] state 16 bytes of cipher text and plain text
 * @return  none
@@ -143,8 +152,9 @@
 void aes_decr(unsigned char *state, unsigned char *expandedKey);
 
 /**
-* AES128 encryption: Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is
-*                    computed. The AES implementation is in mode ECB (Electronic Code Book). 
+* AES128 encryption.
+* Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is computed.\n
+* The AES implementation is in mode ECB (Electronic Code Book).\n 
 * @param[in]  key   AES128 key of size 16 bytes
 * @param[in\out] state   16 bytes of plain text and cipher text
 * @return  none
@@ -152,8 +162,9 @@
 extern void aes_encrypt(unsigned char *state, unsigned char *key);
 
 /**
-* AES128 decryption: Given AES128 key and  16 bytes cipher text, plain text of 16 bytes is
-*                    computed The AES implementation is in mode ECB (Electronic Code Book).
+* AES128 decryption.
+* Given AES128 key and  16 bytes cipher text, plain text of 16 bytes is computed.\n
+* The AES implementation is in mode ECB (Electronic Code Book).\n
 * @param[in]  key   AES128 key of size 16 bytes
 * @param[in\out] state   16 bytes of cipher text and plain text
 * @return  none
@@ -162,14 +173,14 @@
 
 
 /**
-* Read the AES128 key from fileID #12 in EEPROM
+* Read the AES128 key from fileID #12 in EEPROM.
 * @param[out]  key   AES128 key of size 16 bytes
 * @return  0 on success, error otherwise.
 */
 extern signed long aes_read_key(unsigned char *key);
 
 /**
-* Write the AES128 key to fileID #12 in EEPROM
+* Write the AES128 key to fileID #12 in EEPROM.
 * @param[out]  key   AES128 key of size 16 bytes
 * @return  on success 0, error otherwise.
 */
@@ -181,6 +192,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif //__SECURITY__
 
 
--- a/socket.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/socket.h	Mon Jul 15 19:54:53 2013 +0000
@@ -37,6 +37,13 @@
 
 #include "GlobalAssigns.h"
 
+//*****************************************************************************
+//
+//! \addtogroup socket
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Host driver - Socket API
 *
 */
@@ -227,28 +234,28 @@
 //*****************************************************************************
 
 /**
-* HostFlowControlConsumeBuff
-* if SEND_NON_BLOCKING is not defined - block until a free buffer is available,
-* otherwise return the status of the available buffers.
+* HostFlowControlConsumeBuff.
+* if SEND_NON_BLOCKING is not defined - block until a free buffer is available,\n
+* otherwise return the status of the available buffers.\n
 * @param  sd  socket descriptor
-* @return  0 in case there are buffers available, 
-*         -1 in case of bad socket
-*         -2 if there are no free buffers present (only when SEND_NON_BLOCKING is enabled)
+* @return  0 in case there are buffers available, \n
+*         -1 in case of bad socket\n
+*         -2 if there are no free buffers present (only when SEND_NON_BLOCKING is enabled)\n
 */
 int HostFlowControlConsumeBuff(int sd);
 
 /**
-* create an endpoint for communication
-* The socket function creates a socket that is bound to a specific transport service provider.
-* This function is called by the application layer to obtain a socket handle.
-* @param   domain    selects the protocol family which will be used for 
-*                    communication. On this version only AF_INET is supported
-* @param   type      specifies the communication semantics. On this version 
-*                    only SOCK_STREAM, SOCK_DGRAM, SOCK_RAW are supported
-* @param   protocol  specifies a particular protocol to be used with the 
-*                    socket IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW are supported.
-* @return  On success, socket handle that is used for consequent socket 
-*          operations. On error, -1 is returned.
+* create an endpoint for communication.
+* The socket function creates a socket that is bound to a specific transport service provider.\n
+* This function is called by the application layer to obtain a socket handle.\n
+* @param   domain    selects the protocol family which will be used for\n 
+*                    communication. On this version only AF_INET is supported\n
+* @param   type      specifies the communication semantics. On this version\n 
+*                    only SOCK_STREAM, SOCK_DGRAM, SOCK_RAW are supported\n
+* @param   protocol  specifies a particular protocol to be used with the\n 
+*                    socket IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW are supported.\n
+* @return  On success, socket handle that is used for consequent socket operations\n 
+*          On error, -1 is returned.\n
 */
 extern int socket(long domain, long type, long protocol);
 
@@ -260,88 +267,92 @@
 extern long closesocket(long sd);
 
 /**
-* accept a connection on a socket:
-* This function is used with connection-based socket types 
-* (SOCK_STREAM). It extracts the first connection request on the 
-* queue of pending connections, creates a new connected socket, and
-* returns a new file descriptor referring to that socket.
-* The newly created socket is not in the listening state. 
-* The original socket sd is unaffected by this call. 
-* The argument sd is a socket that has been created with socket(),
-* bound to a local address with bind(), and is  listening for 
-* connections after a listen(). The argument addr is a pointer 
-* to a sockaddr structure. This structure is filled in with the 
-* address of the peer socket, as known to the communications layer.
-* The exact format of the address returned addr is determined by the 
-* socket's address family. The addrlen argument is a value-result
-* argument: it should initially contain the size of the structure
-* pointed to by addr, on return it will contain the actual 
-* length (in bytes) of the address returned.
-* @param[in]   sd      socket descriptor (handle)              
-* @param[out]  addr    the argument addr is a pointer to a sockaddr structure
-*                      This structure is filled in with the address of the  
-*                      peer socket, as known to the communications layer.        
-*                      determined. The exact format of the address returned             
-*                      addr is by the socket's address sockaddr. 
-*                      On this version only AF_INET is supported.
-*                      This argument returns in network order.
-* @param[out] addrlen  the addrlen argument is a value-result argument: 
-*                      it should initially contain the size of the structure
-*                      pointed to by addr.
-* @return  For socket in blocking mode:
-*           - On success, socket handle. on failure negative
-*          For socket in non-blocking mode:
-*           - On connection establishment, socket handle
-*           - On connection pending, SOC_IN_PROGRESS (-2)
-*           - On failure, SOC_ERROR    (-1)
+* accept a connection on a socket.
+* This function is used with connection-based socket types\n 
+* (SOCK_STREAM). It extracts the first connection request on the\n 
+* queue of pending connections, creates a new connected socket, and\n
+* returns a new file descriptor referring to that socket.\n
+* The newly created socket is not in the listening state.\n 
+* The original socket sd is unaffected by this call.\n 
+* The argument sd is a socket that has been created with socket(),\n
+* bound to a local address with bind(), and is  listening for \n
+* connections after a listen(). The argument addr is a pointer \n
+* to a sockaddr structure. This structure is filled in with the \n
+* address of the peer socket, as known to the communications layer.\n
+* The exact format of the address returned addr is determined by the \n
+* socket's address family. The addrlen argument is a value-result\n
+* argument: it should initially contain the size of the structure\n
+* pointed to by addr, on return it will contain the actual\n 
+* length (in bytes) of the address returned.\n
+* @param[in]   sd      socket descriptor (handle)\n              
+* @param[out]  addr    the argument addr is a pointer to a sockaddr structure\n
+*                      This structure is filled in with the address of the \n 
+*                      peer socket, as known to the communications layer.  \n      
+*                      determined. The exact format of the address returned \n            
+*                      addr is by the socket's address sockaddr. \n
+*                      On this version only AF_INET is supported.\n
+*                      This argument returns in network order.\n
+* @param[out] addrlen  the addrlen argument is a value-result argument: \n
+*                      it should initially contain the size of the structure\n
+*                      pointed to by addr.\n
+* @return  For socket in blocking mode:\n
+*           - On success, socket handle. on failure negative\n
+*          For socket in non-blocking mode:\n
+*           - On connection establishment, socket handle\n
+*           - On connection pending, SOC_IN_PROGRESS (-2)\n
+*           - On failure, SOC_ERROR    (-1)\n
 * @sa     socket ; bind ; listen
 */
 extern long accept(long sd, sockaddr *addr, socklen_t *addrlen);
 
 /**
-* assign a name to a socket
-* This function gives the socket the local address addr.
-* addr is addrlen bytes long. Traditionally, this is called when a 
-* socket is created with socket, it exists in a name space (address 
-* family) but has no name assigned.
-* It is necessary to assign a local address before a SOCK_STREAM
-* socket may receive connections.
+* assign a name to a socket.
+* This function gives the socket the local address addr.\n
+* addr is addrlen bytes long. Traditionally, this is called when a \n
+* socket is created with socket, it exists in a name space (address \n
+* family) but has no name assigned.\n
+* It is necessary to assign a local address before a SOCK_STREAM\n
+* socket may receive connections.\n
 * @param[in]   sd      socket descriptor (handle)              
-* @param[out]  addr    specifies the destination address. On this version 
-*                      only AF_INET is supported.
-* @param[out] addrlen  contains the size of the structure pointed to by addr.
-* @return      On success, zero is returned. On error, -1 is returned.
+* @param[out]  addr    specifies the destination address. On this version\n 
+*                      only AF_INET is supported.\n
+* @param[out] addrlen  contains the size of the structure pointed to by addr.\n
+* @return      On success, zero is returned.\n
+*              On error, -1 is returned.\n
 * @sa          socket ; accept ; listen
 */
 extern long bind(long sd, const sockaddr *addr, long addrlen);
 
 /**
-* listen for connections on a socket
-* The willingness to accept incoming connections and a queue
-* limit for incoming connections are specified with listen(),
-* and then the connections are accepted with accept.
-* The listen() call applies only to sockets of type SOCK_STREAM
-* The backlog parameter defines the maximum length the queue of
-* pending connections may grow to. 
+* listen for connections on a socket.
+* The willingness to accept incoming connections and a queue\n
+* limit for incoming connections are specified with listen(),\n
+* and then the connections are accepted with accept.\n
+* The listen() call applies only to sockets of type SOCK_STREAM\n
+* The backlog parameter defines the maximum length the queue of\n
+* pending connections may grow to. \n
 * @param[in]  sd       socket descriptor (handle)              
-* @param[in]  backlog  specifies the listen queue depth. On this version
-*                      backlog is not supported.
-* @return     On success, zero is returned. On error, -1 is returned.
+* @param[in]  backlog  specifies the listen queue depth. On this version\n
+*                      backlog is not supported.\n
+* @return     On success, zero is returned.\n
+*             On error, -1 is returned.\n
 * @sa         socket ; accept ; bind
 * @note       On this version, backlog is not supported
 */
 extern long listen(long sd, long backlog);
 
 /**
-* Get host IP by name. Obtain the IP Address of machine on network, 
+* Get host IP by name.\n
+* Obtain the IP Address of machine on network\n
 * @param[in]   hostname     host name              
 * @param[in]   usNameLen    name length 
-* @param[out]  out_ip_addr  This parameter is filled in with host IP address. 
-*                           In case that host name is not resolved, 
-*                           out_ip_addr is zero.                  
-* @return      On success, positive is returned. On error, negative is returned by its name.
-* @note  On this version, only blocking mode is supported. Also note that
-*        The function requires DNS server to be configured prior to its usage.
+* @param[out]  out_ip_addr  This parameter is filled in with host IP address.\n 
+*                           In case that host name is not resolved, \n
+*                           out_ip_addr is zero.\n     
+* @return      On success, positive is returned.\n
+*              On error, negative is returned by its name.\n
+* @note  On this version, only blocking mode is supported. Also note that\n
+*        The function requires DNS server to be configured prior to its usage.\n
 */
 #ifndef CC3000_TINY_DRIVER 
 extern int gethostbyname(char * hostname, unsigned short usNameLen, unsigned long* out_ip_addr);
@@ -349,96 +360,98 @@
 
 
 /**
-* initiate a connection on a socket 
-* Function connects the socket referred to by the socket descriptor 
-* sd, to the address specified by addr. The addrlen argument 
-* specifies the size of addr. The format of the address in addr is 
-* determined by the address space of the socket. If it is of type 
-* SOCK_DGRAM, this call specifies the peer with which the socket is 
-* to be associated; this address is that to which datagrams are to be
-* sent, and the only address from which datagrams are to be received.  
-* If the socket is of type SOCK_STREAM, this call attempts to make a 
-* connection to another socket. The other socket is specified  by 
-* address, which is an address in the communications space of the
-* socket. Note that the function implements only blocking behavior 
-* thus the caller will be waiting either for the connection 
-* establishment or for the connection establishment failure.
+* initiate a connection on a socket.
+* Function connects the socket referred to by the socket descriptor\n 
+* sd, to the address specified by addr. The addrlen argument \n
+* specifies the size of addr. The format of the address in addr is \n
+* determined by the address space of the socket. If it is of type \n
+* SOCK_DGRAM, this call specifies the peer with which the socket is \n
+* to be associated; this address is that to which datagrams are to be\n
+* sent, and the only address from which datagrams are to be received. \n 
+* If the socket is of type SOCK_STREAM, this call attempts to make a \n
+* connection to another socket. The other socket is specified  by \n
+* address, which is an address in the communications space of the\n
+* socket. Note that the function implements only blocking behavior \n
+* thus the caller will be waiting either for the connection \n
+* establishment or for the connection establishment failure.\n
 * @param[in]   sd       socket descriptor (handle)         
-* @param[in]   addr     specifies the destination addr. On this version
-*                       only AF_INET is supported.
+* @param[in]   addr     specifies the destination addr. On this version\n
+*                       only AF_INET is supported.\n
 * @param[out]  addrlen  contains the size of the structure pointed to by addr    
-* @return      On success, zero is returned. On error, -1 is returned
+* @return      On success, zero is returned.\n
+               On error, -1 is returned\n
 * @sa socket
 */
 extern long connect(long sd, const sockaddr *addr, long addrlen);
 
 /**
-* Monitor socket activity  
-* Select allow a program to monitor multiple file descriptors,
-* waiting until one or more of the file descriptors become 
-*"ready" for some class of I/O operation 
-* @param[in]    nfds       the highest-numbered file descriptor in any of the
-*                          three sets, plus 1.     
-* @param[out]   writesds   socket descriptors list for write monitoring
-* @param[out]   readsds    socket descriptors list for read monitoring  
-* @param[out]   exceptsds  socket descriptors list for exception monitoring
-* @param[in]    timeout    is an upper bound on the amount of time elapsed
-*                          before select() returns. Null means infinity 
-*                          timeout. The minimum timeout is 5 milliseconds,
-*                         less than 5 milliseconds will be set
-*                          automatically to 5 milliseconds.
-* @return    On success, select() returns the number of file descriptors
-*            contained in the three returned descriptor sets (that is, the
-*            total number of bits that are set in readfds, writefds,
-*            exceptfds) which may be zero if the timeout expires before
-*            anything interesting  happens.
-*            On error, -1 is returned.
-*                  *readsds - return the sockets on which Read request will
-*                             return without delay with valid data.
-*                  *writesds - return the sockets on which Write request 
-*                                will return without delay.
-*                  *exceptsds - return the sockets which closed recently.
-* @Note   If the timeout value set to less than 5ms it will automatically
-*         change to 5ms to prevent overload of the system
+* Monitor socket activity. 
+* Select allow a program to monitor multiple file descriptors,\n
+* waiting until one or more of the file descriptors become \n
+*"ready" for some class of I/O operation \n
+* @param[in]    nfds       the highest-numbered file descriptor in any of the\n
+*                          three sets, plus 1.  \n   
+* @param[out]   writesds   socket descriptors list for write monitoring\n
+* @param[out]   readsds    socket descriptors list for read monitoring\n  
+* @param[out]   exceptsds  socket descriptors list for exception monitoring\n
+* @param[in]    timeout    is an upper bound on the amount of time elapsed\n
+*                          before select() returns. Null means infinity \n
+*                          timeout. The minimum timeout is 5 milliseconds,\n
+*                         less than 5 milliseconds will be set\n
+*                          automatically to 5 milliseconds.\n
+* @return    On success, select() returns the number of file descriptors\n
+*            contained in the three returned descriptor sets (that is, the\n
+*            total number of bits that are set in readfds, writefds,\n
+*            exceptfds) which may be zero if the timeout expires before\n
+*            anything interesting  happens.\n
+*            On error, -1 is returned.\n
+*                  *readsds - return the sockets on which Read request will\n
+*                             return without delay with valid data.\n
+*                  *writesds - return the sockets on which Write request \n
+*                                will return without delay.\n
+*                  *exceptsds - return the sockets which closed recently.\n
+* @Note   If the timeout value set to less than 5ms it will automatically\n
+*         change to 5ms to prevent overload of the system\n
 * @sa socket
 */
 extern int select(long nfds, fd_set *readsds, fd_set *writesds, fd_set *exceptsds, struct timeval *timeout);
 
 /**
-* set socket options
-* This function manipulate the options associated with a socket.
-* Options may exist at multiple protocol levels; they are always
-* present at the uppermost socket level.
-* When manipulating socket options the level at which the option 
-* resides and the name of the option must be specified.  
-* To manipulate options at the socket level, level is specified as 
-* SOL_SOCKET. To manipulate options at any other level the protocol 
-* number of the appropriate protocol controlling the option is 
-* supplied. For example, to indicate that an option is to be 
-* interpreted by the TCP protocol, level should be set to the 
-* protocol number of TCP; 
-* The parameters optval and optlen are used to access optval - 
-* use for setsockopt(). For getsockopt() they identify a buffer
-* in which the value for the requested option(s) are to 
-* be returned. For getsockopt(), optlen is a value-result 
-* parameter, initially containing the size of the buffer 
-* pointed to by option_value, and modified on return to 
-* indicate the actual size of the value returned. If no option 
-* value is to be supplied or returned, option_value may be NULL.
+* set socket options.
+* This function manipulate the options associated with a socket.\n
+* Options may exist at multiple protocol levels; they are always\n
+* present at the uppermost socket level.\n
+* When manipulating socket options the level at which the option \n
+* resides and the name of the option must be specified.\n
+* To manipulate options at the socket level, level is specified as\n 
+* SOL_SOCKET. To manipulate options at any other level the protocol \n
+* number of the appropriate protocol controlling the option is \n
+* supplied. For example, to indicate that an option is to be \n
+* interpreted by the TCP protocol, level should be set to the \n
+* protocol number of TCP; \n
+* The parameters optval and optlen are used to access optval - \n
+* use for setsockopt(). For getsockopt() they identify a buffer\n
+* in which the value for the requested option(s) are to \n
+* be returned. For getsockopt(), optlen is a value-result \n
+* parameter, initially containing the size of the buffer \n
+* pointed to by option_value, and modified on return to \n
+* indicate the actual size of the value returned. If no option \n
+* value is to be supplied or returned, option_value may be NULL.\n
 * @param[in]   sd          socket handle
 * @param[in]   level       defines the protocol level for this option
 * @param[in]   optname     defines the option name to Interrogate
 * @param[in]   optval      specifies a value for the option
 * @param[in]   optlen      specifies the length of the option value
-* @return      On success, zero is returned. On error, -1 is returned
+* @return      On success, zero is returned.\n
+               On error, -1 is returned\n
 *
-* @Note   On this version the following two socket options are enabled:
-*         The only protocol level supported in this version is SOL_SOCKET (level).
-*              1. SOCKOPT_RECV_TIMEOUT (optname)
-*                 SOCKOPT_RECV_TIMEOUT configures recv and recvfrom timeout in milliseconds.
-*                 In that case optval should be pointer to unsigned long.
-*              2. SOCKOPT_NONBLOCK (optname). sets the socket non-blocking mode on or off.
-*                 In that case optval should be SOCK_ON or SOCK_OFF (optval).
+* @Note   On this version the following two socket options are enabled:\n
+*         The only protocol level supported in this version is SOL_SOCKET (level).\n
+*              1. SOCKOPT_RECV_TIMEOUT (optname)\n
+*                 SOCKOPT_RECV_TIMEOUT configures recv and recvfrom timeout in milliseconds.\n
+*                 In that case optval should be pointer to unsigned long.\n
+*              2. SOCKOPT_NONBLOCK (optname). sets the socket non-blocking mode on or off.\n
+*                 In that case optval should be SOCK_ON or SOCK_OFF (optval).\n
 * @sa getsockopt
 */
 #ifndef CC3000_TINY_DRIVER 
@@ -446,26 +459,26 @@
 #endif
 
 /**
-* get socket options
-* This function manipulate the options associated with a socket.
-* Options may exist at multiple protocol levels; they are always
-* present at the uppermost socket level.
-* When manipulating socket options the level at which the option 
-* resides and the name of the option must be specified.  
-* To manipulate options at the socket level, level is specified as 
-* SOL_SOCKET. To manipulate options at any other level the protocol 
-* number of the appropriate protocol controlling the option is 
-* supplied. For example, to indicate that an option is to be 
-* interpreted by the TCP protocol, level should be set to the 
-* protocol number of TCP; 
-* The parameters optval and optlen are used to access optval - 
-* use for setsockopt(). For getsockopt() they identify a buffer
-* in which the value for the requested option(s) are to 
-* be returned. For getsockopt(), optlen is a value-result 
-* parameter, initially containing the size of the buffer 
-* pointed to by option_value, and modified on return to 
-* indicate the actual size of the value returned. If no option 
-* value is to be supplied or returned, option_value may be NULL.
+* get socket options.
+* This function manipulate the options associated with a socket.\n
+* Options may exist at multiple protocol levels; they are always\n
+* present at the uppermost socket level.\n
+* When manipulating socket options the level at which the option \n
+* resides and the name of the option must be specified.  \n
+* To manipulate options at the socket level, level is specified as \n
+* SOL_SOCKET. To manipulate options at any other level the protocol \n
+* number of the appropriate protocol controlling the option is \n
+* supplied. For example, to indicate that an option is to be \n
+* interpreted by the TCP protocol, level should be set to the \n
+* protocol number of TCP; \n
+* The parameters optval and optlen are used to access optval -\n 
+* use for setsockopt(). For getsockopt() they identify a buffer\n
+* in which the value for the requested option(s) are to \n
+* be returned. For getsockopt(), optlen is a value-result \n
+* parameter, initially containing the size of the buffer \n
+* pointed to by option_value, and modified on return to \n
+* indicate the actual size of the value returned. If no option \n
+* value is to be supplied or returned, option_value may be NULL.\n
 * @param[in]   sd          socket handle
 * @param[in]   level       defines the protocol level for this option
 * @param[in]   optname     defines the option name to Interrogate
@@ -473,22 +486,22 @@
 * @param[out]  optlen      specifies the length of the option value
 * @return      On success, zero is returned. On error, -1 is returned
 *
-* @Note   On this version the following two socket options are enabled:
-*         The only protocol level supported in this version is SOL_SOCKET (level).
-*              1. SOCKOPT_RECV_TIMEOUT (optname)
-*                 SOCKOPT_RECV_TIMEOUT configures recv and recvfrom timeout in milliseconds.
-*                 In that case optval should be pointer to unsigned long.
-*              2. SOCKOPT_NONBLOCK (optname). sets the socket non-blocking mode on or off.
-*                 In that case optval should be SOCK_ON or SOCK_OFF (optval).
+* @Note   On this version the following two socket options are enabled:\n
+*         The only protocol level supported in this version is SOL_SOCKET (level).\n
+*              1. SOCKOPT_RECV_TIMEOUT (optname)\n
+*                 SOCKOPT_RECV_TIMEOUT configures recv and recvfrom timeout in milliseconds.\n
+*                 In that case optval should be pointer to unsigned long.\n
+*              2. SOCKOPT_NONBLOCK (optname). sets the socket non-blocking mode on or off.\n
+*                 In that case optval should be SOCK_ON or SOCK_OFF (optval).\n
 * @sa setsockopt
 */
 extern int getsockopt(long sd, long level, long optname, void *optval, socklen_t *optlen);
 
 /**
-* Read data from socket (simple_link_recv)
-* Return the length of the message on successful completion.
-* If a message is too long to fit in the supplied buffer, excess bytes may
-* be discarded depending on the type of socket the message is received from.
+* Read data from socket (simple_link_recv).
+* Return the length of the message on successful completion.\n
+* If a message is too long to fit in the supplied buffer, excess bytes may\n
+* be discarded depending on the type of socket the message is received from.\n
 * @param sd       socket handle
 * @param buf      read buffer
 * @param len      buffer length
@@ -500,13 +513,13 @@
 int simple_link_recv(long sd, void *buf, long len, long flags, sockaddr *from, socklen_t *fromlen, long opcode);
 
 /**
-* Receive a message from a connection-mode socket
+* Receive a message from a connection-mode socket.
 * @param[in]  sd     socket handle
 * @param[out] buf    Points to the buffer where the message should be stored
-* @param[in]  len    Specifies the length in bytes of the buffer pointed to 
-*                    by the buffer argument.
-* @param[in] flags   Specifies the type of message reception. 
-*                    On this version, this parameter is not supported.
+* @param[in]  len    Specifies the length in bytes of the buffer pointed to \n
+*                    by the buffer argument.\n
+* @param[in] flags   Specifies the type of message reception. \n
+*                    On this version, this parameter is not supported.\n
 * @return         Return the number of bytes received, or -1 if an error occurred
 * @sa recvfrom
 * @Note On this version, only blocking mode is supported.
@@ -514,18 +527,18 @@
 extern int recv(long sd, void *buf, long len, long flags);
 
 /**
-* read data from socket (recvfrom)
-* Receives a message from a connection-mode or connectionless-mode socket.
-* Note that raw sockets are not supported.
+* read data from socket (recvfrom).
+* Receives a message from a connection-mode or connectionless-mode socket.\n
+* Note that raw sockets are not supported.\n
 * @param[in]  sd       socket handle
 * @param[out] buf      Points to the buffer where the message should be stored
-* @param[in]  len      Specifies the length in bytes of the buffer pointed to 
-*                      by the buffer argument.
-* @param[in] flags     Specifies the type of message reception. 
-*                      On this version, this parameter is not supported.
-* @param[in] from      pointer to an address structure indicating the source
-*                      address: sockaddr. On this version only AF_INET is
-*                      supported.
+* @param[in]  len      Specifies the length in bytes of the buffer pointed to \n
+*                      by the buffer argument.\n
+* @param[in] flags     Specifies the type of message reception.\n 
+*                      On this version, this parameter is not supported.\n
+* @param[in] from      pointer to an address structure indicating the source\n
+*                      address: sockaddr. On this version only AF_INET is\n
+*                      supported.\n
 * @param[in] fromlen   source address structure size
 * @return              Return the number of bytes received, or -1 if an error occurred
 * @sa recv
@@ -534,16 +547,16 @@
 extern int recvfrom(long sd, void *buf, long len, long flags, sockaddr *from, socklen_t *fromlen);
 
 /**
-* Transmit a message to another socket (simple_link_send)
+* Transmit a message to another socket (simple_link_send).
 * @param sd       socket handle
 * @param buf      write buffer
 * @param len      buffer length
 * @param flags    On this version, this parameter is not supported
 * @param to       pointer to an address structure indicating destination address
 * @param tolen    destination address structure size
-* @return         Return the number of bytes transmitted, or -1 if an error
-*                 occurred, or -2 in case there are no free buffers available
-*                 (only when SEND_NON_BLOCKING is enabled)
+* @return         Return the number of bytes transmitted, or -1 if an error\n
+*                 occurred, or -2 in case there are no free buffers available\n
+*                 (only when SEND_NON_BLOCKING is enabled)\n
 */
 int simple_link_send(long sd, const void *buf, long len, long flags, const sockaddr *to, long tolen, long opcode);
 
@@ -553,8 +566,8 @@
 * @param buf      Points to a buffer containing the message to be sent
 * @param len      message size in bytes
 * @param flags    On this version, this parameter is not supported
-* @return         Return the number of bytes transmitted, or -1 if an
-*                 error occurred
+* @return         Return the number of bytes transmitted, or -1 if an\n
+*                 error occurred\n
 * @Note           On this version, only blocking mode is supported.
 * @sa             sendto
 */
@@ -566,9 +579,9 @@
 * @param buf      Points to a buffer containing the message to be sent
 * @param len      message size in bytes
 * @param flags    On this version, this parameter is not supported
-* @param to       pointer to an address structure indicating the destination
-*                 address: sockaddr. On this version only AF_INET is
-*                 supported.
+* @param to       pointer to an address structure indicating the destination\n
+*                 address: sockaddr. On this version only AF_INET is\n
+*                 supported.\n
 * @param tolen    destination address structure size
 * @return         Return the number of bytes transmitted, or -1 if an error occurred
 * @Note           On this version, only blocking mode is supported.
@@ -579,11 +592,11 @@
 /**
 * Set CC3000 in mDNS advertiser mode in order to advertise itself.
 * @param[in] mdnsEnabled         flag to enable/disable the mDNS feature
-* @param[in] deviceServiceName   Service name as part of the published
-*                                canonical domain name
+* @param[in] deviceServiceName   Service name as part of the published\n
+*                                canonical domain name\n
 * @param[in] deviceServiceNameLength   Length of the service name
-* @return   On success, zero is returned, return SOC_ERROR if socket was not 
-*           opened successfully, or if an error occurred.
+* @return   On success, zero is returned,\n
+*           return SOC_ERROR if socket was not opened successfully, or if an error occurred.\n
 */
 extern int mdnsAdvertiser(unsigned short mdnsEnabled, char * deviceServiceName, unsigned short deviceServiceNameLength);
 
@@ -592,6 +605,13 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif // __SOCKET_H__
 
 
--- a/wlan.h	Mon Jul 15 14:19:46 2013 +0000
+++ b/wlan.h	Mon Jul 15 19:54:53 2013 +0000
@@ -44,6 +44,13 @@
 #include "security.h"
 #include "evnt_handler.h"
 
+//*****************************************************************************
+//
+//! \addtogroup wlan
+//! @{
+//
+//*****************************************************************************
+
 /** CC3000 Host driver - WLAN
 *
 */
@@ -96,37 +103,37 @@
 
 /**
 * Send HCI_CMND_SIMPLE_LINK_START to CC3000
-* @param  usPatchesAvailableAtHost  flag to indicate if patches available
-*                                   from host or from EEPROM. Due to the 
-*                                   fact the patches are burn to the EEPROM
-*                                   using the patch programmer utility, the 
-*                                   patches will be available from the EEPROM
-*                                   and not from the host.
+* @param  usPatchesAvailableAtHost  flag to indicate if patches available\n
+*                                   from host or from EEPROM. Due to the \n
+*                                   fact the patches are burn to the EEPROM\n
+*                                   using the patch programmer utility, the \n
+*                                   patches will be available from the EEPROM\n
+*                                   and not from the host.\n
 * @return   none
 */
 static void SimpleLink_Init_Start(unsigned short usPatchesAvailableAtHost);
 
 /**
 * Initialize wlan driver
-* @param  sWlanCB   Asynchronous events callback.  
-*                   0 no event call back.
-*                 -call back parameters:
-*                  1) event_type: HCI_EVNT_WLAN_UNSOL_CONNECT connect event,
-*                    HCI_EVNT_WLAN_UNSOL_DISCONNECT disconnect event,
-*                    HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE config done,
-*                    HCI_EVNT_WLAN_UNSOL_DHCP dhcp report, 
-*                    HCI_EVNT_WLAN_ASYNC_PING_REPORT ping report OR 
-*                    HCI_EVNT_WLAN_KEEPALIVE keepalive.
-*                  2) data: pointer to extra data that received by the event
-*                    (NULL no data).
-*                  3) length: data length.
-*                 -Events with extra data:
-*                    HCI_EVNT_WLAN_UNSOL_DHCP: 4 bytes IP, 4 bytes Mask, 
-*                    4 bytes default gateway, 4 bytes DHCP server and 4 bytes
-*                    for DNS server.
-*                    HCI_EVNT_WLAN_ASYNC_PING_REPORT: 4 bytes Packets sent, 
-*                    4 bytes Packets received, 4 bytes Min round time, 
-*                    4 bytes Max round time and 4 bytes for Avg round time.
+* @param  sWlanCB   Asynchronous events callback.  \n
+*                   0 no event call back.\n
+*                 -call back parameters:\n
+*                  1) event_type: HCI_EVNT_WLAN_UNSOL_CONNECT connect event,\n
+*                    HCI_EVNT_WLAN_UNSOL_DISCONNECT disconnect event,\n
+*                    HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE config done,\n
+*                    HCI_EVNT_WLAN_UNSOL_DHCP dhcp report, \n
+*                    HCI_EVNT_WLAN_ASYNC_PING_REPORT ping report OR \n
+*                    HCI_EVNT_WLAN_KEEPALIVE keepalive.\n
+*                  2) data: pointer to extra data that received by the event\n
+*                    (NULL no data).\n
+*                  3) length: data length.\n
+*                 -Events with extra data:\n
+*                    HCI_EVNT_WLAN_UNSOL_DHCP: 4 bytes IP, 4 bytes Mask,\n 
+*                    4 bytes default gateway, 4 bytes DHCP server and 4 bytes\n
+*                    for DNS server.\n
+*                    HCI_EVNT_WLAN_ASYNC_PING_REPORT: 4 bytes Packets sent,\n 
+*                    4 bytes Packets received, 4 bytes Min round time, \n
+*                    4 bytes Max round time and 4 bytes for Avg round time.\n
 * @param    sFWPatches              0 no patch or pointer to FW patches 
 * @param    sDriverPatches          0 no patch or pointer to driver patches
 * @param    sBootLoaderPatches      0 no patch or pointer to bootloader patches
@@ -149,8 +156,8 @@
 
 /**
 * Trigger Received event/data processing - called from the SPI library to receive the data
-* @param         pvBuffer - pointer to the received data buffer
-*                The function triggers Received event/data processing
+* @param         pvBuffer - pointer to the received data buffer\n
+*                The function triggers Received event/data processing\n
 * @param         Pointer to the received data
 * @return        none
 */
@@ -158,21 +165,21 @@
 
 
 /**
-* Start WLAN device. This function asserts the enable pin of 
-* the device (WLAN_EN), starting the HW initialization process.
-* The function blocked until device Initialization is completed.
-* Function also configure patches (FW, driver or bootloader) 
-* and calls appropriate device callbacks.
-* @param   usPatchesAvailableAtHost - flag to indicate if patches available
-*                                     from host or from EEPROM. Due to the 
-*                                     fact the patches are burn to the EEPROM
-*                                     using the patch programmer utility, the 
-*                                     patches will be available from the EEPROM
-*                                     and not from the host.
+* Start WLAN device.
+* This function asserts the enable pin of \n
+* the device (WLAN_EN), starting the HW initialization process.\n
+* The function blocked until device Initialization is completed.\n
+* Function also configure patches (FW, driver or bootloader) \n
+* and calls appropriate device callbacks.\n
+* @param   usPatchesAvailableAtHost - flag to indicate if patches available\n
+*                                     from host or from EEPROM. Due to the\n 
+*                                     fact the patches are burn to the EEPROM\n
+*                                     using the patch programmer utility, the \n
+*                                     patches will be available from the EEPROM\n
+*                                     and not from the host.\n
 * @return        none
 * @Note          Prior calling the function wlan_init shall be called.
-* @Warning       This function must be called after wlan_init and before any 
-*                other wlan API
+* @Warning       This function must be called after wlan_init and before any other wlan API
 * @sa            wlan_init , wlan_stop
 */
 extern void wlan_start(unsigned short usPatchesAvailableAtHost);
@@ -187,24 +194,24 @@
 
 /**
 * Connect to AP
-* @param    sec_type   security options:
-*              WLAN_SEC_UNSEC, 
-*              WLAN_SEC_WEP (ASCII support only),
-*              WLAN_SEC_WPA or WLAN_SEC_WPA2
+* @param    sec_type   security options:\n
+*              WLAN_SEC_UNSEC, \n
+*              WLAN_SEC_WEP (ASCII support only),\n
+*              WLAN_SEC_WPA or WLAN_SEC_WPA2\n
 * @param    ssid       up to 32 bytes and is ASCII SSID of the AP
 * @param    ssid_len   length of the SSID
 * @param    bssid      6 bytes specified the AP bssid
 * @param    key        up to 16 bytes specified the AP security key
 * @param    key_len    key length 
-* @return   On success, zero is returned. On error, negative is returned. 
-*           Note that even though a zero is returned on success to trigger
-*           connection operation, it does not mean that CCC3000 is already
-*           connected. An asynchronous "Connected" event is generated when 
-*           actual association process finishes and CC3000 is connected to
-*           the AP. If DHCP is set, An asynchronous "DHCP" event is 
-*           generated when DHCP process is finish.
-* @warning  Please Note that when connection to AP configured with security
-*           type WEP, please confirm that the key is set as ASCII and not as HEX.
+* @return   On success, zero is returned. On error, negative is returned.\n 
+*           Note that even though a zero is returned on success to trigger\n
+*           connection operation, it does not mean that CCC3000 is already\n
+*           connected. An asynchronous "Connected" event is generated when \n
+*           actual association process finishes and CC3000 is connected to\n
+*           the AP. If DHCP is set, An asynchronous "DHCP" event is \n
+*           generated when DHCP process is finish.\n
+* @warning  Please Note that when connection to AP configured with security\n
+*           type WEP, please confirm that the key is set as ASCII and not as HEX.\n
 * @sa       wlan_disconnect
 */
 #ifndef CC3000_TINY_DRIVER
@@ -227,13 +234,13 @@
 extern long wlan_disconnect(void);
 
 /**
-* Add profile
-* When auto start is enabled, the device connects to
-* station from the profiles table. Up to 7 profiles are supported. 
-* If several profiles configured the device choose the highest 
-* priority profile, within each priority group, device will choose 
-* profile based on security policy, signal strength, etc 
-* parameters. All the profiles are stored in CC3000 NVMEM.
+* Add profile.
+* When auto start is enabled, the device connects to\n
+* station from the profiles table. Up to 7 profiles are supported. \n
+* If several profiles configured the device choose the highest \n
+* priority profile, within each priority group, device will choose \n
+* profile based on security policy, signal strength, etc \n
+* parameters. All the profiles are stored in CC3000 NVMEM.\n
 *
 * @param    ulSecType  WLAN_SEC_UNSEC,WLAN_SEC_WEP,WLAN_SEC_WPA,WLAN_SEC_WPA2
 * @param    ucSsid    ssid  SSID up to 32 bytes
@@ -260,7 +267,7 @@
                              unsigned long ulPassPhraseLen);
 
 /**
-* Delete WLAN profile 
+* Delete WLAN profile.
 * @param    index   number of profile to delete
 * @return   On success, zero is returned. On error, -1 is returned        
 * @Note     In order to delete all stored profile, set index to 255.
@@ -269,17 +276,17 @@
 extern long wlan_ioctl_del_profile(unsigned long ulIndex);
 
 /**
-* Mask event according to bit mask. In case that event is 
-* masked (1), the device will not send the masked event to host. 
-* @param    mask   mask option:
-*                  HCI_EVNT_WLAN_UNSOL_CONNECT connect event
-*                  HCI_EVNT_WLAN_UNSOL_DISCONNECT disconnect event
-*                  HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE  smart config done
-*                  HCI_EVNT_WLAN_UNSOL_INIT init done
-*                  HCI_EVNT_WLAN_UNSOL_DHCP dhcp event report
-*                  HCI_EVNT_WLAN_ASYNC_PING_REPORT ping report
-*                  HCI_EVNT_WLAN_KEEPALIVE keepalive
-*                  HCI_EVNT_WLAN_TX_COMPLETE - disable information on end of transmission
+* Mask event according to bit mask.
+* In case that event is masked (1), the device will not send the masked event to host. 
+* @param    mask   mask option:\n
+*                  HCI_EVNT_WLAN_UNSOL_CONNECT connect event\n
+*                  HCI_EVNT_WLAN_UNSOL_DISCONNECT disconnect event\n
+*                  HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE  smart config done\n
+*                  HCI_EVNT_WLAN_UNSOL_INIT init done\n
+*                  HCI_EVNT_WLAN_UNSOL_DHCP dhcp event report\n
+*                  HCI_EVNT_WLAN_ASYNC_PING_REPORT ping report\n
+*                  HCI_EVNT_WLAN_KEEPALIVE keepalive\n
+*                  HCI_EVNT_WLAN_TX_COMPLETE - disable information on end of transmission\n
 *           Saved: no.
 * @return   On success, zero is returned. On error, -1 is returned        
 */
@@ -288,34 +295,35 @@
 /**
 * Get wlan status: disconnected, scanning, connecting or connected
 * @param none 
-* @return    WLAN_STATUS_DISCONNECTED, WLAN_STATUS_SCANING, 
-*            STATUS_CONNECTING or WLAN_STATUS_CONNECTED      
+* @return    WLAN_STATUS_DISCONNECTED, WLAN_STATUS_SCANING,\n 
+*            STATUS_CONNECTING or WLAN_STATUS_CONNECTED   \n   
 */
 extern long wlan_ioctl_statusget(void);
 
 
 /**
-* Set connection policy
-* When auto is enabled, the device tries to connect according the following policy:
-* 1) If fast connect is enabled and last connection is valid, 
-*    the device will try to connect to it without the scanning 
-*    procedure (fast). The last connection will be marked as
-*    invalid, due to adding/removing profile. 
-* 2) If profile exists, the device will try to connect it 
-*    (Up to seven profiles).
-* 3) If fast and profiles are not found, and open mode is
-*    enabled, the device will try to connect to any AP.
-* Note that the policy settings are stored in the CC3000 NVMEM.
-* @param    should_connect_to_open_ap  enable(1), disable(0) connect to any 
-*           available AP. This parameter corresponds to the configuration of 
-*           item # 3 in the brief description.
-* @param    should_use_fast_connect enable(1), disable(0). if enabled, tries 
-*           to connect to the last connected AP. This parameter corresponds 
-*           to the configuration of item # 1 in the brief description.
-* @param    auto_start enable(1), disable(0) auto connect 
-*           after reset and periodically reconnect if needed. This 
-*           configuration configures option 2 in the above description.
-* @return   On success, zero is returned. On error, -1 is returned        
+* Set connection policy.
+* When auto is enabled, the device tries to connect according the following policy:\n
+* 1) If fast connect is enabled and last connection is valid, \n
+*    the device will try to connect to it without the scanning \n
+*    procedure (fast). The last connection will be marked as\n
+*    invalid, due to adding/removing profile. \n
+* 2) If profile exists, the device will try to connect it \n
+*    (Up to seven profiles).\n
+* 3) If fast and profiles are not found, and open mode is\n
+*    enabled, the device will try to connect to any AP.\n
+* Note that the policy settings are stored in the CC3000 NVMEM.\n
+* @param    should_connect_to_open_ap  enable(1), disable(0) connect to any \n
+*           available AP. This parameter corresponds to the configuration of \n
+*           item # 3 in the brief description.\n
+* @param    should_use_fast_connect enable(1), disable(0). if enabled, tries \n
+*           to connect to the last connected AP. This parameter corresponds \n
+*           to the configuration of item # 1 in the brief description.\n
+* @param    auto_start enable(1), disable(0) auto connect \n
+*           after reset and periodically reconnect if needed. This \n
+*           configuration configures option 2 in the above description.\n
+* @return   On success, zero is returned.\n
+*           On error, -1 is returned  \n      
 * @sa       wlan_add_profile , wlan_ioctl_del_profile 
 */
 extern long wlan_ioctl_set_connection_policy(unsigned long should_connect_to_open_ap,
@@ -323,19 +331,19 @@
                                              unsigned long ulUseProfiles);
 
 /**
-* Gets entry from scan result table.
-* The scan results are returned one by one, and each entry represents a single AP found in the area.
-* The following is a format of the scan result: 
-* - 4 Bytes: number of networks found
-* - 4 Bytes: The status of the scan: 0 - aged results, 1 - results valid, 2 - no results
-* - 42 bytes: Result entry, where the bytes are arranged as  follows:
-*             - 1 bit      isValid      - is result valid or not
-*             - 7 bits     rssi         - RSSI value     
-*             - 2 bits     securityMode - security mode of the AP: 0 - Open, 1 - WEP, 2 WPA, 3 WPA2
-*             - 6 bits     SSID name length
-*             - 2 bytes    the time at which the entry has entered into scans result table
-*             - 32 bytes   SSID name
-*             - 6 bytes    BSSID 
+* Get entry from scan result table.
+* The scan results are returned one by one, and each entry represents a single AP found in the area.\n
+* The following is a format of the scan result: \n
+* - 4 Bytes: number of networks found\n
+* - 4 Bytes: The status of the scan: 0 - aged results, 1 - results valid, 2 - no results\n
+* - 42 bytes: Result entry, where the bytes are arranged as  follows:\n
+*             - 1 bit      isValid      - is result valid or not\n
+*             - 7 bits     rssi         - RSSI value     \n
+*             - 2 bits     securityMode - security mode of the AP: 0 - Open, 1 - WEP, 2 WPA, 3 WPA2\n
+*             - 6 bits     SSID name length\n
+*             - 2 bytes    the time at which the entry has entered into scans result table\n
+*             - 32 bytes   SSID name\n
+*             - 6 bytes    BSSID \n
 * @param[in]    scan_timeout   parameter not supported
 * @param[out]   ucResults  scan result (_wlan_full_scan_results_args_t)
 * @return       On success, zero is returned. On error, -1 is returned        
@@ -347,41 +355,41 @@
 
 /**
 * start and stop scan procedure. Set scan parameters. 
-* @param    uiEnable             start/stop application scan: 
-*                                1 = start scan with default interval value of 10 min. 
-*                                To set a different scan interval value, apply the value in milliseconds.
-*                                minimum = 1 second. 0=stop.
-*                                Wlan reset (wlan_stop() wlan_start()) is needed when changing scan interval value.
-*                                Saved: No
-* @param   uiMinDwellTime        minimum dwell time value to be used for each channel, in milliseconds.
-*                                Saved: yes
-*                                Recommended Value: 100
-*                                Default: 20
-* @param   uiMaxDwellTime        maximum dwell time value to be used for each channel, in milliseconds.
-*                                Saved: yes
-*                                Recommended Value: 100
-*                                Default: 30
-* @param   uiNumOfProbeRequests  max probe request between dwell time. 
-*                                Saved: yes.
-*                                Recommended Value: 5
-*                                Default:2
-* @param   uiChannelMask         bitwise, up to 13 channels (0x1fff). 
-*                                Saved: yes.
-*                                Default: 0x7ff
-* @param   uiRSSIThreshold       RSSI threshold.
-*                                Saved: yes
-*                                Default: -80
-* @param   uiSNRThreshold        NSR threshold.
-*                                Saved: yes
-*                                Default: 0
-* @param   uiDefaultTxPower      probe Tx power.
-*                                Saved: yes
-*                                Default: 205
-* @param   aiIntervalList        pointer to array with 16 entries (16 channels) 
-*                                Each entry (unsigned long) holds timeout between periodic scan 
-*                                and connection scan - in milliseconds.
-*                                Saved: yes.
-*                                Default 2000ms.
+* @param    uiEnable             start/stop application scan: \n
+*                                1 = start scan with default interval value of 10 min. \n
+*                                To set a different scan interval value, apply the value in milliseconds.\n
+*                                minimum = 1 second. 0=stop.\n
+*                                Wlan reset (wlan_stop() wlan_start()) is needed when changing scan interval value.\n
+*                                Saved: No\n
+* @param   uiMinDwellTime        minimum dwell time value to be used for each channel, in milliseconds.\n
+*                                Saved: yes\n
+*                                Recommended Value: 100\n
+*                                Default: 20\n
+* @param   uiMaxDwellTime        maximum dwell time value to be used for each channel, in milliseconds.\n
+*                                Saved: yes\n
+*                                Recommended Value: 100\n
+*                                Default: 30\n
+* @param   uiNumOfProbeRequests  max probe request between dwell time. \n
+*                                Saved: yes.\n
+*                                Recommended Value: 5\n
+*                                Default:2\n
+* @param   uiChannelMask         bitwise, up to 13 channels (0x1fff). \n
+*                                Saved: yes.\n
+*                                Default: 0x7ff\n
+* @param   uiRSSIThreshold       RSSI threshold.\n
+*                                Saved: yes\n
+*                                Default: -80\n
+* @param   uiSNRThreshold        NSR threshold.\n
+*                                Saved: yes\n
+*                                Default: 0\n
+* @param   uiDefaultTxPower      probe Tx power.\n
+*                                Saved: yes\n
+*                                Default: 205\n
+* @param   aiIntervalList        pointer to array with 16 entries (16 channels) \n
+*                                Each entry (unsigned long) holds timeout between periodic scan \n
+*                                and connection scan - in milliseconds.\n
+*                                Saved: yes.\n
+*                                Default 2000ms.\n
 * @return  On success, zero is returned. On error, -1 is returned        
 * @Note    uiDefaultTxPower, is not supported on this version.
 * @sa      wlan_ioctl_get_scan_results 
@@ -398,13 +406,14 @@
 
                                            
 /**
-* Start to acquire device profile. The device acquire its own profile, if profile message is found.
-* The acquired AP information is stored in CC3000 EEPROM only when AES128 encryption is used.
-* When AES128 encryption is not used, a profile is internally created by the device.
+* Start to acquire device profile.
+* The device will acquires its own profile if a profile message is found.\n
+* The acquired AP information is stored in CC3000 EEPROM only when AES128 encryption is used.\n
+* When AES128 encryption is not used, a profile is internally created by the device.\n
 * @param    algoEncryptedFlag indicates whether the information is encrypted
 * @return   On success, zero is returned. On error, -1 is returned        
-* @Note     An asynchronous event - Smart Config Done will be generated as soon
-*           as the process finishes successfully.
+* @Note     An asynchronous event - Smart Config Done will be generated as soon\n
+*           as the process finishes successfully.\n
 * @sa       wlan_smart_config_set_prefix , wlan_smart_config_stop
 */
 extern long wlan_smart_config_start(unsigned long algoEncryptedFlag);
@@ -418,7 +427,8 @@
 extern long wlan_smart_config_stop(void);
 
 /**
-* Configure station ssid prefix. The prefix is used internally in CC3000. It should always be TTT.
+* Configure station ssid prefix.
+* The prefix is used internally in CC3000. It should always be TTT.\n
 * @param   newPrefix  3 bytes identify the SSID prefix for the Smart Config. 
 * @return  On success, zero is returned. On error, -1 is returned        
 * @Note    The prefix is stored in CC3000 NVMEM
@@ -429,8 +439,8 @@
 /**
 * Process the acquired data and store it as a profile.
 * The acquired AP information is stored in CC3000 EEPROM encrypted.
-* The encrypted data is decrypted and stored as a profile.
-* behavior is as defined by connection policy.
+* The encrypted data is decrypted and stored as a profile.\n
+* behavior is as defined by connection policy.\n
 * @param    none 
 * @return   On success, zero is returned. On error, -1 is returned        
 */
@@ -441,4 +451,11 @@
 }
 #endif // __cplusplus
 
+//*****************************************************************************
+//
+// Close the Doxygen group.
+//! @}
+//
+//*****************************************************************************
+
 #endif    // __WLAN_H__