36 #ifndef __NM_FLASH_H__ 37 #define __NM_FLASH_H__ 45 #define FLASH_RETURN_OK 0 46 #define FLASH_SECTOR_SIZE FLASH_SECTOR_SZ 47 #define FLASH_SIGNATURE HOST_CONTROL_FLASH_SIG 48 #define BACKUP_SIGNATURE 0x424b5550 50 #define FLASH_MODE_FLAGS_CS NBIT0 51 #define FLASH_MODE_FLAGS_CS_SWITCH NBIT1 52 #define FLASH_MODE_FLAGS_CS_SWITCH_TARGET NBIT2 53 #define FLASH_MODE_FLAGS_CS_VALIDATE_IMAGE NBIT3 54 #define FLASH_MODE_FLAGS_UNCHANGED NBIT4 55 #define FLASH_MODE_FLAGS_DATA_IN_BACKUP NBIT5 59 #define FLASH_FN_FLAGS_COMPARE_BEFORE NBIT0 63 #define FLASH_FN_FLAGS_READ_SURROUNDING NBIT1 68 #define FLASH_FN_FLAGS_BACKUP NBIT2 71 #define FLASH_FN_FLAGS_ERASE NBIT3 74 #define FLASH_FN_FLAGS_WRITE NBIT4 78 #define FLASH_FN_FLAGS_COMPARE_AFTER NBIT5 82 #define FLASH_FN_FLAGS_READ NBIT6 89 #define FLASH_ACCESS_OPTION_ERASE_FIRST NBIT0 96 #define FLASH_ACCESS_OPTION_KEEP_SURROUNDING NBIT1 103 #define FLASH_ACCESS_OPTION_USE_BACKUP NBIT2 109 #define FLASH_ACCESS_OPTION_COMPARE_BEFORE NBIT3 115 #define FLASH_ACCESS_OPTION_COMPARE_AFTER NBIT4 120 #define FLASH_ACCESS_WINC_MASK (FLASH_ACCESS_OPTION_COMPARE_BEFORE | FLASH_ACCESS_OPTION_COMPARE_AFTER) 190 #define FLASH_SIG_SZ (sizeof(uint32)) 191 #define FLASH_STA_SZ (sizeof(tenuFlashAccessStatus)) 192 #define FLASH_SIG_STA_SZ (FLASH_SIG_SZ+FLASH_STA_SZ) 207 #define FLASH_BACKUP_STA_SZ sizeof(tenuBackupStatus) 208 #define FLASH_BACKUP_STORE_SZ (2*sizeof(tstrBackup)) 209 #define FLASH_BACKUP_STORE_OFFSET (HOST_CONTROL_FLASH_OFFSET + HOST_CONTROL_FLASH_SZ - FLASH_BACKUP_STORE_SZ) This module contains common APIs declarations.
signed char sint8
Range of values between -128 to 127.
sint8 prepare_backup(uint32 u32Target)
sint8 rootcert_access(tenuFlashAccessItemMode enuMode, tstrRootCertEntryHeader *pstrReferenceHdr, uint16 *pu16EntrySize, uint8 *pu8Buff, uint32 *pu32Offset)
tpfDataAccessFn pfDestinationFn
WINC3400 IoT Application Interface Internal Types.
tenuFlashAccessStatus enuTransferStatus
tenuFlashAccessItemMode
Transfer modes available for accessing items in WINC flash stores such as TLS root certificate store...
unsigned short uint16
Range of values between 0 to 65535.
This structure contains data for local data access (read, erase or write).
sint8 winc_flash_write_verify(uint8 *pu8Buf, uint32 u32Offset, uint32 u32Size)
tpfDataAccessFn pfSourceFn
void set_internal_info_ptr(tpfDataAccessFn *ppfFn, uint8 *pu8Ptr)
sint8 image_get_target(uint8 *pu8Target)
tenuBackupStatus enuTransferStatus
tstrFlashAccessPersistent strPersistentInfo
sint8 recover_backup(void)
sint8 transfer_run(tstrFlashAccess *pstrFlashAccess)
sint8(* tpfDataAccessFn)(tenuFlashDataFnCtl enuCtl, void *pvStr)
A function of this type is used for local data access. It can be implemented to handle simple RAM acc...
unsigned long uint32
Range of values between 0 to 4294967295.
unsigned char uint8
Range of values between 0 to 255.
uint8 is_internal_info(tpfDataAccessFn pfFn)
uint32 u32DestinationAddr
void set_internal_info(tpfDataAccessFn *ppfFn, uint32 u32LocationId)
sint8 rootcert_get_size(tstrRootCertEntryHeader *pstrHdr, uint16 *pu16Size)
This structure contains parameters for initializing a local data access (read, erase or write)...