Things noted by @tore-espressif

See https://github.com/lvgl/lvgl_esp32_drivers/pull/70#pullrequestreview-703588587
This commit is contained in:
Rop Gonggrijp 2021-07-12 10:18:20 +02:00
parent e52112376f
commit 048438738c
3 changed files with 6 additions and 41 deletions

View file

@ -9,14 +9,8 @@ menu "I2C Port Settings"
if I2C_MANAGER_0_ENABLED
config I2C_MANAGER_0_SDA
int "SDA (GPIO pin)"
range 0 39 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 21 if IDF_TARGET_ESP32C3
config I2C_MANAGER_0_SCL
int "SCL (GPIO pin)"
range 0 39 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 21 if IDF_TARGET_ESP32C3
config I2C_MANAGER_0_FREQ_HZ
int "Frequency (Hz)"
default 400000
@ -64,16 +58,8 @@ menu "I2C Port Settings"
if I2C_MANAGER_1_ENABLED
config I2C_MANAGER_1_SDA
int "SDA (GPIO pin)"
default 32
range 0 39 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 21 if IDF_TARGET_ESP32C3
config I2C_MANAGER_1_SCL
int "SCL (GPIO pin)"
default 33
range 0 39 if IDF_TARGET_ESP32
range 0 46 if IDF_TARGET_ESP32S2
range 0 21 if IDF_TARGET_ESP32C3
config I2C_MANAGER_1_FREQ_HZ
int "Frequency (Hz)"
default 1000000

View file

@ -66,8 +66,8 @@ static const uint8_t ACK_CHECK_EN = 1;
#define I2C_MANAGER_0_PULLUPS false
#endif
#define I2C_MANAGER_0_TIMEOUT CONFIG_I2C_MANAGER_0_TIMEOUT / portTICK_RATE_MS
#define I2C_MANAGER_0_LOCK_TIMEOUT CONFIG_I2C_MANAGER_0_LOCK_TIMEOUT / portTICK_RATE_MS
#define I2C_MANAGER_0_TIMEOUT ( CONFIG_I2C_MANAGER_0_TIMEOUT / portTICK_RATE_MS )
#define I2C_MANAGER_0_LOCK_TIMEOUT ( CONFIG_I2C_MANAGER_0_LOCK_TIMEOUT / portTICK_RATE_MS )
#endif
@ -79,8 +79,8 @@ static const uint8_t ACK_CHECK_EN = 1;
#define I2C_MANAGER_1_PULLUPS false
#endif
#define I2C_MANAGER_1_TIMEOUT CONFIG_I2C_MANAGER_1_TIMEOUT / portTICK_RATE_MS
#define I2C_MANAGER_1_LOCK_TIMEOUT CONFIG_I2C_MANAGER_1_LOCK_TIMEOUT / portTICK_RATE_MS
#define I2C_MANAGER_1_TIMEOUT ( CONFIG_I2C_MANAGER_1_TIMEOUT / portTICK_RATE_MS )
#define I2C_MANAGER_1_LOCK_TIMEOUT ( CONFIG_I2C_MANAGER_1_LOCK_TIMEOUT / portTICK_RATE_MS )
#endif
#define ERROR_PORT(port, fail) { \