Changed default GPIO

This commit is contained in:
nopnop2002
2023-09-10 20:08:40 +09:00
parent 45092f05a3
commit 367c73b834
2 changed files with 15 additions and 13 deletions

View File

@@ -4,8 +4,9 @@ MPR121 Capacitive Touch Driver for esp-idf.
I ported from [here](https://github.com/BareConductive/mpr121). I ported from [here](https://github.com/BareConductive/mpr121).
# Software requirements # Software requirements
ESP-IDF V4.4/V5.0. ESP-IDF V4.4/V5.x.
ESP-IDF V5.0 is required when using ESP32-C2. ESP-IDF V5.0 is required when using ESP32-C2.
ESP-IDF V5.1 is required when using ESP32-C6.
# Hardware requirements # Hardware requirements
MPR121 Capacitive Touch switch. MPR121 Capacitive Touch switch.
@@ -32,11 +33,11 @@ idf.py flash
# Wirering # Wirering
|MPR121||ESP32|ESP32-S2/S3|ESP32-C2/C3| |MPR121||ESP32|ESP32-S2/S3|ESP32-C2/C3/C6|
|:-:|:-:|:-:|:-:|:-:| |:-:|:-:|:-:|:-:|:-:|
|SCL|--|GPIO4|GPIO16|GPIO6| |SCL|--|GPIO22|GPIO12|GPIO6|
|SDA|--|GPIO5|GPIO17|GPIO7| |SDA|--|GPIO21|GPIO11|GPIO5|
|IRQ|--|GPIO15|GPIO18|GPIO8| |IRQ|--|GPIO15|GPIO18|GPIO4|
|GND|--|GND|GND|GND| |GND|--|GND|GND|GND|
|VCC|--|3.3V|3.3V|3.3V| |VCC|--|3.3V|3.3V|3.3V|

View File

@@ -7,6 +7,7 @@ menu "MPR121 Configuration"
default 48 if IDF_TARGET_ESP32S3 default 48 if IDF_TARGET_ESP32S3
default 18 if IDF_TARGET_ESP32C2 default 18 if IDF_TARGET_ESP32C2
default 19 if IDF_TARGET_ESP32C3 default 19 if IDF_TARGET_ESP32C3
default 30 if IDF_TARGET_ESP32C6
config I2C_ADDRESS config I2C_ADDRESS
hex "I2C address" hex "I2C address"
@@ -17,9 +18,9 @@ menu "MPR121 Configuration"
config SCL_GPIO config SCL_GPIO
int "SCL GPIO number" int "SCL GPIO number"
range 0 GPIO_RANGE_MAX range 0 GPIO_RANGE_MAX
default 16 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 default 22 if IDF_TARGET_ESP32
default 6 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 4 default 6 # C3 and others
help help
GPIO number (IOxx) to SCL. GPIO number (IOxx) to SCL.
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink. Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink.
@@ -27,9 +28,9 @@ menu "MPR121 Configuration"
config SDA_GPIO config SDA_GPIO
int "SDA GPIO number" int "SDA GPIO number"
range 0 GPIO_RANGE_MAX range 0 GPIO_RANGE_MAX
default 17 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 default 21 if IDF_TARGET_ESP32
default 7 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 5 default 5 # C3 and others
help help
GPIO number (IOxx) to SDA. GPIO number (IOxx) to SDA.
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink. Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink.
@@ -37,9 +38,9 @@ menu "MPR121 Configuration"
config IRQ_GPIO config IRQ_GPIO
int "IRQ GPIO number" int "IRQ GPIO number"
range 0 GPIO_RANGE_MAX range 0 GPIO_RANGE_MAX
default 15 if IDF_TARGET_ESP32
default 18 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 default 18 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 default 4 # C3 and others
default 15
help help
GPIO number (IOxx) to IRQ. GPIO number (IOxx) to IRQ.
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink. Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink.