There seem to be several other SMBus specific functions in the fsl_i2c_hal.c file as well and no documentation I can find to explain how to use it. Any help would be apprecieated.
Hi John,
For the detail fsl_i2c_hal.c function description, you can read the fsl_i2c_hal.c directly.
Do you just don't know how to call it? You can see the function defination:
Function I2C_HAL_SetSMBusAddressCmd
/*FUNCTION**********************************************************************
*
* Function Name : I2C_HAL_SetSMBusAddressCmd
* Description : Enables/Disables SMBus device default address.
*
*END**************************************************************************/
void I2C_HAL_SetSMBusAddressCmd(I2C_Type *base, bool enable, uint8_t address)
{
I2C_BWR_SMB_SIICAEN(base, enable);
I2C_BWR_A2_SAD(base, address);
}
If you want to enable the SMBUS device default address:I2C address register 2 matching is enabled, you can call it like this:
I2C_HAL_SetSMBusAddressCmd(I2C0, 1,0XA0);
More details, you also can refer to the chip reference manual, I2C chapter.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------