DlnI2cMasterSetFrequency() Function
DLN_RESULT DlnI2cMasterSetFrequency(
HDLN handle,
uint8_t port,
uint32_t frequency,
uint32_t* actualFrequency
);
The DlnI2cMasterSetFrequency() function configures the clock frequency for the specified I2C port.
Parameters:
- handle
- A handle to the DLN-series adapter.
- port
- A number of the I2C master port to be configured.
- frequency
- I2C 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 actual frequency applied by this function. The frequency is specified in Hz. If the frequency specified in frequency parameter is supported, the actual frequency will equal to it. Otherwise the closest lower value will be applied. If NULL is specified in this parameter, the actual frequency value will not be returned. You can still use the DlnI2cMasterGetFrequency() function to check the actual frequency.
This function is defined in the dln_i2c_master.h file.
2006-2012