<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="lt">
	<id>https://wiki.eofnet.lt/w//index.php?action=history&amp;feed=atom&amp;title=ESP32_GPIO_Interrupts</id>
	<title>ESP32 GPIO Interrupts - Versijų istorija</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eofnet.lt/w//index.php?action=history&amp;feed=atom&amp;title=ESP32_GPIO_Interrupts"/>
	<link rel="alternate" type="text/html" href="https://wiki.eofnet.lt/w//index.php?title=ESP32_GPIO_Interrupts&amp;action=history"/>
	<updated>2026-06-12T01:26:03Z</updated>
	<subtitle>Šio puslapio versijų istorija projekte</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.eofnet.lt/w//index.php?title=ESP32_GPIO_Interrupts&amp;diff=9501&amp;oldid=prev</id>
		<title>\dev\null 21:32, 26 lapkričio 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.eofnet.lt/w//index.php?title=ESP32_GPIO_Interrupts&amp;diff=9501&amp;oldid=prev"/>
		<updated>2022-11-26T21:32:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;lt&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Ankstesnė versija&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;21:32, 26 lapkričio 2022 versija&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;7 eilutė:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;7 eilutė:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;All GPIO pins in an ESP32 board can be configured to act as interrupt request inputs.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;All GPIO pins in an ESP32 board can be configured to act as interrupt request inputs.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Button example''':&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Button example''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(pin 18)&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>\dev\null</name></author>
	</entry>
	<entry>
		<id>https://wiki.eofnet.lt/w//index.php?title=ESP32_GPIO_Interrupts&amp;diff=9500&amp;oldid=prev</id>
		<title>\dev\null: Naujas puslapis: ESP32 provides up to 32 interrupt slots for each core. Each interrupt has a certain priority level and can be classified into two types.  Hardware interrupts – These occur in r...</title>
		<link rel="alternate" type="text/html" href="https://wiki.eofnet.lt/w//index.php?title=ESP32_GPIO_Interrupts&amp;diff=9500&amp;oldid=prev"/>
		<updated>2022-11-26T21:32:05Z</updated>

		<summary type="html">&lt;p&gt;Naujas puslapis: ESP32 provides up to 32 interrupt slots for each core. Each interrupt has a certain priority level and can be classified into two types.  Hardware interrupts – These occur in r...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Naujas puslapis&lt;/b&gt;&lt;/p&gt;&lt;div&gt;ESP32 provides up to 32 interrupt slots for each core. Each interrupt has a certain priority level and can be classified into two types.&lt;br /&gt;
&lt;br /&gt;
Hardware interrupts – These occur in response to an external event. For example, a GPIO interrupt (when a key is pressed) or a touch interrupt (when touch is detected).&lt;br /&gt;
&lt;br /&gt;
In ESP32 we can define an interrupt service routine function that will be called when the GPIO pin changes its logic level.&lt;br /&gt;
&lt;br /&gt;
All GPIO pins in an ESP32 board can be configured to act as interrupt request inputs.&lt;br /&gt;
&lt;br /&gt;
'''Button example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct Button {&lt;br /&gt;
  const uint8_t PIN;&lt;br /&gt;
  uint32_t numberKeyPresses;&lt;br /&gt;
  bool pressed;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Button button1 = {18, 0, false};&lt;br /&gt;
&lt;br /&gt;
//variables to keep track of the timing of recent interrupts&lt;br /&gt;
unsigned long button_time = 0;  &lt;br /&gt;
unsigned long last_button_time = 0; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void IRAM_ATTR isr() {&lt;br /&gt;
    button_time = millis();&lt;br /&gt;
    if (button_time - last_button_time &amp;gt; 250)&lt;br /&gt;
    {&lt;br /&gt;
        button1.numberKeyPresses++;&lt;br /&gt;
        button1.pressed = true;&lt;br /&gt;
        last_button_time = button_time;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  pinMode(button1.PIN, INPUT_PULLUP);&lt;br /&gt;
  attachInterrupt(button1.PIN, isr, FALLING);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
   if (button1.pressed) {&lt;br /&gt;
        Serial.printf(&amp;quot;Button has been pressed %u times\n&amp;quot;, button1.numberKeyPresses);&lt;br /&gt;
        button1.pressed = false;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ESP32]]&lt;/div&gt;</summary>
		<author><name>\dev\null</name></author>
	</entry>
</feed>