/* Read data from the specified address on the SerialFlash.  */
at25_status_t at25dfx_read(uint8_t *data, uint16_t size, uint32_t address)
/* Read data from the specified address on the SerialFlash.  */
at25_status_t at25dfx_read(uint8_t *data, uint16_t size, uint32_t address)
{
	at25_status_t op_stat;
	at25_cmd_t at25cmd;
	if ((size + address) > AT25DFX_SIZE) {
		return AT25_ERROR;
	}
	at25cmd.cmd = AT25_READ_ARRAY_LF;
	at25cmd.cmd_size = 4;
	at25cmd.data = data;
	at25cmd.data_size = size;
	at25cmd.address = address;
	op_stat = at25dfx_send_command(&at25cmd);
	return op_stat;
}