Driver for CC3000 Wi-Fi module
Dependencies: NVIC_set_all_priorities
Dependents: CC3000_Simple_Socket Wi-Go_IOT_Demo
Nvmem
Functions | |
signed long | nvmem_read (unsigned long file_id, unsigned long length, unsigned long offset, unsigned char *buff) |
Read 'length' data at offset 'ulOffset' from nvmem to file 'ulFileId'. | |
signed long | nvmem_write (unsigned long ulFileId, unsigned long ulLength, unsigned long ulEntryOffset, unsigned char *buff) |
Write 'length' data at offset 'ulOffset' from file 'ulFileId' to nvmem. | |
unsigned char | nvmem_set_mac_address (unsigned char *mac) |
Write the MAC address to EEPROM (OUI first) | |
unsigned char | nvmem_get_mac_address (unsigned char *mac) |
Read the MAC address from EEPROM (OUI first) | |
unsigned char | nvmem_write_patch (unsigned long ulFileId, unsigned long spLength, const unsigned char *spData) |
Write patch code to a specific file ID. | |
unsigned char | nvmem_read_sp_version (unsigned char *patchVer) |
Read the patch version. | |
signed long | nvmem_create_entry (unsigned long file_id, unsigned long newlen) |
Create a new file entry and allocate space in NVMEM. |
Function Documentation
signed long nvmem_create_entry | ( | unsigned long | file_id, |
unsigned long | newlen | ||
) |
Create a new file entry and allocate space in NVMEM.
Applies only to user files.
Modify the size of file.
If the entry is unallocated - allocate it to size ulNewLen (marked invalid).
If it is allocated then deallocate it first.
To just mark the file as invalid without resizing - set ulNewLen=0.
- Parameters:
-
ulFileId Possible nvmem file Ids:
* NVMEM_AES128_KEY_FILEID: 12
* NVMEM_SHARED_MEM_FILEID: 13
* and fileIDs 14 and 15
ulNewLen entry ulLength
- Returns:
- 0 on success, error otherwise.
unsigned char nvmem_get_mac_address | ( | unsigned char * | mac ) |
signed long nvmem_read | ( | unsigned long | file_id, |
unsigned long | length, | ||
unsigned long | offset, | ||
unsigned char * | buff | ||
) |
Read 'length' data at offset 'ulOffset' from nvmem to file 'ulFileId'.
- Parameters:
-
ulFileId Possible nvmem file id values:
NVMEM_NVS_FILEID, NVMEM_NVS_SHADOW_FILEID,
NVMEM_WLAN_CONFIG_FILEID, NVMEM_WLAN_CONFIG_SHADOW_FILEID,
NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
NVMEM_MAC_FILEID, NVMEM_FRONTEND_VARS_FILEID,
NVMEM_IP_CONFIG_FILEID, NVMEM_IP_CONFIG_SHADOW_FILEID,
NVMEM_BOOTLOADER_SP_FILEID, NVMEM_RM_FILEID,
and user files 12-15.
ulLength number of bytes to read ulOffset ulOffset in file from where to read buff output buffer pointer
- Returns:
- number of bytes read, otherwise error.
Error conditions : file can't be used
file is invalid
read out of bounds.
unsigned char nvmem_read_sp_version | ( | unsigned char * | patchVer ) |
unsigned char nvmem_set_mac_address | ( | unsigned char * | mac ) |
signed long nvmem_write | ( | unsigned long | ulFileId, |
unsigned long | ulLength, | ||
unsigned long | ulEntryOffset, | ||
unsigned char * | buff | ||
) |
Write 'length' data at offset 'ulOffset' from file 'ulFileId' to nvmem.
The file id is marked as invalid until writing is ended.
The file entry doesn't need to be valid - only allocated.
- Parameters:
-
ulFileId Possible nvmem file id values:
NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
NVMEM_MAC_FILEID, NVMEM_BOOTLOADER_SP_FILEID,
and user files 12-15.
ulLength number of bytes to write ulEntryOffset offset in file to start write operation from buff data to write
- Returns:
- 0 on success, error otherwise.
unsigned char nvmem_write_patch | ( | unsigned long | ulFileId, |
unsigned long | spLength, | ||
const unsigned char * | spData | ||
) |
Write patch code to a specific file ID.
Each write contains SP_PORTION_SIZE bytes.
- Parameters:
-
ulFileId Possible nvmem file id values:
NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
spLength number of bytes to write spData SP data to write
- Returns:
- 0 on success, error otherwise.
Generated on Wed Jul 13 2022 18:31:31 by 1.7.2