/* Reads data from the file referred by the ulFileId parameter. Reads data from file ulOffset till length. Err if the file can't be used, is invalid, or if the read is out of bounds. 
nvmem_read */
INT32 nvmem_read(UINT32 ulFileId, UINT32 ulLength, UINT32 ulOffset, UINT8 *buff)
/* Reads data from the file referred by the ulFileId parameter. Reads data from file ulOffset till length. Err if the file can't be used, is invalid, or if the read is out of bounds. 
nvmem_read */
INT32 nvmem_read(UINT32 ulFileId, UINT32 ulLength, UINT32 ulOffset, UINT8 *buff)
{
	UINT8 ucStatus = 0xFF;
	UINT8 *ptr;
	UINT8 *args;
	ptr = tSLInformation.pucTxCommandBuffer;
	args = (ptr + HEADERS_SIZE_CMD);
	args = UINT32_TO_STREAM(args, ulFileId);
	args = UINT32_TO_STREAM(args, ulLength);
	args = UINT32_TO_STREAM(args, ulOffset);
	hci_command_send(HCI_CMND_NVMEM_READ, ptr, NVMEM_READ_PARAMS_LEN);
	SimpleLinkWaitEvent(HCI_CMND_NVMEM_READ, &ucStatus);
	SimpleLinkWaitData(buff, 0, 0);
	return(ucStatus);
}