jerpelea opened a new pull request, #17098:
URL: https://github.com/apache/nuttx/pull/17098

   ## Summary
   
       boards/esp32[c3|c6|h2]: Fix GPIO function used by the button
           Fixes the function to select the GPIO behavior for the pins 
associated to the board's button.
           Please note that for 
[ESP32-C3](https://www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf#section.5.12),
 
[ESP32-C6](https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_en.pdf#section.7.12)
 and 
[ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_technical_reference_manual_en.pdf#section.6.13),
 the pin Function 1 corresponds to the GPIO mapping for all pins. That function 
should be used when selecting the pin function. Please note that the pin 
function on TRM starts from 0. On NuttX, on the other hand, it starts from 1, 
and the corresponding pin function should be INPUT_FUNCTION_2 to select 
Function 1.
   
       Documentation: Add entry for ESP32-[C3|C6|H2]'s buttons defconfig
           Adds an entry on Documentation regarding ESP32-C3, ESP32-C6 and 
ESP32-H2 boards that implement the buttons defconfig
   
   ## Impact
   
   Impact on user: Yes. Avoid unintended behavior regarding the on-board button.
   
   Impact on build: No.
   
   Impact on hardware: Yes. Impacts ESP32-C3, ESP32-C6 and ESP32-H2 boards.
   
   Impact on documentation: No. But this PR also provides an entry for the 
buttons defconfig in the respective board.
   
   Impact on security: No.
   
   Impact on compatibility: No.
   
   ## Testing
   
   Build the corresponding buttons defconfig for the devices and press the BOOT 
button in the board.
   Building
   ESP32-C3
   
   make -j distclean && ./tools/configure.sh esp32c3-generic:buttons && make 
flash ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
   
   ESP32-C6
   
   make -j distclean && ./tools/configure.sh esp32c6-devkitc:buttons && make 
flash ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
   
   ESP32-H2
   
   make -j distclean && ./tools/configure.sh esp32h2-devkit:buttons && make 
flash ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
   
   Running
   
   Run the buttons application on NSH and press the BOOT button.
   Results
   
   nsh> buttons
   buttons_main: Starting the button_daemon
   buttons_main: button_daemon started
   button_daemon: Running
   button_daemon: Opening /dev/buttons
   button_daemon: Supported BUTTONs 0x01
   nsh> Sample = 1
   Sample = 0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to