/* Read a certain amount of bytes from a file in WINC's Flash using HIF transfer.  */
NMI_API m2m_ota_host_file_read_hif(uint8 u8Handler, uint32 u32Offset, uint32 u32Size, tpfFileReadCb pfHFDReadCb)
/* Read a certain amount of bytes from a file in WINC's Flash using HIF transfer.  */
NMI_API m2m_ota_host_file_read_hif(uint8 u8Handler, uint32 u32Offset, uint32 u32Size, tpfFileReadCb pfHFDReadCb)
{
    sint8 s8Ret         = M2M_ERR_INVALID_ARG;
    FileBlock.u32Offset = u32Offset;
    FileBlock.u32Size   = u32Size;
    if((u8Handler != gu8CurrFileHandlerID) || (HFD_INVALID_HANDLER == gu8CurrFileHandlerID) || (NULL == pfHFDReadCb)) goto EXIT; 
    s8Ret = hif_send(M2M_REQ_GROUP_OTA, M2M_OTA_REQ_HOST_FILE_READ, (uint8 *) &FileBlock, sizeof(FileBlockDescriptor), NULL, 0, 0);
    if(M2M_SUCCESS == s8Ret)
        gpfHFDReadCb = pfHFDReadCb;
EXIT:
    return s8Ret;
}