mirror of
https://github.com/nopnop2002/esp-idf-mpr121.git
synced 2025-12-16 17:34:31 +03:00
added MPR121_type
This commit is contained in:
@@ -28,6 +28,10 @@ void app_main(void)
|
|||||||
uint16_t touchThreshold = 40;
|
uint16_t touchThreshold = 40;
|
||||||
uint16_t releaseThreshold = 20;
|
uint16_t releaseThreshold = 20;
|
||||||
|
|
||||||
|
// Set default value
|
||||||
|
MPR121_type(&dev);
|
||||||
|
|
||||||
|
// Initialize device
|
||||||
bool ret = MPR121_begin(&dev, CONFIG_I2C_ADDRESS, touchThreshold, releaseThreshold, CONFIG_IRQ_GPIO, CONFIG_SDA_GPIO, CONFIG_SCL_GPIO);
|
bool ret = MPR121_begin(&dev, CONFIG_I2C_ADDRESS, touchThreshold, releaseThreshold, CONFIG_IRQ_GPIO, CONFIG_SDA_GPIO, CONFIG_SCL_GPIO);
|
||||||
ESP_LOGI(TAG, "MPR121_begin=%d", ret);
|
ESP_LOGI(TAG, "MPR121_begin=%d", ret);
|
||||||
if (ret == false) {
|
if (ret == false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user