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.
Fork of cc3000_hostdriver_mbedsocket by
Revision 47:a63fe1a4f568, committed 2015-01-20
- Comitter:
- dreschpe
- Date:
- Tue Jan 20 09:04:49 2015 +0000
- Parent:
- 46:ca8c234997c0
- Commit message:
- add access to nvmem functions to enable firmware update
Changed in this revision
cc3000.cpp | 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 |
diff -r ca8c234997c0 -r a63fe1a4f568 cc3000.cpp --- a/cc3000.cpp Sun Nov 10 21:41:44 2013 +0100 +++ b/cc3000.cpp Tue Jan 20 09:04:49 2015 +0000 @@ -434,6 +434,17 @@ _nvmem.read( NVMEM_USER_FILE_1_FILEID, size, 0, info_file); } +uint8_t cc3000::read_sp_version(uint8_t firmware[2]){ + return _nvmem.read_sp_version(firmware); + } + +uint8_t cc3000::write_patch(uint32_t file_id, uint32_t length, const uint8_t *data){ + if(file_id == NVMEM_WLAN_DRIVER_SP_FILEID || file_id == NVMEM_WLAN_FW_SP_FILEID){ + return _nvmem.write_patch(file_id, length, data); + } + else return (1); // error +} + #ifndef CC3000_TINY_DRIVER bool cc3000::get_ip_config(tNetappIpconfigRetArgs *ip_config) { if ((_status.dhcp == false) || (_status.connected == false)) {
diff -r ca8c234997c0 -r a63fe1a4f568 cc3000.h --- a/cc3000.h Sun Nov 10 21:41:44 2013 +0100 +++ b/cc3000.h Tue Jan 20 09:04:49 2015 +0000 @@ -1746,7 +1746,22 @@ * \return * Pointer to a string containing the IP address. */ - char* getIPAddress(); + char* getIPAddress(); + + /** + * \brief Return the CC3000's firmware version. + * \param firmware Retreived firmware version. + * \return 0 if successful, -1 otherwise. + */ + uint8_t read_sp_version(uint8_t firmware[2]); + + /** + * \brief routine to update firmware of CC3000 + * \param + * \return 0 if successful, -1 otherwise. + */ + uint8_t write_patch(uint32_t file_id, uint32_t length, const uint8_t *data); + /** * \brief Get the Gateway address of your Ethernet interface * \param none