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.
Dependents: cc3000_ping_demo_try_2
Fork of cc3000_hostdriver_mbedsocket by
cc3000_nvmem Class Reference
NVMEM layer. More...
#include <cc3000.h>
Public Member Functions | |
cc3000_nvmem (cc3000_hci &hci, cc3000_event &event, cc3000_simple_link &simple_link) | |
Ctor. | |
~cc3000_nvmem () | |
Dtor. | |
int32_t | read (uint32_t file_id, uint32_t length, uint32_t offset, uint8_t *buff) |
Reads data from the file referred by the file_id parameter. | |
int32_t | write (uint32_t file_id, uint32_t length, uint32_t entry_offset, uint8_t *buff) |
Write data to nvmem. | |
uint8_t | set_mac_address (uint8_t *mac) |
Write MAC address to EEPROM. | |
uint8_t | get_mac_address (uint8_t *mac) |
Read MAC address from EEPROM. | |
uint8_t | write_patch (uint32_t file_id, uint32_t length, const uint8_t *data) |
Program a patch to a specific file ID. | |
int32_t | create_entry (uint32_t file_id, uint32_t new_len) |
Create new file entry and allocate space on the NVMEM. | |
uint8_t | read_sp_version (uint8_t *patch_ver) |
Read patch version. |
Detailed Description
NVMEM layer.
Definition at line 1244 of file cc3000.h.
Constructor & Destructor Documentation
cc3000_nvmem | ( | cc3000_hci & | hci, |
cc3000_event & | event, | ||
cc3000_simple_link & | simple_link | ||
) |
Ctor.
- Parameters:
-
hci Reference to the hci object. event Reference to the event object. simple_link Reference to the simple link object.
- Returns:
- none
Definition at line 47 of file cc3000_nvmem.cpp.
~cc3000_nvmem | ( | ) |
Member Function Documentation
int32_t create_entry | ( | uint32_t | file_id, |
uint32_t | new_len | ||
) |
Create new file entry and allocate space on the NVMEM.
Applies only to user files.
- Parameters:
-
file_id nvmem file Id new_len entry ulLength
- Returns:
Definition at line 141 of file cc3000_nvmem.cpp.
uint8_t get_mac_address | ( | uint8_t * | mac ) |
Read MAC address from EEPROM.
- Parameters:
-
mac Mac address
- Returns:
- On success 0, error otherwise.
Definition at line 112 of file cc3000_nvmem.cpp.
int32_t read | ( | uint32_t | file_id, |
uint32_t | length, | ||
uint32_t | offset, | ||
uint8_t * | buff | ||
) |
Reads data from the file referred by the file_id parameter.
Reads data from file offset till length. Err if the file can't be used, is invalid, or if the read is out of bounds.
- Parameters:
-
file_id nvmem file id. length number of bytes to read. offset offset in file from where to read. buff output buffer pointer.
- Returns:
- Number of bytes read, otherwise error.
Definition at line 56 of file cc3000_nvmem.cpp.
uint8_t read_sp_version | ( | uint8_t * | patch_ver ) |
Read patch version.
read package version (WiFi FW patch, river-supplicant-NS patch, bootloader patch)
- Parameters:
-
patch_ver First number indicates package ID and the second number indicates package build number
- Returns:
- On success 0, error otherwise.
Definition at line 162 of file cc3000_nvmem.cpp.
uint8_t set_mac_address | ( | uint8_t * | mac ) |
Write MAC address to EEPROM.
- Parameters:
-
mac Mac address to be set
- Returns:
- On success 0, error otherwise.
Definition at line 108 of file cc3000_nvmem.cpp.
int32_t write | ( | uint32_t | file_id, |
uint32_t | length, | ||
uint32_t | entry_offset, | ||
uint8_t * | buff | ||
) |
Write data to nvmem.
- Parameters:
-
file_id Nvmem file id length number of bytes to write entry_offset offset in file to start write operation from buff data to write
- Returns:
- On success 0, error otherwise.
Definition at line 81 of file cc3000_nvmem.cpp.
uint8_t write_patch | ( | uint32_t | file_id, |
uint32_t | length, | ||
const uint8_t * | data | ||
) |
Program a patch to a specific file ID.
The SP data is assumed to be organized in 2-dimensional. Each line is SP_PORTION_SIZE bytes long.
- Parameters:
-
file_id nvmem file id/ length number of bytes to write data SP data to write
- Returns:
- On success 0, error otherwise.
Definition at line 116 of file cc3000_nvmem.cpp.
Generated on Tue Jul 12 2022 18:37:33 by
