Вы здесь

DlnSpiMasterDisable() Function

The DlnSpiMasterDisable() function releases the selected SPI master port on your DLN-series adapter.

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

A handle to the DLN-series adapter.

port

A number of the SPI master port.

waitForTransferCompletion

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

  • 1 or DLN_SPI_MASTER_WAIT_FOR_TRANSFERS - wait until transmissions complete.

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

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully deactivated the SPI master port.

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_TRANSFER_CANCELLED (0x20)

The pending transmissions were cancelled.

Remarks

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

Языки

Вход на сайт