---
title: "Comment by Ant Skelton on \"ESP32 Standard Library Embedded Rust: GPIO Interrupts\" | Hashnode"
description: "Great example, thank you! I found I had to call button.enable_interrupt().unwrap() inside the loop, or I&#39;d only get precisely one interrupt. This is noted i"
url: "https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-interrupts/64f9e579c9aab703dd159b34/comment/65536c27fbdaaf31319ed323"
---

[Discussion](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-interrupts/64f9e579c9aab703dd159b34)

Comment [ESP32 Standard Library Embedded Rust: GPIO Interrupts](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-interrupts/64f9e579c9aab703dd159b34)

[Ant Skelton](https://hashnode.com/@blowback)

[Nov 14, 2023](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-interrupts/64f9e579c9aab703dd159b34/comment/65536c27fbdaaf31319ed323)

Great example, thank you! I found I had to call `button.enable_interrupt().unwrap()` inside the loop, or I'd only get precisely one interrupt. This is noted in the most recent docs for `subscribe()` where they note that you must call it from non-ISR context.

[Omar Hiari](https://hashnode.com/@omarhiari)

[Nov 14, 2023](https://hashnode.com/posts/esp32-standard-library-embedded-rust-gpio-interrupts/64f9e579c9aab703dd159b34/comment/65536c27fbdaaf31319ed323#reply-6553af8ffbdaaf31319edd3e)

Thanks for reading! To your comment, there has probably been a change in the interface, however, it makes sense. Resetting the interrupt enable is not unusual.
