Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
cc3000 Class Reference
The main object of cc3000 implementation. More...
#include <cc3000.h>
Data Structures | |
| struct | tStatus |
| status structure More... | |
Public Member Functions | |
| cc3000 (PinName cc3000_irq, PinName cc3000_en, PinName cc3000_cs, SPI cc3000_spi) | |
| Ctor. | |
| ~cc3000 () | |
| Dtor. | |
| void | start (uint8_t patch) |
| Initiate cc3000. | |
| void | stop () |
| Stops the wlan communication. | |
| void | restart (uint8_t patch) |
| Restarts the wlan communication. | |
| void | usync_callback (int32_t event_type, uint8_t *data, uint8_t length) |
| Callback which is called from the event class. | |
| bool | connect_non_blocking (const uint8_t *ssid, const uint8_t *key, int32_t security_mode) |
| Start connection to SSID (open/secured) non-blocking. | |
| bool | connect_to_AP (const uint8_t *ssid, const uint8_t *key, int32_t security_mode) |
| Connect to SSID (open/secured) with timeout (10s). | |
| bool | connect_secure (const uint8_t *ssid, const uint8_t *key, int32_t security_mode) |
| Connect to SSID which is secured. | |
| bool | connect_open (const uint8_t *ssid) |
| Connect to SSID which is open (no security) | |
| bool | is_enabled () |
| Status of the cc3000 module. | |
| bool | is_connected () |
| Status of the cc3000 connection. | |
| bool | is_dhcp_configured () |
| Status of DHCP. | |
| bool | is_smart_confing_completed () |
| Status of smart confing completation. | |
| uint8_t | get_mac_address (uint8_t address[6]) |
| Return the cc3000's mac address. | |
| uint8_t | set_mac_address (uint8_t address[6]) |
| Set the cc3000's mac address. | |
| void | get_user_file_info (uint8_t *info_file, size_t size) |
| Get user file info. | |
| void | set_user_file_info (uint8_t *info_file, size_t size) |
| Set user filo info. | |
| void | start_smart_config (const uint8_t *smart_config_key) |
| Start smart config. | |
| bool | get_ip_config (tNetappIpconfigRetArgs *ip_config) |
| Return ip configuration. | |
| void | delete_profiles (void) |
| Delete all stored profiles. | |
| uint32_t | ping (uint32_t ip, uint8_t attempts, uint16_t timeout, uint8_t size) |
| Ping an ip address. | |
| cc3000 (PinName cc3000_irq, PinName cc3000_en, PinName cc3000_cs, SPI cc3000_spi, const char *ssid, const char *phrase, Security sec, bool smart_config) | |
| Ctor for EthernetInterface. | |
| int | disconnect () |
| Disconnect wlan device. | |
| void | init () |
| Initialize the interface with DHCP. | |
| void | init (const char *ip, const char *mask, const char *gateway) |
| Initialize the interface with a static IP address. | |
| int | connect (unsigned int timeout_ms=20000) |
| Connect Bring the interface up. | |
| char * | getMACAddress () |
| Get the MAC address of your Ethernet interface. | |
| char * | getIPAddress () |
| Get the IP address of your Ethernet interface. | |
| char * | getGateway () |
| Get the Gateway address of your Ethernet interface. | |
| char * | getNetworkMask () |
| Get the Network mask of your Ethernet interface. | |
Static Public Member Functions | |
| static cc3000 * | get_instance () |
| Returns cc3000 instance. | |
Detailed Description
The main object of cc3000 implementation.
Definition at line 1538 of file cc3000.h.
Constructor & Destructor Documentation
| cc3000 | ( | PinName | cc3000_irq, |
| PinName | cc3000_en, | ||
| PinName | cc3000_cs, | ||
| SPI | cc3000_spi | ||
| ) |
Ctor.
- Parameters:
-
cc3000_irq IRQ pin cc3000_en Enable pin cc3000_cs Chip select pin cc3000_spi SPI interface
Definition at line 50 of file cc3000.cpp.
| ~cc3000 | ( | ) |
Dtor.
Definition at line 60 of file cc3000.cpp.
| cc3000 | ( | PinName | cc3000_irq, |
| PinName | cc3000_en, | ||
| PinName | cc3000_cs, | ||
| SPI | cc3000_spi, | ||
| const char * | ssid, | ||
| const char * | phrase, | ||
| Security | sec, | ||
| bool | smart_config | ||
| ) |
Ctor for EthernetInterface.
- Parameters:
-
cc3000_irq IRQ pin cc3000_en Enable pin cc3000_cs Chip select pin cc3000_spi SPI interface ssid SSID phrase Password sec Security of the AP smart_config Smart config selection
Definition at line 64 of file cc3000.cpp.
Member Function Documentation
| int connect | ( | unsigned int | timeout_ms = 20000 ) |
Connect Bring the interface up.
- Parameters:
-
timeout_ms timeout in ms
- Returns:
- 0 if successful, -1 otherwise.
Definition at line 111 of file cc3000.cpp.
| bool connect_non_blocking | ( | const uint8_t * | ssid, |
| const uint8_t * | key, | ||
| int32_t | security_mode | ||
| ) |
Start connection to SSID (open/secured) non-blocking.
- Parameters:
-
ssid SSID name key Security key (if key = 0, open connection) security_mode Security mode
- Returns:
- true if connection was established, false otherwise.
Definition at line 316 of file cc3000.cpp.
| bool connect_open | ( | const uint8_t * | ssid ) |
Connect to SSID which is open (no security)
- Parameters:
-
ssid SSID name
- Returns:
- true if connection was established, false otherwise.
Definition at line 387 of file cc3000.cpp.
| bool connect_secure | ( | const uint8_t * | ssid, |
| const uint8_t * | key, | ||
| int32_t | security_mode | ||
| ) |
Connect to SSID which is secured.
- Parameters:
-
ssid SSID name key Security key security_mode Security mode
- Returns:
- true if connection was established, false otherwise.
Definition at line 298 of file cc3000.cpp.
| bool connect_to_AP | ( | const uint8_t * | ssid, |
| const uint8_t * | key, | ||
| int32_t | security_mode | ||
| ) |
Connect to SSID (open/secured) with timeout (10s).
- Parameters:
-
ssid SSID name key Security key (if key = 0, open connection) security_mode Security mode
- Returns:
- true if connection was established, false otherwise.
Definition at line 337 of file cc3000.cpp.
| void delete_profiles | ( | void | ) |
Delete all stored profiles.
- Parameters:
-
none
- Returns:
- none
Definition at line 448 of file cc3000.cpp.
| int disconnect | ( | void | ) |
Disconnect wlan device.
- Parameters:
-
none
- Returns:
- 0 if successful, -1 otherwise.
Definition at line 179 of file cc3000.cpp.
| static cc3000* get_instance | ( | ) | [static] |
| bool get_ip_config | ( | tNetappIpconfigRetArgs * | ip_config ) |
Return ip configuration.
- Parameters:
-
ip_config Pointer to ipconfig data.
- Returns:
- true if it's connected and info was retrieved, false otherwise.
Definition at line 438 of file cc3000.cpp.
| uint8_t get_mac_address | ( | uint8_t | address[6] ) |
Return the cc3000's mac address.
- Parameters:
-
address Retreived mac address.
- Returns:
Definition at line 425 of file cc3000.cpp.
| void get_user_file_info | ( | uint8_t * | info_file, |
| size_t | size | ||
| ) |
Get user file info.
- Parameters:
-
info_file Pointer where info will be stored. size Available size.
- Returns:
- none
Definition at line 433 of file cc3000.cpp.
| char * getGateway | ( | ) |
Get the Gateway address of your Ethernet interface.
- Parameters:
-
none
- Returns:
- Pointer to a string containing the Gateway address
Definition at line 171 of file cc3000.cpp.
| char * getIPAddress | ( | ) |
Get the IP address of your Ethernet interface.
- Parameters:
-
none
- Returns:
- Pointer to a string containing the IP address.
Definition at line 167 of file cc3000.cpp.
| char * getMACAddress | ( | ) |
Get the MAC address of your Ethernet interface.
- Parameters:
-
none
- Returns:
- Pointer to a string containing the MAC address.
Definition at line 163 of file cc3000.cpp.
| char * getNetworkMask | ( | ) |
Get the Network mask of your Ethernet interface.
- Parameters:
-
none
- Returns:
- Pointer to a string containing the Network mask
Definition at line 175 of file cc3000.cpp.
| void init | ( | const char * | ip, |
| const char * | mask, | ||
| const char * | gateway | ||
| ) |
Initialize the interface with a static IP address.
- Parameters:
-
ip the IP address to use. mask the IP address mask gateway the gateway to use
- Returns:
- none
Definition at line 101 of file cc3000.cpp.
| void init | ( | ) |
Initialize the interface with DHCP.
- Parameters:
-
none
- Returns:
- none
Definition at line 84 of file cc3000.cpp.
| bool is_connected | ( | ) |
Status of the cc3000 connection.
- Returns:
- true if it's connected, false otherwise.
Definition at line 409 of file cc3000.cpp.
| bool is_dhcp_configured | ( | ) |
Status of DHCP.
- Parameters:
-
none
- Returns:
- true if DCHP is configured, false otherwise.
Definition at line 417 of file cc3000.cpp.
| bool is_enabled | ( | ) |
Status of the cc3000 module.
- Returns:
- true if it's enabled, false otherwise.
Definition at line 404 of file cc3000.cpp.
| bool is_smart_confing_completed | ( | ) |
Status of smart confing completation.
- Parameters:
-
none
- Returns:
- smart config was set, false otherwise.
Definition at line 421 of file cc3000.cpp.
| uint32_t ping | ( | uint32_t | ip, |
| uint8_t | attempts, | ||
| uint16_t | timeout, | ||
| uint8_t | size | ||
| ) |
Ping an ip address.
- Parameters:
-
ip Destination IP address attempts Number of attempts timeout Time to wait for a response,in milliseconds. size Send buffer size which may be up to 1400 bytes
Definition at line 462 of file cc3000.cpp.
| void restart | ( | uint8_t | patch ) |
Restarts the wlan communication.
Definition at line 379 of file cc3000.cpp.
| uint8_t set_mac_address | ( | uint8_t | address[6] ) |
Set the cc3000's mac address.
- Parameters:
-
address Mac address to be set.
- Returns:
Definition at line 429 of file cc3000.cpp.
| void set_user_file_info | ( | uint8_t * | info_file, |
| size_t | size | ||
| ) |
Set user filo info.
- Parameters:
-
info_file Pointer to user's info.
- Returns:
- none
Definition at line 458 of file cc3000.cpp.
| void start | ( | uint8_t | patch ) |
Initiate cc3000.
It starts the wlan communication.
- Parameters:
-
patch Patch
Definition at line 368 of file cc3000.cpp.
| void start_smart_config | ( | const uint8_t * | smart_config_key ) |
Start smart config.
- Parameters:
-
smart_config_key Pointer to smart config key.
- Returns:
- none
Definition at line 246 of file cc3000.cpp.
| void stop | ( | void | ) |
Stops the wlan communication.
Definition at line 374 of file cc3000.cpp.
| void usync_callback | ( | int32_t | event_type, |
| uint8_t * | data, | ||
| uint8_t | length | ||
| ) |
Callback which is called from the event class.
This updates status of cc3000.
- Parameters:
-
event_type Type of the event data Pointer to data length Length of data
- Returns:
- none
Definition at line 189 of file cc3000.cpp.
Generated on Tue Jul 12 2022 18:55:02 by
1.7.2