<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="100902" data-post-id="100902">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fhunleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fhunleth/120/978_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fhunleth
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Co-author of Nerves</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Regarding how GPIO interrupts get to ElixirALE, ElixirALE blocks on the poll(2) system call on a special file under the /sysfs directory. When the GPIO pin changes, the poll call unblocks. That’s documented here: <a href="https://github.com/raspberrypi/linux/blob/rpi-4.14.y/Documentation/gpio/sysfs.txt#L75-L83" class="inline-onebox" rel="noopener nofollow ugc">linux/Documentation/gpio/sysfs.txt at rpi-4.14.y · raspberrypi/linux · GitHub</a>.</p>
<p>As for how Linux knows to update that file, that’s documented in the GPIO section of the processor’s datasheet here: <a href="https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf" rel="noopener nofollow ugc">https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf</a>. It looks like the code of interest is here: <a href="https://github.com/raspberrypi/linux/blob/rpi-4.14.y/drivers/pinctrl/bcm/pinctrl-bcm2835.c#L387" class="inline-onebox" rel="noopener nofollow ugc">linux/drivers/pinctrl/bcm/pinctrl-bcm2835.c at rpi-4.14.y · raspberrypi/linux · GitHub</a>. At the very least, you can see how all GPIO pins share 2 or 3 interrupt lines inside the processor, so Linux has to figure out what happened whenever one changes.</p>
<p>I think that your barometer should fine since it doesn’t sound like it has a high interrupt rate. I’m not sure what the real threshold is, but if I were looking at a &gt;100Hz interrupt rate, I’d look at alternatives to handling the interrupts with ElixirALE.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100902" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/interrupt-service-is-it-possible-to-handle-hardware-interrupts-from-elixir/10473/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-100902" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100902"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="100922" data-post-id="100922">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jsimmonds2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jsimmonds2/120/10271_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jsimmonds2
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Wow !  (-: That’s one generous and useful reply, Thank you Frank !</p>
<p>You’re correct, too . . the output data rate of that pressure and temperature sensor is 25 Hz max.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="100922" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/interrupt-service-is-it-possible-to-handle-hardware-interrupts-from-elixir/10473/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-100922" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="100922"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>