Вы здесь

DlnSpiMasterSetSS() Function

The DlnSpiMasterSetSS() function selects a Slave Select (SS) line.

Syntax
C/C++
DLN_RESULT DlnSpiMasterSetSS(
   HDLN handle,
   uint8_t port,
   uint8_t ss
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the SPI master port to be configured.

ss

The value on the SS lines. The bits 4-7 are reserved and must be set to 1.

If you expect slaves to output data, you must ensure that only one slave is activated. If several slaves start outputting data simultaneously, the equipment can be damaged.
Return Value
DLN_RES_SUCCESS (0x00)

The function successfully selected the SS line.

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_BUSY (0xB6)

The SPI master is busy transmitting.

DLN_RES_SPI_MASTER_INVALID_SS_NUMBER (0xB9)

The SS value is not valid.

Remarks

The DlnSpiMasterSetSS() function is defined in the dln_spi_master.h file.

Языки

Вход на сайт