Functions | |
void | m2m_flash_get_state (tstrFlashState *pstrState) |
Get information about the module current state and about the most recent access attempt. More... | |
sint8 | m2m_flash_init (void) |
Initialize the module. More... | |
sint8 | m2m_flash_readimage (tenuImageId enuImageId, uint16 u16Id, tpfDataAccessFn pfDestFn, uint32 u32DestSize) |
Read a WINC firmware image. More... | |
sint8 | m2m_flash_rootcert_add (uint16 u16Id, tpfDataAccessFn pfFn, uint32 u32Size) |
Add an entry to the WINC TLS root certificate store. More... | |
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. More... | |
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. More... | |
sint8 | m2m_flash_rootcert_remove (uint16 u16Id, uint8 *pu8Identifier, uint32 u32IdentifierSz) |
Remove an entry from the WINC TLS root certificate store. More... | |
sint8 | m2m_flash_updateimage (uint8 u8Options, uint16 u16Id, tpfDataAccessFn pfSourceFn, uint32 u32SourceSize) |
Write/validate/switch a WINC firmware image. More... | |
void m2m_flash_get_state | ( | tstrFlashState * | pstrState | ) |
Get information about the module current state and about the most recent access attempt.
[out] | pstrState | Module state and most recent access attempt info. |
Definition at line 487 of file m2m_flash.c.
sint8 m2m_flash_init | ( | void | ) |
Initialize the module.
This example demonstrates how to add m2m_flash_init and m2m_flash_get_state to MCU application initialization code.
Original code:
New code:
Definition at line 540 of file m2m_flash.c.
sint8 m2m_flash_readimage | ( | tenuImageId | enuImageId, |
uint16 | u16Id, | ||
tpfDataAccessFn | pfDestFn, | ||
uint32 | u32DestSize | ||
) |
Read a WINC firmware image.
[in] | enuImageId | Which partition to read image from. |
[in] | u16Id | Transfer identifier, not interpreted by this module. |
[in] | pfDestFn | Function for the module to call to send the image to the MCU application. |
[in] | u32DestSize | Size of the memory available to the MCU application for storing the image. |
sint8 m2m_flash_rootcert_add | ( | uint16 | u16Id, |
tpfDataAccessFn | pfSourceFn, | ||
uint32 | u32SourceSize | ||
) |
Add an entry to the WINC TLS root certificate store.
[in] | u16Id | Transfer identifier, not interpreted by this module. |
[in] | pfSourceFn | Function for the module to call to obtain the certificate entry from the MCU application. |
[in] | u32SourceSize | Size of the certificate entry being provided by the MCU application. |
Definition at line 441 of file m2m_flash.c.
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.
[in] | u16Id | Transfer identifier, not interpreted by this module. |
[in] | pfDestFn | Function for the module to call to send the certificate entry to the MCU application. |
[in] | u32DestSize | Size of the memory available to the MCU application for storing the entry. |
[in] | pu8Identifier | Identifier for the entry to be read. This is the SHA1 digest of the certificate issuer name. |
[in] | u32IdentifierSz | Size of the identifier (20). |
Definition at line 461 of file m2m_flash.c.
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.
[in] | u16Id | Transfer identifier, not interpreted by this module. |
[in] | pfDestFn | Function for the module to call to send the certificate entry to the MCU application. |
[in] | u32DestSize | Size of the memory available to the MCU application for storing the entry. |
[in] | u8Index | Zero-based index of the entry to be read. |
Definition at line 477 of file m2m_flash.c.
Remove an entry from the WINC TLS root certificate store.
[in] | u16Id | Transfer identifier, not interpreted by this module. |
[in] | pu8Identifier | Identifier for the entry to be removed. This is the SHA1 digest of the certificate issuer name. |
[in] | u32IdentifierSz | Size of the identifier (20). |
Definition at line 450 of file m2m_flash.c.
sint8 m2m_flash_updateimage | ( | uint8 | u8Options, |
uint16 | u16Id, | ||
tpfDataAccessFn | pfSourceFn, | ||
uint32 | u32SourceSize | ||
) |
Write/validate/switch a WINC firmware image.
[in] | u8Options | Flags indicating the required combination of write / validate / switch. |
[in] | u16Id | Transfer identifier, not interpreted by this module. |
[in] | pfSourceFn | Function for the module to call to obtain the image from the MCU application. |
[in] | u32SourceSize | Size of the image being provided by the MCU application. |
Definition at line 224 of file m2m_flash.c.