Вы здесь

DlnSpiFlashProgramPage() Function

The DlnSpiFlashProgramPage() function transfers data by using SPI flash interface.

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

A handle to the DLN-series adapter.

port

A number of the SPI flash port.

address

Address value.

buffer

Pointer to byte variable with data to be sent.

size

Buffer size.

timeout

Timeout value.

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 DlnSpiFlashProgramPage() function is defined in dln_spi_flash.h file.

Языки

Вход на сайт