COSA
An Object-Oriented Platform for Arduino Programming
CC3000 Class Reference

#include <CC3000.hh>

Inheritance diagram for CC3000:
Inheritance graph
Collaboration diagram for CC3000:
Collaboration graph

Classes

class  Driver
 
struct  hci_cmnd_accept_t
 
struct  hci_cmnd_bind_t
 
struct  hci_cmnd_close_socket_t
 
struct  hci_cmnd_connect_t
 
struct  hci_cmnd_gethostbyname_t
 
struct  hci_cmnd_getsockopt_t
 
struct  hci_cmnd_listen_t
 
struct  hci_cmnd_nvmem_read_t
 
struct  hci_cmnd_recv_t
 
struct  hci_cmnd_recvfrom_t
 
struct  hci_cmnd_select_t
 
struct  hci_cmnd_setsockopt_t
 
struct  hci_cmnd_simple_link_start_t
 
struct  hci_cmnd_socket_t
 
struct  hci_cmnd_wlan_connect_t
 
struct  hci_cmnd_wlan_ioctl_del_profile_t
 
struct  hci_cmnd_wlan_ioctl_get_scan_results_t
 
struct  hci_cmnd_wlan_ioctl_set_connection_policy_t
 
struct  hci_cmnd_wlan_ioctl_set_scanparam_t
 
struct  hci_cmnd_wlan_set_event_mask_t
 
struct  hci_data_nvmem_read_t
 
struct  hci_data_recv_t
 
struct  hci_data_send_t
 
struct  hci_evnt_accept_t
 
struct  hci_evnt_bind_t
 
struct  hci_evnt_close_socket_t
 
struct  hci_evnt_connect_t
 
struct  hci_evnt_data_unsol_free_buff_t
 
struct  hci_evnt_listen_t
 
struct  hci_evnt_netapp_getipconfig_t
 
struct  hci_evnt_netapp_ping_report_t
 
struct  hci_evnt_netapp_ping_send_t
 
struct  hci_evnt_netapp_ping_stop_t
 
struct  hci_evnt_nvmem_read_t
 
struct  hci_evnt_read_buffer_size_t
 
struct  hci_evnt_read_sp_version_t
 
struct  hci_evnt_recv_t
 
struct  hci_evnt_select_t
 
struct  hci_evnt_send_t
 
struct  hci_evnt_sendto_t
 
struct  hci_evnt_setsockopt_t
 
struct  hci_evnt_simple_link_start_t
 
struct  hci_evnt_socket_t
 
struct  hci_evnt_wlan_connect_t
 
struct  hci_evnt_wlan_disconnect_t
 
struct  hci_evnt_wlan_ioctl_del_profile_t
 
struct  hci_evnt_wlan_ioctl_get_scan_results_t
 
struct  hci_evnt_wlan_ioctl_set_connection_policy_t
 
struct  hci_evnt_wlan_ioctl_set_scanparam_t
 
struct  hci_evnt_wlan_ioctl_statusget_t
 
struct  hci_evnt_wlan_set_event_mask_t
 
struct  hci_evnt_wlan_unsol_connect_t
 
struct  hci_evnt_wlan_unsol_dhcp_t
 
struct  hci_evnt_wlan_unsol_disconnect_t
 
struct  hci_evnt_wlan_unsol_keepalive_t
 
struct  hci_evnt_wlan_unsol_ping_report_t
 
struct  hci_evnt_wlan_unsol_smart_config_done_t
 
struct  hci_evnt_wlan_unsol_tcp_close_wait_t
 
class  UnsolicitedEvent
 

Public Types

enum  Security { NO_SECURITY_TYPE = 0x0, WEP_SECURITY_TYPE = 0x1, WPA_SECURITY_TYPE = 0x2, WPA2_SECURITY_TYPE = 0x3 }
 
enum  { WLAN_STATUS_DISCONNECTED = 0, WLAN_STATUS_SCANNING = 1, WLAN_STATUS_CONNECTING = 2, WLAN_STATUS_CONNECTED = 3 }
 
enum  {
  NVMEM_NVS_FILEID = 0, NVMEM_NVS_SHADOW_FILEID = 1, NVMEM_WLAN_CONFIG_FILEID = 2, NVMEM_WLAN_CONFIG_SHADOW_FILEID = 3,
  NVMEM_WLAN_DRIVER_SP_FILEID = 4, NVMEM_WLAN_FW_SP_FILEID = 5, NVMEM_MAC_FILEID = 6, NVMEM_FRONTEND_VARS_FILEID = 7,
  NVMEM_IP_CONFIG_FILEID = 8, NVMEM_IP_CONFIG_SHADOW_FILEID = 9, NVMEM_BOOTLOADER_SP_FILEID = 10, NVMEM_RM_FILEID = 11,
  NVMEM_AES128_KEY_FILEID = 12, NVMEM_SHARED_MEM_FILEID = 13, NVMEM_USER_FILE_1_FILEID = 14, NVMEM_USER_FILE_2_FILEID = 15,
  NVMEM_MAX_ENTRY = 16
}
 
enum  { SOL_SOCKET = 0xffff }
 
enum  { SOCKOPT_RECV_NONBLOCK = 0, SOCKOPT_RECV_TIMEOUT = 1, SOCKOPT_ACCEPT_NONBLOCK = 2 }
 

Public Member Functions

 CC3000 (Board::DigitalPin cs, Board::ExternalInterruptPin irq, Board::DigitalPin vbat, SPI::Clock rate=SPI::DEFAULT_CLOCK)
 
bool begin_P (str_P hostname, uint16_t timeout=5000)
 
Socketsocket (Socket::Protocol proto, uint16_t port=0, uint8_t flag=0)
 
int service (uint16_t timeout=100)
 
bool end ()
 
void addr (uint8_t ip[4], uint8_t subnet[4])
 
void mac_addr (uint8_t mac[6])
 
void dns_addr (uint8_t ip[4])
 
int wlan_connect (Security type, str_P ssid, str_P bssid, str_P key)
 
int wlan_ioctl_set_scanparam (const hci_cmnd_wlan_ioctl_set_scanparam_t *param=NULL)
 
int wlan_ioctl_statusget ()
 
int wlan_ioctl_set_connection_policy (bool should_connect_to_open_ap, bool should_use_fast_connect, bool auto_start_use_profiles)
 
int wlan_ioctl_get_scan_results (hci_evnt_wlan_ioctl_get_scan_results_t &ret)
 
int wlan_ioctl_del_profile (uint8_t index)
 
int wlan_set_event_mask (uint16_t mask)
 
int nvmem_read (uint8_t fileid, void *dst, uint32_t src, size_t n)
 
int simple_link_start (uint8_t src)
 
int read_buffer_size (uint8_t &count, uint16_t &size)
 
int read_sp_version (uint8_t &package_id, uint8_t &package_build_nr)
 
int socket (int domain, int type, int protocol)
 
int setsockopt (int hndl, int level, int optname, const void *optval, size_t optlen)
 
int connect (int hndl, uint8_t ip[4], int port)
 
int select (int hndls, uint32_t &readhnds, uint32_t &writehndls, uint32_t &errorhndls, uint32_t sec=0UL, uint32_t us=0UL)
 
int recv (int hndl, void *buf, size_t size)
 
int send (int hndl, const void *buf, size_t size)
 
int bind (int hndl, int port)
 
int listen (int hndl)
 
int accept (int hndl, uint8_t ip[4], int &port)
 
int close (int hndl)
 
int read (uint16_t &op, void *args, uint8_t len)
 
int write (uint8_t type, uint16_t op, const void *args, uint8_t len)
 
int write (uint8_t type, uint16_t op, const void *args, uint8_t len, bool progmem)
 
int write_P (uint8_t type, uint16_t op, const void *args, uint8_t len)
 
int issue (uint16_t op, const void *args=NULL, uint8_t len=0)
 
int issue_P (uint16_t op, const void *args, uint8_t len)
 
int await (uint16_t op, void *args=NULL, uint8_t len=0)
 
int write_data (uint8_t op, const void *args, uint8_t args_len, const void *data, uint16_t data_len)
 
int write_data (uint8_t op, const void *args, uint8_t args_len, const void *data, uint16_t data_len, bool progmem)
 
int write_data_P (uint8_t op, const void *args, uint8_t args_len, const void *data, uint16_t data_len)
 
int read_data (uint8_t op, void *args, uint8_t args_len, void *data, uint16_t data_len)
 
void enable ()
 
void disable ()
 
bool is_available ()
 
void event_handler (Event::Handler *handler)
 
void set_clock (Clock rate)
 
void set_clock (uint32_t freq)
 

Static Public Member Functions

static Clock clock (uint32_t freq)
 
static Clock cycle (uint16_t ns)
 

Static Public Attributes

static const uint32_t HCI_CMND_WLAN_IOCTL_SET_SCANPARAM_MAGIC = 0x00000024L
 
static const hci_cmnd_wlan_ioctl_set_scanparam_t DEFAULT_SCANPARAM
 

Protected Types

enum  { OPTVAL_MAX = 4 }
 
enum  { SPI_OP_WRITE = 0x01, SPI_OP_REPLY = 0x02, SPI_OP_READ = 0x03 }
 
enum  { HCI_TYPE_CMND = 0x01, HCI_TYPE_DATA = 0x02, HCI_TYPE_PATCH = 0x03, HCI_TYPE_EVNT = 0x04 }
 

Protected Member Functions

bool is_socket (int hndl)
 
bool is_active (int hndl)
 
bool socket_state (int hndl, bool state)
 

Protected Attributes

OutputPin m_vbat
 
UnsolicitedEvent m_evnt_handler
 
uint8_t m_mac [6]
 
uint8_t m_ip [4]
 
uint8_t m_subnet [4]
 
uint8_t m_gateway [4]
 
uint8_t m_dns [4]
 
uint16_t BUFFER_MAX
 
uint8_t BUFFER_COUNT
 
uint8_t m_buffer_avail
 
Driver m_socket [SOCKET_MAX]
 
uint16_t m_active_set
 
IRQPin m_irq
 
volatile bool m_available
 
uint16_t m_timeout
 
Event::Handlerm_event_handler
 
uint8_t m_evnt [EVNT_MAX]
 
Driverm_next
 List of drivers. More...
 
OutputPin m_cs
 Device chip select pin. More...
 
Pulse m_pulse
 Chip select pulse width. More...
 
uint8_t m_spcr
 SPI/SPCR hardware control register setting. More...
 
uint8_t m_spsr
 SPI/SPSR hardware status register. More...
 

Static Protected Attributes

static const uint16_t DEFAULT_TIMEOUT = 300
 
static const int SOCKET_MAX = 8
 
static const uint16_t HCI_CMND_WLAN_CONNECT = 0x0001
 
static const uint32_t HCI_CMND_WLAN_CONNECT_MAGIC = 0x0000001cL
 
static const size_t HCI_CMND_WLAN_CONNECT_BSSID_MAX = 6
 
static const size_t HCI_CMND_WLAN_CONNECT_SSID_MAX = 32
 
static const size_t HCI_CMND_WLAN_CONNECT_KEY_MAX = 32
 
static const size_t HCI_CMND_WLAN_CONNECT_DATA_MAX = 64
 
static const uint16_t HCI_CMND_WLAN_DISCONNECT = 0x0002
 
static const uint16_t HCI_CMND_WLAN_IOCTL_SET_SCANPARAM = 0x0003
 
static const uint16_t HCI_CMND_WLAN_IOCTL_SET_CONNECTION_POLICY = 0x0004
 
static const uint16_t HCI_CMND_WLAN_IOCTL_ADD_PROFILE = 0x0005
 
static const uint16_t HCI_CMND_WLAN_IOCTL_DEL_PROFILE = 0x0006
 
static const uint16_t HCI_CMND_WLAN_IOCTL_GET_SCAN_RESULTS = 0x0007
 
static const uint16_t HCI_CMND_WLAN_SET_EVENT_MASK = 0x0008
 
static const uint16_t HCI_CMND_WLAN_IOCTL_STATUSGET = 0x0009
 
static const uint16_t HCI_CMND_WLAN_IOCTL_SMART_CONFIG_START = 0x000A
 
static const uint16_t HCI_CMND_WLAN_IOCTL_SMART_CONFIG_STOP = 0x000B
 
static const uint16_t HCI_CMND_WLAN_IOCTL_SMART_CONFIG_SET_PREFIX = 0x000C
 
static const uint16_t HCI_CMND_NVMEM_READ = 0x0201
 
static const uint16_t HCI_CMND_NVMEM_CREATE_ENTRY = 0x0203
 
static const uint16_t HCI_CMND_READ_SP_VERSION = 0x0207
 
static const uint16_t HCI_CMND_SOCKET = 0x1001
 
static const uint16_t HCI_CMND_BIND = 0x1002
 
static const uint16_t HCI_CMND_RECV = 0x1004
 
static const uint16_t HCI_CMND_ACCEPT = 0x1005
 
static const uint16_t HCI_CMND_LISTEN = 0x1006
 
static const uint32_t HCI_CMND_LISTEN_QUEUE_MAX = 4
 
static const uint16_t HCI_CMND_CONNECT = 0x1007
 
static const uint16_t HCI_CMND_SELECT = 0x1008
 
static const uint32_t HCI_CMND_SELECT_MAGIC = 0x00000014
 
static const uint16_t HCI_CMND_SETSOCKOPT = 0x1009
 
static const uint32_t HCI_CMND_SETSOCKOPT_MAGIC = 0x8
 
static const uint16_t HCI_CMND_GETSOCKOPT = 0x100A
 
static const uint16_t HCI_CMND_CLOSE_SOCKET = 0x100B
 
static const uint16_t HCI_CMND_RECVFROM = 0x100D
 
static const uint16_t HCI_CMND_GETHOSTBYNAME = 0x100D
 
static const uint16_t HCI_CMND_GETHOSTBYNAME_MAGIC = 8
 
static const uint16_t HOSTNAME_MAX = 32
 
static const uint16_t HCI_CMND_NETAPP_PING_SEND = 0x2002
 
static const uint16_t HCI_CMND_NETAPP_PING_REPORT = 0x2003
 
static const uint16_t HCI_CMND_NETAPP_PING_STOP = 0x2004
 
static const uint16_t HCI_CMND_NETAPP_GETIPCONFIG = 0x2005
 
static const uint16_t HCI_CMND_NETAPP_ARP_FLUSH = 0x2006
 
static const uint16_t HCI_CMND_NETAPP_SET_DEBUG_LEVEL = 0x2008
 
static const uint16_t HCI_CMND_SIMPLE_LINK_START = 0x4000
 
static const uint16_t HCI_CMND_READ_BUFFER_SIZE = 0x400B
 
static const uint8_t HCI_DATA_SEND = 0x81
 
static const uint32_t HCI_DATA_SEND_MAGIC = 0x0000000C
 
static const uint8_t HCI_DATA_SENDTO = 0x83
 
static const uint8_t HCI_DATA_RECV = 0x85
 
static const uint8_t HCI_DATA_NVMEM_WRITE = 0x90
 
static const uint8_t HCI_DATA_NVMEM_READ = 0x91
 
static const uint16_t HCI_EVNT_ANY = 0x0000
 
static const uint16_t HCI_EVNT_WLAN_CONNECT = 0x0001
 
static const uint16_t HCI_EVNT_WLAN_DISCONNECT = 0x0002
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_SET_SCANPARAM = 0x0003
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_SET_CONNECTION_POLICY = 0x0004
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_ADD_PROFILE = 0x0005
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_DEL_PROFILE = 0x0006
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_GET_SCAN_RESULTS = 0x0007
 
static const uint16_t HCI_EVNT_WLAN_SET_EVENT_MASK = 0x0008
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_STATUSGET = 0x0009
 
static const uint16_t HCI_EVNT_WLAN_IOCTL_SMART_CONFIG_SET_PREFIX = 0x000C
 
static const uint16_t HCI_EVNT_NVMEM_READ = 0x0201
 
static const uint16_t HCI_EVNT_READ_SP_VERSION = 0x0207
 
static const uint16_t HCI_EVNT_PATCHES_REQ = 0x1000
 
static const uint16_t HCI_EVNT_SOCKET = 0x1001
 
static const uint16_t HCI_EVNT_BIND = 0x1002
 
static const uint16_t HCI_EVNT_SEND = 0x1003
 
static const uint16_t HCI_EVNT_RECV = 0x1004
 
static const uint16_t HCI_EVNT_ACCEPT = 0x1005
 
static const uint16_t HCI_EVNT_LISTEN = 0x1006
 
static const uint16_t HCI_EVNT_CONNECT = 0x1007
 
static const uint16_t HCI_EVNT_SELECT = 0x1008
 
static const uint16_t HCI_EVNT_SETSOCKOPT = 0x1009
 
static const uint16_t HCI_EVNT_CLOSE_SOCKET = 0x100B
 
static const uint16_t HCI_EVNT_DATA_SENDTO = 0x100F
 
static const uint16_t HCI_EVNT_NETAPP_PING_SEND = 0x2002
 
static const uint16_t HCI_EVNT_NETAPP_PING_REPORT = 0x2003
 
static const uint16_t HCI_EVNT_NETAPP_PING_STOP = 0x2004
 
static const uint16_t HCI_EVNT_NETAPP_GETIPCONFIG = 0x2005
 
static const uint16_t HCI_EVNT_DATA_UNSOL_FREE_BUFF = 0x4100
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_CONNECT = 0x8001
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_DISCONNECT = 0x8002
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_DHCP = 0x8010
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_PING_REPORT = 0x8040
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_SMART_CONFIG_DONE = 0x8080
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_KEEPALIVE = 0x8200
 
static const uint16_t HCI_EVNT_WLAN_UNSOL_TCP_CLOSE_WAIT = 0x8800
 
static const uint16_t HCI_EVNT_SIMPLE_LINK_START = 0x4000
 
static const uint16_t HCI_EVNT_READ_BUFFER_SIZE = 0x400B
 
static const uint8_t EVNT_MAX = 64
 

Detailed Description

Cosa TI CC3000 WiFi module device driver class. Provides an implementation of the Cosa Socket and Cosa IOStream::Device classes. A socket may be bound directly to a Cosa IOStream.

References

  1. http://processors.wiki.ti.com/index.php/CC3000

Definition at line 38 of file CC3000.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
WLAN_STATUS_DISCONNECTED 
WLAN_STATUS_SCANNING 
WLAN_STATUS_CONNECTING 
WLAN_STATUS_CONNECTED 

Definition at line 438 of file CC3000.hh.

anonymous enum
Enumerator
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 
NVMEM_AES128_KEY_FILEID 
NVMEM_SHARED_MEM_FILEID 
NVMEM_USER_FILE_1_FILEID 
NVMEM_USER_FILE_2_FILEID 
NVMEM_MAX_ENTRY 

Definition at line 497 of file CC3000.hh.

anonymous enum
Enumerator
SOL_SOCKET 

Definition at line 565 of file CC3000.hh.

anonymous enum
Enumerator
SOCKOPT_RECV_NONBLOCK 
SOCKOPT_RECV_TIMEOUT 
SOCKOPT_ACCEPT_NONBLOCK 

Definition at line 568 of file CC3000.hh.

anonymous enum
protected
Enumerator
OPTVAL_MAX 

Definition at line 1036 of file CC3000.hh.

anonymous enum
protectedinherited

SPI Header Operation Code.

Enumerator
SPI_OP_WRITE 

SPI Write(Payload Length,0).

SPI_OP_REPLY 

SPI Reply(device ready).

SPI_OP_READ 

SPI Read(0,Payload Length).

Definition at line 305 of file HCI.hh.

anonymous enum
protectedinherited

HCI Message Types.

Enumerator
HCI_TYPE_CMND 

HCI Command (SPI_OP_WRITE only).

HCI_TYPE_DATA 

HCI Data (both SPI_OP_WRITE/READ).

HCI_TYPE_PATCH 

HCI Patch (SPI_OP_WRITE only).

HCI_TYPE_EVNT 

HCI Event (SPI_OP_READ only).

Definition at line 333 of file HCI.hh.

WLAN Security types for wlan_connect().

Enumerator
NO_SECURITY_TYPE 
WEP_SECURITY_TYPE 
WPA_SECURITY_TYPE 
WPA2_SECURITY_TYPE 

Definition at line 386 of file CC3000.hh.

Constructor & Destructor Documentation

CC3000::CC3000 ( Board::DigitalPin  cs,
Board::ExternalInterruptPin  irq,
Board::DigitalPin  vbat,
SPI::Clock  rate = SPI::DEFAULT_CLOCK 
)
inline

Construct CC3000 device driver with given chip select, interrupt request and enable pin. May also configure with SPI clock rate.

Parameters
[in]cschip select pin.
[in]irqinterrupt request pin.
[in]vbatenable pin.
[in]rateof communication with device.

Definition at line 279 of file CC3000.hh.

Member Function Documentation

int CC3000::accept ( int  hndl,
uint8_t  ip[4],
int &  port 
)

Accept socket connect request. Socket must be in listen mode. Returns socket handle or negative error code.

Parameters
[in]hndlsocket descriptor.
[in]ipconnecting client address.
[in]portconnect client port.
Returns
socket handle or negative error code.

Definition at line 747 of file CC3000.cpp.

void CC3000::addr ( uint8_t  ip[4],
uint8_t  subnet[4] 
)
inline

Get the current network address and subnet mask.

Parameters
[in,out]ipnetwork address.
[in,out]subnetmask.

Definition at line 329 of file CC3000.hh.

int HCI::await ( uint16_t  op,
void *  args = NULL,
uint8_t  len = 0 
)
inherited

Await HCI event and arguments. Returns argument length or negative error code. The given argument block must be able to hold incoming event message. A default event block is used when passer NULL.

Parameters
[in]opHCI event code required.
[in]argspointer to argument block.
[in]lenmax number of bytes in argument block.
Returns
argument length or negative error code.

Definition at line 123 of file HCI.cpp.

bool CC3000::begin_P ( str_P  hostname,
uint16_t  timeout = 5000 
)

Initiate CC3000 device driver with given hostname. Network address, subnet mask and gateway should be obtained from DNS. Returns true if successful otherwise false.

Parameters
[in]hostnamestring in program memory.
[in]timeoutretry timeout period.
Returns
bool.

Definition at line 268 of file CC3000.cpp.

int CC3000::bind ( int  hndl,
int  port 
)

Bind socket to given port and . Returns zero or negative error code.

Parameters
[in]hndlsocket descriptor.
[in]portto listen on.
Returns
zero or negative error code.

Definition at line 719 of file CC3000.cpp.

static Clock SPI::Driver::clock ( uint32_t  freq)
inlinestaticinherited

Calculate SPI clock rate (scale factor) for given frequency.

Parameters
[in]freqdevice max frequency (in Hz).
Returns
clock rate.

Definition at line 117 of file SPI.hh.

int CC3000::close ( int  hndl)

Close socket. Returns zero or negative error code.

Parameters
[in]hndlsocket descriptor.
Returns
zero or negative error code.

Definition at line 770 of file CC3000.cpp.

int CC3000::connect ( int  hndl,
uint8_t  ip[4],
int  port 
)

Connect to given server with given address and port. Returns zero or negative error code.

Parameters
[in]hndlsocket descriptor.
[in]ipaddress of server.
[in]portof server.
Returns
zero or negative error code.

Definition at line 658 of file CC3000.cpp.

static Clock SPI::Driver::cycle ( uint16_t  ns)
inlinestaticinherited

Calculate SPI clock rate (scale factor) for given clock cycle time in nano seconds.

Parameters
[in]nsmin device clock cycle time.
Returns
clock rate.

Definition at line 135 of file SPI.hh.

void HCI::disable ( )
inlineinherited

Disable incoming HCI packets (DATA/EVNT).

Definition at line 243 of file HCI.hh.

void CC3000::dns_addr ( uint8_t  ip[4])
inline

Get DNS network address if W5100 device driver was initiated with hostname and obtained network address from DHCP.

Parameters
[in,out]ipnetwork address.

Definition at line 349 of file CC3000.hh.

void HCI::enable ( )
inlineinherited

Enable incoming HCI packets (DATA/EVNT).

Definition at line 235 of file HCI.hh.

bool CC3000::end ( )

Terminate CC3000 device driver. Closes all active sockets. Return true if successful otherwise false.

Definition at line 363 of file CC3000.cpp.

void HCI::event_handler ( Event::Handler handler)
inlineinherited

Set event service handler. Called by service() for incoming events.

Parameters
[in]handler.

Definition at line 262 of file HCI.hh.

bool CC3000::is_active ( int  hndl)
inlineprotected

Return true if the handle is an active socket handle otherwise false.

Parameters
[in]hndlsocket handle.
Returns
bool.

Definition at line 725 of file CC3000.hh.

bool HCI::is_available ( )
inlineinherited

Return true(1) if a packet is available otherwise false(0).

Returns
bool.

Definition at line 252 of file HCI.hh.

bool CC3000::is_socket ( int  hndl)
inlineprotected

Return true if the handle is a possible socket descriptor otherwise false.

Parameters
[in]hndlpossible socket handle.
Returns
bool.

Definition at line 714 of file CC3000.hh.

int HCI::issue ( uint16_t  op,
const void *  args = NULL,
uint8_t  len = 0 
)
inlineinherited

Issue given HCI command message and arguments. Returns argument length or negative error code.

Parameters
[in]opHCI operation command.
[in]argspointer to argument block.
[in]lennumber of bytes in argument block.
Returns
argument length or negative error code.

Definition at line 140 of file HCI.hh.

int HCI::issue_P ( uint16_t  op,
const void *  args,
uint8_t  len 
)
inlineinherited

Issue given HCI command message and arguments in program memory block. Returns argument length or negative error code.

Parameters
[in]opHCI operation command.
[in]argspointer to argument block.
[in]lennumber of bytes in argument block.
Returns
argument length or negative error code.

Definition at line 153 of file HCI.hh.

int CC3000::listen ( int  hndl)

Put socket in listen mode (server). Returns zero or negative error code.

Parameters
[in]hndlsocket descriptor.
Returns
zero or negative error code.

Definition at line 733 of file CC3000.cpp.

void CC3000::mac_addr ( uint8_t  mac[6])
inline

Get the device mac address.

Parameters
[in,out]macdevice address.

Definition at line 339 of file CC3000.hh.

int CC3000::nvmem_read ( uint8_t  fileid,
void *  dst,
uint32_t  src,
size_t  n 
)

Read CC300 non-volatile memory (EEPROM) block from given source in given file to given destination buffer.

Parameters
[in]fileidfile identity.
[in]dstdestination buffer.
[in]srcsource offset in file.
[in]nnumber of bytes to read.

Definition at line 523 of file CC3000.cpp.

int HCI::read ( uint16_t &  op,
void *  args,
uint8_t  len 
)
inherited

Read HCI operation and arguments. Returns argument length or negative error code. The given argument block must be able to hold incoming packet.

Parameters
[out]opHCI operation command.
[in]argspointer to argument block.
[in]lenmax number of bytes in argument block.
Returns
argument length or negative error code.

Definition at line 25 of file HCI.cpp.

int CC3000::read_buffer_size ( uint8_t &  count,
uint16_t &  size 
)

Query CC3000 for number of buffers and their size. Returns zero(0) or negative error code.

Parameters
[out]countnumber of buffers.
[out]bytesper buffer.
Returns
zero or negative error code.

Definition at line 579 of file CC3000.cpp.

int HCI::read_data ( uint8_t  op,
void *  args,
uint8_t  args_len,
void *  data,
uint16_t  data_len 
)
inherited

Issue HCI read data command message and arguments. Returns payload length or negative error code.

Parameters
[in]opHCI data operation command.
[in]argspointer to command argument block.
[in]args_lennumber of bytes in command argument block.
[in]datapointer to data block.
[in]data_lennumber of bytes in data block.
Returns
argument length or negative error code.

Definition at line 158 of file HCI.cpp.

int CC3000::read_sp_version ( uint8_t &  package_id,
uint8_t &  package_build_nr 
)

Query CC3000 for service package information; package identification and build number. Returns zero(0) or negative error code.

Parameters
[out]package_id.
[out]package_build_nr.
Returns
zero or negative error code.

Definition at line 594 of file CC3000.cpp.

int CC3000::recv ( int  hndl,
void *  buf,
size_t  size 
)

Receive message to given buffer with given size. Returns number of bytes received or negative error code.

Parameters
[in]hndlsocket descriptor.
[in]bufmessage buffer.
[in]sizeof message buffer.
Returns
zero or negative error code.

Definition at line 674 of file CC3000.cpp.

int CC3000::select ( int  hndls,
uint32_t &  readhnds,
uint32_t &  writehndls,
uint32_t &  errorhndls,
uint32_t  sec = 0UL,
uint32_t  us = 0UL 
)

Poll given set of handles for waiting read, write or errors operations. Returns zero and socket handle set otherwise a negative error code.

Parameters
[in]hndlsnumber of handles in set (max handle number + 1).
[in,out]readhndlsread handle set.
[in,out]writehndlswrite handle set.
[in,out]errorhndlserror handle set.
[in]sectimeout in seconds.
[in]ustimeout in micro-seconds.
Returns
zero or negative error code.

Definition at line 639 of file CC3000.cpp.

int CC3000::send ( int  hndl,
const void *  buf,
size_t  size 
)

Send message from given buffer with given size. Returns number of bytes sent or negative error code.

Parameters
[in]hndlsocket descriptor.
[in]bufmessage buffer.
[in]sizeof message buffer.
Returns
zero or negative error code.

Definition at line 701 of file CC3000.cpp.

int CC3000::service ( uint16_t  timeout = 100)

Service device events with given timeout.

Parameters
[in]timeoutin milli-seconds.
Returns
zero or negative error code.

Definition at line 352 of file CC3000.cpp.

void SPI::Driver::set_clock ( Clock  rate)
inherited

Set SPI master clock rate.

Parameters
[in]clockrate.

Definition at line 297 of file SPI.cpp.

void SPI::Driver::set_clock ( uint32_t  freq)
inlineinherited

Set SPI master clock frequency.

Parameters
[in]freqdevice max frequency (in Hz).

Definition at line 157 of file SPI.hh.

int CC3000::setsockopt ( int  hndl,
int  level,
int  optname,
const void *  optval,
size_t  optlen 
)

Set socket option. Return zero if successful otherwise a negative error code.

Parameters
[in]hndlsocket handle.
[in]levelof the option.
[in]optnameoption name.
[in]optvalpointer to option block.
[in]optlenlength of option block.
Returns
zero or negative error code.

Definition at line 624 of file CC3000.cpp.

int CC3000::simple_link_start ( uint8_t  src)

Initialize CC3000 internal modules. Use given patch source (0x00 for NVMEM, 0x01 for host, 0x02 for no patches). Returns zero or negative error code.

Parameters
[in]srcpatch source.
Returns
zero or negative error code.

Definition at line 544 of file CC3000.cpp.

Socket * CC3000::socket ( Socket::Protocol  proto,
uint16_t  port = 0,
uint8_t  flag = 0 
)

Allocate socket with the given protocol, port and flags. Returns pointer to socket. The socket is deallocated with Socket::close().

Parameters
[in]protosocket protocol.
[in]portnumber (Default 0).
[in]flag.
Returns
socket pointer or NULL.

Definition at line 315 of file CC3000.cpp.

int CC3000::socket ( int  domain,
int  type,
int  protocol 
)

Create socket for given domain, type and protocol. Ruturn socket descriptor or negative error code.

Parameters
[in]domain(AF_INET).
[in]type(SOCK_STREAM, SOCK_DGRAM or SOCK_RAW).
[in]protocol(IPPROTO_TCP, IPPROTO_UDP, IPPROTO_RAW).
Returns
socket descriptor or negative error code.

Definition at line 609 of file CC3000.cpp.

bool CC3000::socket_state ( int  hndl,
bool  state 
)
inlineprotected

Mark given socket according to given state. Return true if the handle was a socket descriptor and the operation was successful otherwise false.

Parameters
[in]hndlsocket handle.
[in]stateof socket (active, deactive).
Returns
bool.

Definition at line 739 of file CC3000.hh.

int CC3000::wlan_connect ( Security  type,
str_P  ssid,
str_P  bssid,
str_P  key 
)

Instruct the CC3000 to connect to a given access point. Returns zero if successful otherwise a negative error code.

Parameters
[in]typeof security.
[in]ssidstring in program memory.
[in]bssidstring in program memory (or NULL).
[in]keystring in program memory.
Returns
zero or negative error code.

Definition at line 371 of file CC3000.cpp.

int CC3000::wlan_ioctl_del_profile ( uint8_t  index)

Delete stored profile.

Parameters
[in]indexof profile.

Definition at line 492 of file CC3000.cpp.

int CC3000::wlan_ioctl_get_scan_results ( hci_evnt_wlan_ioctl_get_scan_results_t ret)

Get the results from network scan initiated by calling wlan_ioctl_set_scanparam(). Returns value in event structure. The first call after the scan will have the highest network id and following calls with have network id lower until zero, which indicates the last entry.

Definition at line 479 of file CC3000.cpp.

int CC3000::wlan_ioctl_set_connection_policy ( bool  should_connect_to_open_ap,
bool  should_use_fast_connect,
bool  auto_start_use_profiles 
)

Set policy to control if and how the CC3000 will try to automatically associate to an access point.

Definition at line 459 of file CC3000.cpp.

int CC3000::wlan_ioctl_set_scanparam ( const hci_cmnd_wlan_ioctl_set_scanparam_t param = NULL)

Trigger CC3000 to scan available access points with given parameter block in program memory.

Parameters
[in]paramblock.
Returns
zero or negative error code.

Definition at line 428 of file CC3000.cpp.

int CC3000::wlan_ioctl_statusget ( )

Get WLAN status.

Returns
status or negative error code.

Definition at line 446 of file CC3000.cpp.

int CC3000::wlan_set_event_mask ( uint16_t  mask)

Set event mask.

Parameters
[in]maskevents.

Definition at line 509 of file CC3000.cpp.

int HCI::write ( uint8_t  type,
uint16_t  op,
const void *  args,
uint8_t  len 
)
inlineinherited

Write given HCI type operation and arguments. Returns argument length or negative error code.

Parameters
[in]typeHCI message type.
[in]opHCI operation command.
[in]argspointer to argument block.
[in]lennumber of bytes in argument block.
Returns
argument length or negative error code.

Definition at line 100 of file HCI.hh.

int HCI::write ( uint8_t  type,
uint16_t  op,
const void *  args,
uint8_t  len,
bool  progmem 
)
inherited

Write given HCI type operation and arguments. Returns argument length or negative error code.

Parameters
[in]typeHCI message type.
[in]opHCI operation command.
[in]argspointer to argument block (program memory).
[in]lennumber of bytes in argument block.
[in]progmemargment block in program memory.
Returns
argument length or negative error code.

Definition at line 81 of file HCI.cpp.

int HCI::write_data ( uint8_t  op,
const void *  args,
uint8_t  args_len,
const void *  data,
uint16_t  data_len 
)
inlineinherited

Write data with given data operation code, argument block and data payload. Returns number of bytes written or negative error code.

Parameters
[in]opdata operation code.
[in]argspointer to argument block.
[in]args_lennumber of bytes in argument block.
[in]datapointer to data block
[in]data_lennumber of bytes in data block.
Returns
number of bytes written or negative error code.

Definition at line 181 of file HCI.hh.

int HCI::write_data ( uint8_t  op,
const void *  args,
uint8_t  args_len,
const void *  data,
uint16_t  data_len,
bool  progmem 
)
inherited

Write data with given data operation code, argument block and data payload in given memory source. Returns number of bytes written or negative error code.

Parameters
[in]opdata operation code.
[in]argspointer to argument block.
[in]args_lennumber of bytes in argument block.
[in]datapointer to data block.
[in]data_lennumber of bytes in data block.
[in]progmemflag data block in program memory.
Returns
number of bytes written or negative error code.

Definition at line 221 of file HCI.cpp.

int HCI::write_data_P ( uint8_t  op,
const void *  args,
uint8_t  args_len,
const void *  data,
uint16_t  data_len 
)
inlineinherited

Write data with given data operation code, argument block and data payload in program memory. Returns number of bytes written or negative error code.

Parameters
[in]opdata operation code.
[in]argspointer to argument block.
[in]args_lennumber of bytes in argument block.
[in]datapointer to data block in program memory.
[in]data_lennumber of bytes in data block.
Returns
number of bytes written or negative error code.

Definition at line 198 of file HCI.hh.

int HCI::write_P ( uint8_t  type,
uint16_t  op,
const void *  args,
uint8_t  len 
)
inlineinherited

Write given HCI type operation and arguments in program memory. Returns argument length or negative error code.

Parameters
[in]typeHCI message type.
[in]opHCI operation command.
[in]argspointer to argument block in program memory.
[in]lennumber of bytes in argument block.
Returns
argument length or negative error code.

Definition at line 114 of file HCI.hh.

Member Data Documentation

uint8_t CC3000::BUFFER_COUNT
protected

Max number of buffers. Valid after calling begin_P().

Definition at line 694 of file CC3000.hh.

uint16_t CC3000::BUFFER_MAX
protected

Size of buffers. Valid after calling begin_P().

Definition at line 691 of file CC3000.hh.

const hci_cmnd_wlan_ioctl_set_scanparam_t CC3000::DEFAULT_SCANPARAM
static

Default scan parameters in program memory.

Definition at line 428 of file CC3000.hh.

const uint16_t CC3000::DEFAULT_TIMEOUT = 300
staticprotected

Default startup timeout in ms.

Definition at line 688 of file CC3000.hh.

const uint8_t HCI::EVNT_MAX = 64
staticprotectedinherited

Size of default event block.

Definition at line 353 of file HCI.hh.

const uint16_t CC3000::HCI_CMND_ACCEPT = 0x1005
staticprotected
const uint16_t CC3000::HCI_CMND_BIND = 0x1002
staticprotected
const uint16_t CC3000::HCI_CMND_CLOSE_SOCKET = 0x100B
staticprotected
const uint16_t CC3000::HCI_CMND_CONNECT = 0x1007
staticprotected
const uint16_t CC3000::HCI_CMND_GETHOSTBYNAME = 0x100D
staticprotected

HCI Command get host by name.

Definition at line 1092 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_GETHOSTBYNAME_MAGIC = 8
staticprotected

Definition at line 1093 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_GETSOCKOPT = 0x100A
staticprotected

HCI Command get socket option.

Definition at line 1061 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_LISTEN = 0x1006
staticprotected
const uint32_t CC3000::HCI_CMND_LISTEN_QUEUE_MAX = 4
staticprotected

Definition at line 961 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NETAPP_ARP_FLUSH = 0x2006
staticprotected

Definition at line 1106 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NETAPP_GETIPCONFIG = 0x2005
staticprotected

Definition at line 1105 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NETAPP_PING_REPORT = 0x2003
staticprotected

Definition at line 1103 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NETAPP_PING_SEND = 0x2002
staticprotected

Definition at line 1102 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NETAPP_PING_STOP = 0x2004
staticprotected

Definition at line 1104 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NETAPP_SET_DEBUG_LEVEL = 0x2008
staticprotected

Definition at line 1107 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NVMEM_CREATE_ENTRY = 0x0203
staticprotected

Definition at line 878 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_NVMEM_READ = 0x0201
staticprotected
const uint16_t CC3000::HCI_CMND_READ_BUFFER_SIZE = 0x400B
staticprotected
const uint16_t CC3000::HCI_CMND_READ_SP_VERSION = 0x0207
staticprotected
const uint16_t CC3000::HCI_CMND_RECV = 0x1004
staticprotected
const uint16_t CC3000::HCI_CMND_RECVFROM = 0x100D
staticprotected

HCI Command get socket option.

Definition at line 1084 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_SELECT = 0x1008
staticprotected
const uint32_t CC3000::HCI_CMND_SELECT_MAGIC = 0x00000014
staticprotected

Definition at line 1000 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_SETSOCKOPT = 0x1009
staticprotected

HCI Command set socket option.

Definition at line 1034 of file CC3000.hh.

const uint32_t CC3000::HCI_CMND_SETSOCKOPT_MAGIC = 0x8
staticprotected

Definition at line 1035 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_SIMPLE_LINK_START = 0x4000
staticprotected
const uint16_t CC3000::HCI_CMND_SOCKET = 0x1001
staticprotected
const uint16_t CC3000::HCI_CMND_WLAN_CONNECT = 0x0001
staticprotected
const size_t CC3000::HCI_CMND_WLAN_CONNECT_BSSID_MAX = 6
staticprotected

Definition at line 752 of file CC3000.hh.

const size_t CC3000::HCI_CMND_WLAN_CONNECT_DATA_MAX = 64
staticprotected

Definition at line 755 of file CC3000.hh.

const size_t CC3000::HCI_CMND_WLAN_CONNECT_KEY_MAX = 32
staticprotected

Definition at line 754 of file CC3000.hh.

const uint32_t CC3000::HCI_CMND_WLAN_CONNECT_MAGIC = 0x0000001cL
staticprotected

Definition at line 751 of file CC3000.hh.

const size_t CC3000::HCI_CMND_WLAN_CONNECT_SSID_MAX = 32
staticprotected

Definition at line 753 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_DISCONNECT = 0x0002
staticprotected
const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_ADD_PROFILE = 0x0005
staticprotected

Definition at line 814 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_DEL_PROFILE = 0x0006
staticprotected
const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_GET_SCAN_RESULTS = 0x0007
staticprotected
const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_SET_CONNECTION_POLICY = 0x0004
staticprotected
const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_SET_SCANPARAM = 0x0003
staticprotected
const uint32_t CC3000::HCI_CMND_WLAN_IOCTL_SET_SCANPARAM_MAGIC = 0x00000024L
static

Set scan parameters magic number.

Definition at line 423 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_SMART_CONFIG_SET_PREFIX = 0x000C
staticprotected

Definition at line 859 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_SMART_CONFIG_START = 0x000A
staticprotected

Definition at line 857 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_SMART_CONFIG_STOP = 0x000B
staticprotected

Definition at line 858 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_IOCTL_STATUSGET = 0x0009
staticprotected

Definition at line 856 of file CC3000.hh.

const uint16_t CC3000::HCI_CMND_WLAN_SET_EVENT_MASK = 0x0008
staticprotected
const uint8_t CC3000::HCI_DATA_NVMEM_READ = 0x91
staticprotected
const uint8_t CC3000::HCI_DATA_NVMEM_WRITE = 0x90
staticprotected

Definition at line 1161 of file CC3000.hh.

const uint8_t CC3000::HCI_DATA_RECV = 0x85
staticprotected
const uint8_t CC3000::HCI_DATA_SEND = 0x81
staticprotected
const uint32_t CC3000::HCI_DATA_SEND_MAGIC = 0x0000000C
staticprotected

Definition at line 1129 of file CC3000.hh.

const uint8_t CC3000::HCI_DATA_SENDTO = 0x83
staticprotected

Definition at line 1145 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_ACCEPT = 0x1005
staticprotected
const uint16_t CC3000::HCI_EVNT_ANY = 0x0000
staticprotected

HCI Synthetic Event for unsolicited event service.

Definition at line 1176 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_BIND = 0x1002
staticprotected

HCI Event bind.

Definition at line 1297 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_CLOSE_SOCKET = 0x100B
staticprotected
const uint16_t CC3000::HCI_EVNT_CONNECT = 0x1007
staticprotected
const uint16_t CC3000::HCI_EVNT_DATA_SENDTO = 0x100F
staticprotected
const uint16_t CC3000::HCI_EVNT_DATA_UNSOL_FREE_BUFF = 0x4100
staticprotected
const uint16_t CC3000::HCI_EVNT_LISTEN = 0x1006
staticprotected
const uint16_t CC3000::HCI_EVNT_NETAPP_GETIPCONFIG = 0x2005
staticprotected
const uint16_t CC3000::HCI_EVNT_NETAPP_PING_REPORT = 0x2003
staticprotected
const uint16_t CC3000::HCI_EVNT_NETAPP_PING_SEND = 0x2002
staticprotected
const uint16_t CC3000::HCI_EVNT_NETAPP_PING_STOP = 0x2004
staticprotected
const uint16_t CC3000::HCI_EVNT_NVMEM_READ = 0x0201
staticprotected
const uint16_t CC3000::HCI_EVNT_PATCHES_REQ = 0x1000
staticprotected

Definition at line 1281 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_READ_BUFFER_SIZE = 0x400B
staticprotected
const uint16_t CC3000::HCI_EVNT_READ_SP_VERSION = 0x0207
staticprotected
const uint16_t CC3000::HCI_EVNT_RECV = 0x1004
staticprotected
const uint16_t CC3000::HCI_EVNT_SELECT = 0x1008
staticprotected
const uint16_t CC3000::HCI_EVNT_SEND = 0x1003
staticprotected
const uint16_t CC3000::HCI_EVNT_SETSOCKOPT = 0x1009
staticprotected

HCI Command set socket option.

Definition at line 1376 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_SIMPLE_LINK_START = 0x4000
staticprotected
const uint16_t CC3000::HCI_EVNT_SOCKET = 0x1001
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_CONNECT = 0x0001
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_DISCONNECT = 0x0002
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_ADD_PROFILE = 0x0005
staticprotected

Definition at line 1219 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_DEL_PROFILE = 0x0006
staticprotected

HCI Event WLAN ioctl del profile http://processors.wiki.ti.com/index.php/CC3000_HCI_EVNT_messages

Definition at line 1225 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_GET_SCAN_RESULTS = 0x0007
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_SET_CONNECTION_POLICY = 0x0004
staticprotected

HCI Event WLAN ioctl set connection policy http://processors.wiki.ti.com/index.php/CC3000_HCI_EVNT_messages

Definition at line 1212 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_SET_SCANPARAM = 0x0003
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_SMART_CONFIG_SET_PREFIX = 0x000C
staticprotected

Definition at line 1258 of file CC3000.hh.

const uint16_t CC3000::HCI_EVNT_WLAN_IOCTL_STATUSGET = 0x0009
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_SET_EVENT_MASK = 0x0008
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_CONNECT = 0x8001
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_DHCP = 0x8010
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_DISCONNECT = 0x8002
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_KEEPALIVE = 0x8200
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_PING_REPORT = 0x8040
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_SMART_CONFIG_DONE = 0x8080
staticprotected
const uint16_t CC3000::HCI_EVNT_WLAN_UNSOL_TCP_CLOSE_WAIT = 0x8800
staticprotected
const uint16_t CC3000::HOSTNAME_MAX = 32
staticprotected

Definition at line 1094 of file CC3000.hh.

uint16_t CC3000::m_active_set
protected

Active socket set.

Definition at line 706 of file CC3000.hh.

volatile bool HCI::m_available
protectedinherited

Request flag.

Definition at line 344 of file HCI.hh.

uint8_t CC3000::m_buffer_avail
protected

Current number of buffers. Valid after calling begin_P().

Definition at line 697 of file CC3000.hh.

OutputPin SPI::Driver::m_cs
protectedinherited

Device chip select pin.

Definition at line 166 of file SPI.hh.

uint8_t CC3000::m_dns[4]
protected

DNS server address.

Definition at line 685 of file CC3000.hh.

Event::Handler* HCI::m_event_handler
protectedinherited

Event handler for unsolicited events.

Definition at line 350 of file HCI.hh.

uint8_t HCI::m_evnt[EVNT_MAX]
protectedinherited

Default event block.

Definition at line 356 of file HCI.hh.

UnsolicitedEvent CC3000::m_evnt_handler
protected

Unsolicited Event handler.

Definition at line 670 of file CC3000.hh.

uint8_t CC3000::m_gateway[4]
protected

Gateway address.

Definition at line 682 of file CC3000.hh.

uint8_t CC3000::m_ip[4]
protected

Network address.

Definition at line 676 of file CC3000.hh.

IRQPin HCI::m_irq
protectedinherited

Interrupt request handler.

Definition at line 341 of file HCI.hh.

uint8_t CC3000::m_mac[6]
protected

Device mac address.

Definition at line 673 of file CC3000.hh.

Driver* SPI::Driver::m_next
protectedinherited

List of drivers.

Definition at line 164 of file SPI.hh.

Pulse SPI::Driver::m_pulse
protectedinherited

Chip select pulse width.

Definition at line 167 of file SPI.hh.

Driver CC3000::m_socket[SOCKET_MAX]
protected

Sockets.

Definition at line 703 of file CC3000.hh.

uint8_t SPI::Driver::m_spcr
protectedinherited

SPI/SPCR hardware control register setting.

Definition at line 173 of file SPI.hh.

uint8_t SPI::Driver::m_spsr
protectedinherited

SPI/SPSR hardware status register.

Definition at line 174 of file SPI.hh.

uint8_t CC3000::m_subnet[4]
protected

Subnet mask.

Definition at line 679 of file CC3000.hh.

uint16_t HCI::m_timeout
protectedinherited

Reply timeout in milli-seconds.

Definition at line 347 of file HCI.hh.

OutputPin CC3000::m_vbat
protected

Function enable pin.

Definition at line 667 of file CC3000.hh.

const int CC3000::SOCKET_MAX = 8
staticprotected

Maximum number of sockets on device.

Definition at line 700 of file CC3000.hh.


The documentation for this class was generated from the following files: