Skip to content

Conversation

@ABOSTM
Copy link
Contributor

@ABOSTM ABOSTM commented Sep 11, 2019

Summary

With U8g2 library, I2C clock is set for each transmission.
With some I2C harwdware version,
timings are then computed for each time.
This cause very slow display on LCD.

This PR saves computed I2C timing and reuses those timing if I2C input clock is the same.

This Fixes issue found by @jmchiappa in PR #590

@fpistm fpistm added the enhancement New feature or request label Sep 11, 2019
@fpistm fpistm added this to the 1.7.0 milestone Sep 11, 2019
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes else LGTM.

  • one astyle issue:
-  if ((I2C_ClockTiming[i2c_speed].input_clock == clkSrcFreq) &&(I2C_ClockTiming[i2c_speed].timing != 0U)) {

+  if ((I2C_ClockTiming[i2c_speed].input_clock == clkSrcFreq) && (I2C_ClockTiming[i2c_speed].timing != 0U)) {

@ABOSTM ABOSTM force-pushed the AVOID_I2C_TIMING_COMPUTATION branch from 60f7d05 to 30bc2fc Compare September 12, 2019 09:29
With U8g2 library, I2C clock is set for each transmission.
With some I2C harwdware version,
timings are then computed for each time.
This cause very slow display on LCD.
@ABOSTM ABOSTM force-pushed the AVOID_I2C_TIMING_COMPUTATION branch from 30bc2fc to 8087d8d Compare September 12, 2019 09:33
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>
ABOSTM and others added 3 commits September 12, 2019 14:37
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm merged commit caa48d2 into stm32duino:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants