Вы здесь

DlnSpiFlashReadPage() Function

The DlnSpiFlashReadPage() function receives data via SPI flash interface. The data is received as an array of 1-byte elements.

Syntax
C/C++
DLN_RESULT DlnSpiFlashReadPage(
  HDLN handle, 
  uint8_t port, 
  uint32_t address, 
  uint8_t *buffer, 
  uint16_t size
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the SPI flash port.

address

Device address for reading data from.

buffer

A pointer to an array of unsigned 8-bit integers. This array will be filled with data received.

size

Read data size.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved the selected SS lines.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

The port number is not valid. Use the DlnSpiFlashGetPortCount() function to find the maximum possible port number.

DLN_RES_INVALID_BUFFER_SIZE (0xAE)

The buffer size is not valid. This value cannot exceed 256 bytes.

DLN_RES_DISABLED (0xB7)

The SPI flash port is disabled. Use the DlnSpiFlashEnable() function to activate the SPI flash port.

Remarks

The DlnSpiFlashReadPage() function is defined in the dln_spi_flash.h file.

Языки

Вход на сайт