You are here

DlnSpiMasterSetDelayAfterSS() Function

The DlnSpiMasterSetDelayAfterSS() function sets a delay duration between assertion of an SS line and first data frame. For more information, read SPI Delays.

Syntax
C/C++
DLN_RESULT DlnSpiMasterSetDelayAfterSS(
   HDLN handle,
   uint8_t port,
   uint32_t delayAfterSS,
   uint32_t* actualDelayAfterSS
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the SPI master port.

delayAfterSS

The delay value in nanoseconds. If you specify an unsupported value, it will be approximated as the closest higher supported value.

If you set a 0ns delay time, the actual delay will be equal to 1/2 of the SPI clock frequency, specified by the DlnSpiMasterSetFrequency() function.
Return Value
DLN_RES_SUCCESS (0x00)

The function successfully set the delay after slave selection.

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_VALUE_ROUNDED (0x21)

The delay value has been approximated as the closest supported value.

Remarks
DLN-1 and DLN-2 adapters do not support delays after slave selection.

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

Contents

Languages

User login