Git Product home page Git Product logo

Comments (4)

joan2937 avatar joan2937 commented on June 24, 2024

That is just a plain error on my part.

The erroneous error is because of an incorrect check when the GPIO is unexported. The unexport itself will be fine. However a consequential error means the GPIO is still marked exported internally and the software will not set up a new ISR.

The line

if (err != sizeof(buf)) return PI_BAD_ISR_INIT;

should be

if (err != strlen(buf)) return PI_BAD_ISR_INIT;

in the intGpioSetISRFunc function.

I'll correct the software in the next release (probably before 27th Oct 15).

from pigpio.

fivdi avatar fivdi commented on June 24, 2024

Great, thanks.

from pigpio.

joan2937 avatar joan2937 commented on June 24, 2024

Implemented in V39.

from pigpio.

fivdi avatar fivdi commented on June 24, 2024

Thanks for fixing this. Everything looks a lot better now and the issue has been resolved. However, there is a new issue.

Here's the output of the first run of the test program from the original post:

version: 39
isr1 - gpio: 4, level: 2
isr1 - gpio: 4, level: 2
isr1 - gpio: 4, level: 2
isr1 - gpio: 4, level: 2
isr2
isr2
isr2
isr2
2015-10-31 07:08:41 sigHandler: Unhandled signal 11, terminating

Here's the output of the second run:

2015-10-31 07:09:23 initMboxBlock: init mbox zaps failed

As can be seen, everything isn't quite right yet. However, this is a different problem so I'll open a new issue for it.

This problem can be solved by calling gpioSetISRFunc(GPIO, EITHER_EDGE, 0, NULL) directly before calling gpioTerminate().

from pigpio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.