-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpioSetISRFunc error -123 #613
Comments
I want to use GPIO21 as interrupt pin and encounter the exactly same problem After trying "cat /sys/kernel/debug/gpio", I got
and then I tried the following commands GPIO21 actually output high. So it seems to use GPIO 512-565 instead of 0-54 in my OS which is but the source code of gpioSetISRFunc uses 0-54 to export, set direction and the edge of GPIO In this situation, I don't know how to configure interrupt with pigpio. |
Hi, |
I was having the same issue and I was able to get static int intGpioSetISRFunc(
unsigned gpio,
unsigned edge,
int timeout,
void *f,
int user,
void *userdata)
{
char buf[64];
char *edge_str[]={"rising\n", "falling\n", "both\n"};
int fd;
int err;
gpio += 512; // Shifting GPIO numbering to start with 512
DBG(DBG_INTERNAL,
"gpio=%d edge=%d timeout=%d function=%08"PRIXPTR" user=%d userdata=%08"PRIXPTR,
gpio, edge, timeout, (uintptr_t)f, user, (uintptr_t)userdata);
...
} Then after building and installing from the source code, |
Hello
I'm struggling with the function
gpioSetISRFunc
I always have a bad init error -123
I tried to find some solution by disabling the W-1 interface but it does not work
This is my config.txt
I need this function because I have 2 different square signals on my PIN BCM 17 and 27 that represent the speed of 2 different rotors
I want that each time a RISING_EDGE is occuring it computes the times between the last and the current rising_edge
I tried to do
as mentionned here #97 fivdi/pigpio#97
but sadly after the line
I have an invalid argument error
My code is something like this :
It fails at the first gpioSetISRFunc
Thanks in advance
Tom
The text was updated successfully, but these errors were encountered: