DlnSpiMasterSetFrequency() Function

 DLN_RESULT DlnSpiMasterSetFrequency(
    HDLN handle,
    uint8_t port,
    uint32_t frequency,
    uint32_t* actualFrequency
 );

The DlnSpiMasterSetFrequency() function sets the clock frequency on the SCLK line, used to synchronize data transfer between master and slave devices.

Parameters:

handle
A handle to the DLN-series adapter.
port
A number of the SPI master port to be configured.
frequency
SCLK line frequency value, specified in Hz. A user may specify any value within the range, supported by the DLN-series adapter. This range can be retrieved using the respective function. In case a user enters an incompatible value, it will be approximated as the closest lower frequency value, supported by the adapter.
actualFrequency
A pointer to an unsigned 32-bit integer. This integer will be filled with the frequency approximated as the closest to user-defined lower value. The value is specified in Hz and can be null.

This function is defined in the dln_spi_master.h file.