SPI Master Functions

The following functions are used to control and manage the SPI master module of a DLN-series adapter.

Function Description
DlnSpiMasterGetPortCount() retrieves the total number of SPI master ports available in your DLN-series adapter;
DlnSpiMasterGetPortCount() retrieves the total number of SPI master ports available in your DLN-series adapter;
DlnSpiMasterEnable() activates corresponding SPI master port on your DLN-series adapter;
DlnSpiMasterDisable() deactivates corresponding SPI master port on your DLN-Series adapter;
DlnSpiMasterIsEnabled() retrieves information whether the specified SPI master port is activated;
DlnSpiMasterSetMode() sets SPI transmission parameters (CPOL and CPHA);
DlnSpiMasterGetMode() retrieves current configuration of the specified SPI master port;
DlnSpiMasterSetFrameSize() sets the size of a single SPI data frame;
DlnSpiMasterGetFrameSize() retrieves current size setting for SPI data frames;
DlnSpiMasterSetFrequency() sets the SPI clock frequency;
DlnSpiMasterGetFrequency() retrieves current setting for SPI clock frequency;
DlnSpiMasterReadWrite() sends and receives data via SPI;
DlnSpiMasterReadWrite16() sends and receives buffer of 2-byte frames;
DlnSpiMasterSetDelayBetweenSS() sets a minimum delay between release of an SS line and assertion of another SS line;
DlnSpiMasterGetDelayBetweenSS() retrieves current setting for minimum delay between release of an SS line and assertion of another SS line;
DlnSpiMasterSetDelayAfterSS() sets a delay duration between assertion of an SS line and first data frame;
DlnSpiMasterGetDelayAfterSS() retrieves current setting for minimum delay between assertion of an SS line and first data frame;
DlnSpiMasterSetDelayBetweenFrames() sets a delay between data frames exchanged with a single slave device;
DlnSpiMasterGetDelayBetweenFrames() retrieves current setting for delay between data frames exchanged with a single slave device;
DlnSpiMasterSetSS() selects a Slave Select (SS) line;
DlnSpiMasterGetSS() retrieves current Slave Select (SS)line;
DlnSpiMasterSSBetweenFramesEnable() enables release of an SS line between data frames exchanged with a single slave device;
DlnSpiMasterSSBetweenFramesDisable() disables release of an SS line between data frames exchanged with a single slave device;
DlnSpiMasterSSBetweenFramesIsEnabled() disables release of an SS line between data frames exchanged with a single slave device;

Actual control of the device is performed by use of commands and responses. Each function encapsulates respective commands and responses. You can send such commands directly if necessary.