version_2.0
Dependents: cc3000_ping_demo_try_2
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000.h
- Revision:
- 33:9e23b24fb4f3
- Parent:
- 31:7b6e85b68b01
- Child:
- 34:1ad18123bf11
diff -r e62d7252401e -r 9e23b24fb4f3 cc3000.h --- a/cc3000.h Sun Oct 06 18:25:12 2013 +0200 +++ b/cc3000.h Tue Oct 08 07:04:07 2013 +0200 @@ -144,18 +144,25 @@ */ class cc3000_simple_link { public: - /** ctor - sets magic number in the buffers (overflow mark). + /** + * \brief ctor - sets magic number in the buffers (overflow mark). + * \param none + * \return none */ cc3000_simple_link(); - /** dtor + /** + * \brief dtor + * \param none + * \return none */ ~cc3000_simple_link(); - /** Returns data received flag. - * \return - * if data have been received. + /** + * \brief Returns data received flag. + * \return Data received flag. */ uint8_t get_data_received_flag(); - /** Set data received flag. + /** + * \brief Set data received flag. * \param value The value to be set. */ void set_data_received_flag(uint8_t value); @@ -166,147 +173,136 @@ */ bool get_tx_complete_signal(); /** - * \brief - * \param - * \return + * \brief Sets flag that tx was completed. + * \param value Value to be set + * \return none */ void set_tx_complete_signal(bool value); /** - * \brief - * \param - * \return + * \brief Get receive buffer. + * \param none + * \return Pointer to the receive buffer. */ uint8_t *get_received_buffer(); /** - * \brief - * \param - * \return - */ - void set_received_buffer(uint8_t value); - /** - * \brief - * \param - * \return + * \brief Get transmit buffer. + * \param none + * \return Pointer to the transmit buffer. */ uint8_t *get_transmit_buffer(); /** - * \brief - * \param + * \brief Get number of free buffers. + * \param none * \return - */ - void set_transmit_buffer(uint8_t value); - /** - * \brief - * \param - * \return + * Number of free buffers. */ uint16_t get_number_free_buffers(); /** - * \brief - * \param - * \return + * \brief Set number of free buffers. + * \param value Number of free buffers. + * \return none */ void set_number_free_buffers(uint16_t value); /** - * \brief - * \param - * \return + * \brief Retrieve buffer length. + * \param none + * \return Buffer length */ uint16_t get_buffer_length(); /** - * \brief - * \param - * \return + * \brief Set buffer length + * \param value The length + * \return none */ void set_buffer_length(uint16_t value); /** - * \brief - * \param - * \return + * \brief Retrieve pending data flag. + * \param none + * \return Pending data flag */ uint16_t get_pending_data(); /** - * \brief - * \param - * \return + * \brief Set pending data flag. + * \param value Pending data value. + * \return none */ void set_pending_data(uint16_t value); /** - * \brief - * \param - * \return + * \brief Retreive op code. + * \param none + * \return Op code */ uint16_t get_op_code(); /** - * \brief - * \param - * \return + * \brief Set op code. + * \param code op code. + * \return none */ void set_op_code(uint16_t code); /** - * \brief - * \param - * \return + * \brief Get number of released packets. + * \param none + * \return Number of released packets. */ uint16_t get_released_packets(); /** - * \brief - * \param - * \return + * \brief Set number of released packets. + * \param value Number of released packets. + * \return none */ void set_number_of_released_packets(uint16_t value); /** - * \brief - * \param - * \return + * \brief Get number of sent packats + * \param none + * \return Number of sent packets. */ uint16_t get_sent_packets(); /** - * \brief - * \param - * \return + * \brief Set number of sent packets + * \param value Number of sent packets. + * \return none */ void set_sent_packets(uint16_t value); /** - * \brief - * \param - * \return + * \brief Retrieve transmit error + * \param none + * \return Transmit error */ int32_t get_transmit_error(); /** - * \brief - * \param - * \return + * \brief Set transmit error. + * \param value Error to be set. + * \return none */ void set_transmit_error(int32_t value); /** - * \brief - * \param - * \return + * \brief Get buffer size. + * \param none + * \return Size of buffer. */ - uint16_t get_buffer_size(void); + uint16_t get_buffer_size(); /** - * \brief - * \param - * \return + * \brief Set buffer size. + * \param value Buffer size. + * \return none */ void set_buffer_size(uint16_t value); /** - * \brief - * \param - * \return + * \brief Not used currently. + * \param function Number of desired function. + * \return void pointer to the function (need to recast). */ void *get_func_pointer(FunctionNumber function); /** - * \brief - * \param - * \return + * \brief Retreive pointer to the received data. + * \param none + * \return Pointer to the received data buffer. */ - uint8_t *get_received_data(void); + uint8_t *get_received_data(); /** - * \brief - * \param - * \return + * \brief Set received data pointer. + * \param pointer Pointer to the buffer. + * \return none */ void set_received_data(uint8_t *pointer); private: @@ -324,6 +320,7 @@ uint8_t _rx_buffer[CC3000_RX_BUFFER_SIZE]; uint8_t _tx_buffer[CC3000_TX_BUFFER_SIZE]; private: + /* Not used currently */ int8_t *(* _fFWPatches)(uint32_t *length); int8_t *(* _fDriverPatches)(uint32_t *length); int8_t *(* _fBootLoaderPatches)(uint32_t *length); @@ -670,6 +667,11 @@ */ int32_t mdns_advertiser(uint16_t mdns_enabled, uint8_t * device_service_name, uint16_t device_service_name_length); #ifndef CC3000_TINY_DRIVER + /** + * \brief + * \param + * \return + */ int32_t gethostbyname(uint8_t *hostname, uint16_t name_length, uint32_t *out_ip_addr); /** * \brief @@ -688,13 +690,20 @@ */ class cc3000_spi { public: - /** ctor + /** + * \brief Ctor + * \param none + * \return none */ cc3000_spi(PinName cc3000_irq, PinName cc3000_en, PinName cc3000_cs, SPI cc3000_spi, IRQn_Type irq_port, cc3000_event &event, cc3000_simple_link &simple_link); - /** dtor + /** + * \brief Dtor + * \param none + * \return none */ ~cc3000_spi(); - /** Close SPI - disables IRQ and set received buffer to 0 + /** + * \brief Close SPI - disables IRQ and set received buffer to 0 * \param none * \return none */ @@ -892,7 +901,7 @@ * \brief Read MAC address from EEPROM. * \param mac Mac address * \return - * on success 0, error otherwise. + * On success 0, error otherwise. */ uint8_t get_mac_address(uint8_t *mac); /** @@ -1267,13 +1276,13 @@ bool get_ip_config(tNetappIpconfigRetArgs *ip_config); #endif /** - * \brief Delete all stored profiles + * \brief Delete all stored profiles. * \param none * \return none */ void delete_profiles(void); /** - * \brief Ping an ip address + * \brief Ping an ip address. * \param ip Destination IP address * \param attempts Number of attempts * \param timeout Time to wait for a response,in milliseconds. @@ -1281,7 +1290,7 @@ */ uint32_t ping(uint32_t ip, uint8_t attempts, uint16_t timeout, uint8_t size); /** - * \brief Returns cc3000 instance + * \brief Returns cc3000 instance. Used in Socket interface. * \param none * \return Pointer to cc3000 object */