Skip to content

Commit

Permalink
Add comment to sclCycles initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob-Scheiffler committed Aug 14, 2023
1 parent 60a87af commit fa068a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/PeriphDrivers/Source/I2C/i2c_reva.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ int MXC_I2C_RevA_SetFrequency(mxc_i2c_reva_regs_t *i2c, unsigned int hz)
unsigned int MXC_I2C_RevA_GetFrequency(mxc_i2c_reva_regs_t *i2c)
{
unsigned int sclCycles = 2;
// sclCycles Initialized to 2 b/c formula is sclCycles = (lo_clks + 1) + (hi_clks + 1)

if (i2c->ctrl & MXC_F_I2C_REVA_CTRL_HS_EN) {
// HS-Mode enabled, calculate HS Frequency
Expand Down

0 comments on commit fa068a7

Please sign in to comment.