Вы здесь

DlnSpiMasterReadWriteSS() Function

The DlnSpiMasterReadWriteSS() function selects the specified SS line, transmits data via SPI bus and releases the SS line.

Syntax
C/C++
DLN_RESULT DlnSpiMasterReadWriteSS(
    HDLN handle, 
    uint8_t port,
C/C++
    uint8_t ss, 
    uint16_t size, 
    uint8_t *writeBuffer, 
    uint8_t *readBuffer
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the selected SPI master port.

ss

The value on the SS lines. This value can include only one zero bit.

size

The size of the message buffer. This parameter is specified in bytes.

writeBuffer

A pointer to an array of unsigned 8-bit integers that receives data to be sent to a slave.

readBuffer

A pointer to an array of unsigned 8-bit integers that receives data from the slave.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully transmitted data.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

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

DLN_RES_DISABLED (0xB7)

The SPI master port is disabled. Use the DlnSpiMasterEnable() function to activate the SPI master port.

Remarks

The DlnSpiMasterReadWriteSS() function is defined in dln_spi_master.h file.

Языки

Вход на сайт