I2C Manager Kconfig now generic
This commit is contained in:
parent
048438738c
commit
ef76fd1056
7
Kconfig
7
Kconfig
|
@ -4,6 +4,11 @@ menu "LVGL ESP Drivers"
|
||||||
|
|
||||||
rsource "lvgl_touch/Kconfig"
|
rsource "lvgl_touch/Kconfig"
|
||||||
|
|
||||||
rsource "i2c_manager/Kconfig"
|
menu "I2C Port Settings"
|
||||||
|
depends on LV_I2C && !HAVE_I2C_MANAGER
|
||||||
|
|
||||||
|
rsource "i2c_manager/Kconfig"
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -1,102 +1,96 @@
|
||||||
menu "I2C Port Settings"
|
menu "I2C Port 0"
|
||||||
depends on LV_I2C && !HAVE_I2C_MANAGER
|
|
||||||
|
|
||||||
menu "I2C Port 0"
|
config I2C_MANAGER_0_ENABLED
|
||||||
|
bool "Enable I2C port 0"
|
||||||
config I2C_MANAGER_0_ENABLED
|
|
||||||
bool "Enable I2C port 0"
|
if I2C_MANAGER_0_ENABLED
|
||||||
|
config I2C_MANAGER_0_SDA
|
||||||
if I2C_MANAGER_0_ENABLED
|
int "SDA (GPIO pin)"
|
||||||
config I2C_MANAGER_0_SDA
|
config I2C_MANAGER_0_SCL
|
||||||
int "SDA (GPIO pin)"
|
int "SCL (GPIO pin)"
|
||||||
config I2C_MANAGER_0_SCL
|
config I2C_MANAGER_0_FREQ_HZ
|
||||||
int "SCL (GPIO pin)"
|
int "Frequency (Hz)"
|
||||||
config I2C_MANAGER_0_FREQ_HZ
|
default 400000
|
||||||
int "Frequency (Hz)"
|
range 100000 5000000
|
||||||
default 400000
|
help
|
||||||
range 100000 5000000
|
The clock speed in Hz. Ranges from 100000 (100 kHz) to
|
||||||
help
|
5000000 (5 Mhz). I2C busses that involve external wires may
|
||||||
The clock speed in Hz. Ranges from 100000 (100 kHz) to
|
have to be slower, and the real maximum speed the bus will
|
||||||
5000000 (5 Mhz). I2C busses that involve external wires may
|
support depends on the value of the pullup resistors and the
|
||||||
have to be slower, and the real maximum speed the bus will
|
design of the overall circuit.
|
||||||
support depends on the value of the pullup resistors and the
|
config I2C_MANAGER_0_TIMEOUT
|
||||||
design of the overall circuit.
|
int "R/W timeout (ms)"
|
||||||
config I2C_MANAGER_0_TIMEOUT
|
default 20
|
||||||
int "R/W timeout (ms)"
|
range 10 1000
|
||||||
default 20
|
help
|
||||||
range 10 1000
|
Timeout for I2C read and write operations. This does not
|
||||||
help
|
include the time waiting for a lock.
|
||||||
Timeout for I2C read and write operations. This does not
|
config I2C_MANAGER_0_LOCK_TIMEOUT
|
||||||
include the time waiting for a lock.
|
int "Stale lock override (ms)"
|
||||||
config I2C_MANAGER_0_LOCK_TIMEOUT
|
default 50
|
||||||
int "Stale lock override (ms)"
|
range 10 1000
|
||||||
default 50
|
help
|
||||||
range 10 1000
|
Timeout at which point an operation waiting for its turn on
|
||||||
help
|
the port will assume that whatever set the lock has died and
|
||||||
Timeout at which point an operation waiting for its turn on
|
overrides it. Set this somewhat larger than the previous
|
||||||
the port will assume that whatever set the lock has died and
|
timeout.
|
||||||
overrides it. Set this somewhat larger than the previous
|
config I2C_MANAGER_0_PULLUPS
|
||||||
timeout.
|
bool "Use ESP32 built-in bus pull-up resistors"
|
||||||
config I2C_MANAGER_0_PULLUPS
|
help
|
||||||
bool "Use ESP32 built-in bus pull-up resistors"
|
The I2C bus needs resistors to make sure it's in a defined
|
||||||
help
|
state when nobody is talking. Many circuits have external
|
||||||
The I2C bus needs resistors to make sure it's in a defined
|
pullup resistors already and turning these on will increase
|
||||||
state when nobody is talking. Many circuits have external
|
power consumption slightly and may limit the speed your bus
|
||||||
pullup resistors already and turning these on will increase
|
can attain. Try with these off first if you don't know.
|
||||||
power consumption slightly and may limit the speed your bus
|
endif
|
||||||
can attain. Try with these off first if you don't know.
|
|
||||||
endif
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
|
|
||||||
menu "I2C Port 1"
|
|
||||||
|
|
||||||
config I2C_MANAGER_1_ENABLED
|
|
||||||
bool "Enable I2C port 1"
|
|
||||||
|
|
||||||
if I2C_MANAGER_1_ENABLED
|
|
||||||
config I2C_MANAGER_1_SDA
|
|
||||||
int "SDA (GPIO pin)"
|
|
||||||
config I2C_MANAGER_1_SCL
|
|
||||||
int "SCL (GPIO pin)"
|
|
||||||
config I2C_MANAGER_1_FREQ_HZ
|
|
||||||
int "Frequency (Hz)"
|
|
||||||
default 1000000
|
|
||||||
range 100000 5000000
|
|
||||||
help
|
|
||||||
The clock speed in Hz. Ranges from 100000 (100 kHz) to
|
|
||||||
5000000 (5 Mhz). I2C busses that involve external wires may
|
|
||||||
have to be slower, and the real maximum speed the bus will
|
|
||||||
support depends on the value of the pullup resistors and the
|
|
||||||
design of the overall circuit.
|
|
||||||
config I2C_MANAGER_1_TIMEOUT
|
|
||||||
int "R/W timeout (ms)"
|
|
||||||
default 20
|
|
||||||
range 10 1000
|
|
||||||
help
|
|
||||||
Timeout for I2C read and write operations. This does not
|
|
||||||
include the time waiting for a lock. Default should be fine.
|
|
||||||
config I2C_MANAGER_1_LOCK_TIMEOUT
|
|
||||||
int "Stale lock override (ms)"
|
|
||||||
default 50
|
|
||||||
help
|
|
||||||
Timeout at which point an operation waiting for its turn on
|
|
||||||
the port will assume that whatever set the lock has died and
|
|
||||||
overrides it. Set this somewhat larger than the previous
|
|
||||||
timeout. Default should be fine.
|
|
||||||
range 30 1000
|
|
||||||
config I2C_MANAGER_1_PULLUPS
|
|
||||||
bool "Use ESP32 built-in bus pull-up resistors"
|
|
||||||
help
|
|
||||||
The I2C bus needs resistors to make sure it's in a defined
|
|
||||||
state when nobody is talking. Many circuits have external
|
|
||||||
pullup resistors already and turning these on will increase
|
|
||||||
power consumption slightly and may limit the speed your bus
|
|
||||||
can attain. Try with these off first if you don't know.
|
|
||||||
endif
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
|
||||||
|
menu "I2C Port 1"
|
||||||
|
|
||||||
|
config I2C_MANAGER_1_ENABLED
|
||||||
|
bool "Enable I2C port 1"
|
||||||
|
|
||||||
|
if I2C_MANAGER_1_ENABLED
|
||||||
|
config I2C_MANAGER_1_SDA
|
||||||
|
int "SDA (GPIO pin)"
|
||||||
|
config I2C_MANAGER_1_SCL
|
||||||
|
int "SCL (GPIO pin)"
|
||||||
|
config I2C_MANAGER_1_FREQ_HZ
|
||||||
|
int "Frequency (Hz)"
|
||||||
|
default 1000000
|
||||||
|
range 100000 5000000
|
||||||
|
help
|
||||||
|
The clock speed in Hz. Ranges from 100000 (100 kHz) to
|
||||||
|
5000000 (5 Mhz). I2C busses that involve external wires may
|
||||||
|
have to be slower, and the real maximum speed the bus will
|
||||||
|
support depends on the value of the pullup resistors and the
|
||||||
|
design of the overall circuit.
|
||||||
|
config I2C_MANAGER_1_TIMEOUT
|
||||||
|
int "R/W timeout (ms)"
|
||||||
|
default 20
|
||||||
|
range 10 1000
|
||||||
|
help
|
||||||
|
Timeout for I2C read and write operations. This does not
|
||||||
|
include the time waiting for a lock. Default should be fine.
|
||||||
|
config I2C_MANAGER_1_LOCK_TIMEOUT
|
||||||
|
int "Stale lock override (ms)"
|
||||||
|
default 50
|
||||||
|
help
|
||||||
|
Timeout at which point an operation waiting for its turn on
|
||||||
|
the port will assume that whatever set the lock has died and
|
||||||
|
overrides it. Set this somewhat larger than the previous
|
||||||
|
timeout. Default should be fine.
|
||||||
|
range 30 1000
|
||||||
|
config I2C_MANAGER_1_PULLUPS
|
||||||
|
bool "Use ESP32 built-in bus pull-up resistors"
|
||||||
|
help
|
||||||
|
The I2C bus needs resistors to make sure it's in a defined
|
||||||
|
state when nobody is talking. Many circuits have external
|
||||||
|
pullup resistors already and turning these on will increase
|
||||||
|
power consumption slightly and may limit the speed your bus
|
||||||
|
can attain. Try with these off first if you don't know.
|
||||||
|
endif
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
Loading…
Reference in a new issue