The code is for the stm32, but it could be replicated for ESP32. Define BTN1_PININDEX (maybe jshardware.c?) and use this code. Actually it would be nice to have it in every board.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@gdanov:
See targets/stm32_ll/main.c
The code is for the stm32, but it could be replicated for ESP32. Define BTN1_PININDEX (maybe jshardware.c?) and use this code. Actually it would be nice to have it in every board.