Set MATRIX_DETACH_* values based on TRM #8345
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description of Change
The MATRIX_DETACH_* values vary by platform, which is not documented in the gpio_matrix_out or gpio_matrix_in functions (espressif/esp-idf#11737). Use the SDK macros that contain the correct values for all platforms.
Tests scenarios
Tested on an Adafruit Qt Py ESP32-C3 board.
Tested
pinMatrixInDetachby usingpinMatrixInAttachto connect an input pin to thecpu_gpio_in0signal, then usepinMatrixInDetachwith low and high values and verified that they propagated tocpu_gpio_in0read with the CSRR instruction on CSR 0x804.Tested
pinMatrixOutDetachon an output pin and verified that it was still driven.Without this patch both tests fail.
Tested with ESP-IDF 4.4.3 and arduino-esp32 72c41d0.
Related links
espressif/esp-idf#11737