cc3000 hostdriver with the mbed socket interface
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000.h
- Revision:
- 39:03ac37ab34eb
- Parent:
- 38:1d374a7f0c0d
- Child:
- 42:bd2c631a031a
diff -r 1d374a7f0c0d -r 03ac37ab34eb cc3000.h --- a/cc3000.h Tue Oct 08 22:37:53 2013 +0000 +++ b/cc3000.h Sat Oct 12 20:46:19 2013 +0000 @@ -50,6 +50,7 @@ #include "cc3000_socket.h" #define MAX_SOCKETS 4 +#define CC3000_ETH_COMPAT /** Enable debug messages, remove comment from the ones you want or all. */ @@ -1543,6 +1544,7 @@ bool stop_smart_config; bool dhcp_configured; bool ok_to_shut_down; + bool enabled; } tStatus; /** * \brief Ctor. @@ -1584,7 +1586,15 @@ */ void usync_callback(int32_t event_type, uint8_t *data, uint8_t length); /** - * \brief Connect to SSID (open/secured) with timeout (10ms). + * \brief Start connection to SSID (open/secured) non-blocking + * \param ssid SSID name + * \param key Security key (if key = 0, open connection) + * \param security_mode Security mode + * \return true if connection was established, false otherwise. + */ + bool connect_non_blocking(const uint8_t *ssid, const uint8_t *key, int32_t security_mode); + /** + * \brief Connect to SSID (open/secured) with timeout (10s). * \param ssid SSID name * \param key Security key (if key = 0, open connection) * \param security_mode Security mode @@ -1606,6 +1616,11 @@ */ bool connect_open(const uint8_t *ssid); /** + * \brief Status of the cc3000 module. + * \return true if it's enabled, false otherwise. + */ + bool is_enabled(); + /** * \brief Status of the cc3000 connection. * \return true if it's connected, false otherwise. */ @@ -1683,6 +1698,35 @@ static cc3000 *get_instance() { return _inst; } +#ifdef CC3000_ETH_COMPAT + /** + * \brief + * \param + * \return + */ + char* getMACAddress(); + + /** + * \brief + * \param + * \return + */ + char* getIPAddress(); + + /** + * \brief + * \param + * \return + */ + char* getGateway(); + + /** + * \brief + * \param + * \return + */ + char* getNetworkMask(); +#endif public: cc3000_simple_link _simple_link; cc3000_event _event;