Вы здесь

SPI Slave Functions

The default configuration for the SPI slave port is as 8-bit SPI slave with CPOL=0 and CPHA=0 transmission parameters. By default, no events are generated.

Using the SPI slave functions allows you to change and check the current SPI slave configuration, to control data transmission.

The SPI slave functions include the following:

General port information:

DlnSpiSlaveGetPortCount()

Retrieves the number of SPI slave ports available in the DLN adapter.

DlnSpiSlaveEnable()

Assigns the selected port to the SPI slave module.

DlnSpiSlaveDisable()

Releases the selected SPI slave port.

DlnSpiSlaveIsEnabled()

Retrieves whether the selected port is assigned to the SPI slave module.

Configuration functions:

DlnSpiSlaveSetSSIdleTimeout()

Specifies idle timeout for releasing the SS line.

DlnSpiSlaveGetSSIdleTimeout()

Retrieves the idle timeout setting.

DlnSpiSlaveSetFrameSize()

Specifies the data frame size for the selected SPI slave port.

DlnSpiSlaveGetFrameSize()

Retrieves the current frame size for the selected SPI slave port.

DlnSpiSlaveGetSupportedFrameSizes()

Retrieves the supported frame sizes.

DlnSpiSlaveSetMode()

Specifies transmission parameters (CPOL and CPHA) for the selected SPI slave port.

DlnSpiSlaveGetMode()

Retrieves the current transmission parameters (CPOL and CPHA) for the selected SPI slave port.

DlnSpiSlaveGetSupportedModes()

Retrieves the supported transmission parameters (CPOL and CPHA).

DlnSpiSlaveSetCpha()

Specifies CPHA value for the selected SPI slave port.

DlnSpiSlaveGetCpha()

Retrieves the current CPHA value for the selected SPI slave port.

DlnSpiSlaveGetSupportedCphaValues()

Retrieves the supported CPHA values.

DlnSpiSlaveSetCpol()

Specifies CPOL value for the selected SPI slave port.

DlnSpiSlaveGetCpol()

Retrieves the current CPOL value for the selected SPI slave port.

DlnSpiSlaveGetSupportedCpolValues()

Retrieves the supported CPOL values.

Reply functions:

DlnSpiSlaveLoadReply()

Clears the buffer and makes the current reply the first in the queue.

DlnSpiSlaveEnqueueReply()

Puts the current reply to the end of the queue.

DlnSpiSlaveSetReplyMode()

Specifies actions if the reply buffer size exceeds the size of the buffer received by the master.

DlnSpiSlaveGetReplyMode()

Retrieves the current reply configuration.

DlnSpiSlaveGetSupportedReplyModes()

Retrieves the supported reply modes.

DlnSpiSlaveSetReplyShortageAction()

Specifies actions if the reply buffer size is less than the size of the buffer received by the master.

DlnSpiSlaveGetReplyShortageAction()

Retrieves the current for reply shortage action settings.

DlnSpiSlaveGetSupportedShortageActions()

Retrieves the supported reply shortage actions.

Event configuration:

DlnSpiSlaveEnableSSRiseEvent()

Enables generating events when the level on the SS line rises.

DlnSpiSlaveDisableSSRiseEvent()

Disables generating events when the level on the SS line rises.

DlnSpiSlaveIsSSRiseEventEnabled()

Retrieves the current configuration for generating events when the level on the SS line rises.

DlnSpiSlaveEnableEvent()

Enables generating events when the buffer is full.

DlnSpiSlaveDisableEvent()

Disables generating events when the buffer is full.

DlnSpiSlaveIsEventEnabled()

Retrieves the current configuration for generating events when the buffer is full.

DlnSpiSlaveSetEventSize()

Specifies the buffer size.

DlnSpiSlaveGetEventSize()

Retrieves the current buffer size.

DlnSpiSlaveEnableIdleEvent()

Enables generating events when the slave idles for the configured time.

DlnSpiSlaveDisableEvent()

Disables generating events when the slave idles for the configured time.

DlnSpiSlaveIsEventEnabled()

Retrieves the current configuration for generating events when the slave idles for the configured time.

DlnSpiSlaveSetIdleEventTimeout()

Specifies the timeout value.

DlnSpiSlaveGetIdleEventTimeout()

Retrieves the current timeout value.

DlnSpiSlaveGetMinIdleEventTimeout()

Retrieves the minimum timeout value.

DlnSpiSlaveGetMaxIdleEventTimeout()

Retrieves the maximum timeout value.

The dln_spi_slave.h file declares the SPI Salve Interface functions.

Rating: 
Голосов пока нет

Языки

Вход на сайт