Вы здесь

DlnSpiSlaveDisable() Function

The DlnSpiSlaveDisable() function deactivates the specified SPI slave port on your DLN adapter.

Syntax
C/C++
DLN_RESULT DlnSpiSlaveDisable(
   HDLN handle,
   uint8_t port,
   uint8_t waitForTransferCompletion
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the SPI slave port.

waitForTransferCompletion

Used to choose whether the device should wait for current data transmissions complete before disabling as SPI slave. The following values are available:

  • 1 or DLN_SPI_SLAVE_WAIT_FOR_TRANSFERS - wait until transmissions complete.

  • 0 or DLN_SPI_SLAVE_CANCEL_TRANSFERS - cancel all pending data transmissions and release the port.

Return Value
DLN_RES_SUCCESS (0x00)

The function disabled the SPI slave module successfully.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

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

DLN_RES_TRANSFER_CANCELLED (0x20)

The pending transmissions were cancelled.

Remarks

The DlnSpiSlaveDisable() function is defined in the dln_spi_slave.h file.

Языки

Вход на сайт