38 #ifndef __M2M_FLASH_H__ 39 #define __M2M_FLASH_H__ 54 #define FLASH_UPDATEIMAGE_OPTION_UPDATE NBIT0 58 #define FLASH_UPDATEIMAGE_OPTION_VALIDATE NBIT1 62 #define FLASH_UPDATEIMAGE_OPTION_SWITCH NBIT2 65 #define FLASH_SUCCESS 0 67 #define FLASH_ERR_PARAM (-1) 69 #define FLASH_ERR_LOCAL_ACCESS (-2) 71 #define FLASH_ERR_WINC_ACCESS (-3) 73 #define FLASH_ERR_SIZE (-4) 78 #define FLASH_ERR_WINC_CONFLICT (-5) 80 #define FLASH_ERR_UNINIT (-6) 82 #define FLASH_ERR_INTERNAL (-7) This module contains common APIs declarations.
signed char sint8
Range of values between -128 to 127.
sint8 m2m_flash_rootcert_add(uint16 u16Id, tpfDataAccessFn pfFn, uint32 u32Size)
Add an entry to the WINC TLS root certificate store.
tenuFlashDataFnCtl
Control parameter for tpfDataAccessFn.
sint8 m2m_flash_init(void)
Initialize the module.
sint8 m2m_flash_rootcert_read(uint16 u16Id, tpfDataAccessFn pfDestFn, uint32 u32DestSize, uint8 *pu8Identifier, uint32 u32IdentifierSz)
Read an entry from the WINC TLS root certificate store, referenced by entry identifier.
tenuDataFnRW
Indicates whether data is to be read or written.
This structure contains data for local data access (read or write).
WINC3400 IoT Application Interface Internal Types.
unsigned short uint16
Range of values between 0 to 65535.
sint8 m2m_flash_updateimage(uint8 u8Options, uint16 u16Id, tpfDataAccessFn pfSourceFn, uint32 u32SourceSize)
Write/validate/switch a WINC firmware image.
This structure contains parameters for initializing a local data access (read or write).
tenuImageId
Indicates which image to access in WINC flash.
void m2m_flash_get_state(tstrFlashState *pstrState)
Get information about the module current state and about the most recent access attempt.
sint8 m2m_flash_rootcert_readidx(uint16 u16Id, tpfDataAccessFn pfDestFn, uint32 u32DestSize, uint8 u8Index)
Read an entry from the WINC TLS root certificate store, referenced by entry index.
sint8 m2m_flash_rootcert_remove(uint16 u16Id, uint8 *pu8Identifier, uint32 u32IdentifierSz)
Remove an entry from the WINC TLS root certificate store.
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.
sint8 m2m_flash_readimage(tenuImageId enuImageId, uint16 u16Id, tpfDataAccessFn pfDestFn, uint32 u32DestSize)
Read a WINC firmware image.
This structure contains information about an attempted transfer.