Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8563401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:57:07+00:00 2026-06-11T16:57:07+00:00

I am working with gpio interrupts. I have a file in /sys/class/gpio/gpio38/value. I want

  • 0

I am working with gpio interrupts. I have a file in “/sys/class/gpio/gpio38/value”. I want a notification whenever there is a change in attribute value. So how can I achieve this in user-space. As I have already collected information, I can use select(), poll() or epoll(). So which is correct for this application ? Or please suggest me if I can use /proc/irq or something. Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:57:08+00:00Added an answer on June 11, 2026 at 4:57 pm

    I have found something here that may be of help:

    GPIO signals have paths like /sys/class/gpio/gpio42/ (for GPIO #42)
    and have the following read/write attributes:

    “value” … reads as either 0 (low) or 1 (high). If the GPIO
    is configured as an output, this value may be written;
    any nonzero value is treated as high.

    If the pin can be configured as interrupt-generating interrupt
    and if it has been configured to generate interrupts (see the
    description of “edge”), you can poll(2) on that file and
    poll(2) will return whenever the interrupt was triggered. If
    you use poll(2), set the events POLLPRI and POLLERR. If you
    use select(2), set the file descriptor in exceptfds. After
    poll(2) returns, either lseek(2) to the beginning of the sysfs
    file and read the new value or close the file and re-open it
    to read the value.

    Although it says it’s for “gpio42”, I’m guessing this may apply to your case to. If it doesn’t, make a comment in my answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working in Java: I have a JFrame class, and separate classes for my two
Working with C#. I have an abstract class that I use to read/write settings
Working on dom html . I want to convert node value to string: $html
Working with jquery.ajax for first time... I have a class in C#: public class
Working in iOS 5 I have read a list of file names from my
Working with Sharepoint 2010, I have a class that inherits SPPersistedObject with various settings:
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with JSF 2.0 (and Primefaces), is there a way to fire an ActionListener
I'm working on an armv6 core and have an FIQ hander that works great
Working on an old Kohana 2 project and I want to link two models.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.