Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion platforms/esp8266/src/esp_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ void (*mgos_nsleep100)(uint32_t n);
uint32_t mgos_bitbang_n100_cal;

enum mgos_init_result mgos_gpio_hal_init(void) {
for (int i = 0; i < 16; i++) {
// Interupts are not cleared after soft reset (notably GPIO2)
// Probably the GPIO2 is triggered because of the second UART - U1TXD,
// which is transmitting data during boot. Clear everything
for (int i = 0; i < GPIO_PIN_COUNT; i++) {
mgos_gpio_hal_disable_int(i);
mgos_gpio_hal_clear_int(i);
}
#ifdef RTOS_SDK
_xt_isr_attach(ETS_GPIO_INUM, (void *) esp8266_gpio_isr, NULL);
Expand Down