#346 GPIO Character Device Userspace API V2 - compatibility to old interface

This commit is contained in:
mstroh76
2025-05-02 13:10:40 +02:00
parent 9c9f3c1663
commit 38274fe6e8
7 changed files with 437 additions and 125 deletions

View File

@@ -177,7 +177,7 @@ void printgpio(const char* text) {
}
}
static void wfi (UNU struct WPIWfiStatus wfiStatus) {
static void wfi (void) {
globalCounter++;
if(globalCounter>=iterations) {
printgpio("finished\n");
@@ -217,7 +217,7 @@ void doWfi (int argc, char *argv [])
timeoutSec = atoi(argv [5]);
}
if (wiringPiISR (pin, mode, &wfi, 0) < 0)
if (wiringPiISR (pin, mode, &wfi) < 0)
{
fprintf (stderr, "%s: wfi: Unable to setup ISR: %s\n", argv [1], strerror (errno)) ;
exit (1) ;