Skip to content

Commit 617e6a4

Browse files
authored
Merge pull request #132 from ropg/fix_115
Fixes for #115
2 parents 4d3f23a + db3d00e commit 617e6a4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lvgl_i2c/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ menu "I2C Port 0"
66
if I2C_MANAGER_0_ENABLED
77
config I2C_MANAGER_0_SDA
88
int "SDA (GPIO pin)"
9+
default 0
910
config I2C_MANAGER_0_SCL
1011
int "SCL (GPIO pin)"
12+
default 0
1113
config I2C_MANAGER_0_FREQ_HZ
1214
int "Frequency (Hz)"
1315
default 400000

lvgl_i2c/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
### I2C Manager support
1010

11-
`lvgl_esp32_drivers` integrates [I2C Manager](https://github.com/ropg/i2c_manager), which is used in case you select a touch sensor or screen that uses the I2C bus. If you're just using LVGL you don't need to do anything special.
11+
`lvgl_esp32_drivers` integrates [I2C Manager](https://github.com/ropg/i2c_manager), which is used in case you select a touch sensor or screen that uses the I2C bus.
1212

13-
I2C Manager can help if you are in a situation where you want to avoid "bus conflicts" on the I2C bus. Suppose you use LVGL with a touch sensor that uses I2C, and your device also has another I2C device that needs to be read frequently, such as a 3D-accelerometer. ESP-IDF is not inherently "thread-safe". So if you read that from another task than the one LVGL uses to read the touch data, you need some kind of mechanism to keep these communications from interfering.
13+
I2C Manager is also available as a separate ESP-IDF component and can help if you are in a situation where you want to avoid "bus conflicts" on the I2C bus. **If in your application nothing outside of LVGL needs to talk to the I2C bus, you can stop reading here.**
14+
15+
Suppose you use LVGL with a touch sensor that uses I2C, and your device also has another I2C device that needs to be read frequently, such as a 3D-accelerometer. ESP-IDF is not inherently "thread-safe". So if you read that from another task than the one LVGL uses to read the touch data, you need some kind of mechanism to keep these communications from interfering.
1416

1517
If you have (or write) a driver for that 3D-accelerometer that can use I2C Manager (or the I2C HAL and i2cdev abstraction layers that I2C Manager is compatible with) then put I2C Manager in your components directory by cloning the repository from below and in your main program do:
1618

0 commit comments

Comments
 (0)