From c9f08c9e7b937f2cde8a9eeabb573071ec42b4ca Mon Sep 17 00:00:00 2001 From: mstroh Date: Sun, 2 Nov 2025 18:36:57 +0100 Subject: [PATCH 1/3] #407 de fix ISR example --- documentation/deutsch/functions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/deutsch/functions.md b/documentation/deutsch/functions.md index 0c86b55..8b78d56 100644 --- a/documentation/deutsch/functions.md +++ b/documentation/deutsch/functions.md @@ -473,7 +473,7 @@ static void wfi(struct WPIWfiStatus wfiStatus, void* userdata) { edgeType = "falling"; else edgeType = "none"; - printf("gpio BCM = %d, IRQ edge = %s, timestamp = %lld microseconds, timenow = %lld, diff = %lld\n", wfiStatus.gpioPin, edgeType, wfiStatus.timeStamp_us, timenow, diff); + printf("gpio BCM = %d, IRQ edge = %s, timestamp = %lld microseconds, timenow = %lld, diff = %lld\n", wfiStatus.pinBCM, edgeType, wfiStatus.timeStamp_us, timenow, diff); if (toggle == 0) { digitalWrite (OUTpin, HIGH); toggle = 1; @@ -500,19 +500,19 @@ int main (void) printf("Testing waitForInterrupt on both edges IRQ @ GPIO%d, timeout is %d\n", IRQpin, TIMEOUT); struct WPIWfiStatus wfiStatus = waitForInterrupt2(IRQpin, INT_EDGE_BOTH, TIMEOUT, BOUNCETIME_WFI); - if (wfiStatus.status < 0) { + if (wfiStatus.statusOK < 0) { printf("waitForInterrupt returned error\n"); pinMode(OUTpin, INPUT); return 0; } - else if (wfiStatus.status == 0) { + else if (wfiStatus.statusOK == 0) { printf("waitForInterrupt timed out\n\n"); } else { if (wfiStatus.edge == INT_EDGE_FALLING) - printf("waitForInterrupt: GPIO pin %d falling edge fired at %lld microseconds\n\n", wfiStatus.gpioPin, wfiStatus.timeStamp_us); + printf("waitForInterrupt: GPIO pin %d falling edge fired at %lld microseconds\n\n", wfiStatus.pinBCM, wfiStatus.timeStamp_us); else - printf("waitForInterrupt: GPIO pin %d rising edge fired at %lld microseconds\n\n", wfiStatus.gpioPin, wfiStatus.timeStamp_us); + printf("waitForInterrupt: GPIO pin %d rising edge fired at %lld microseconds\n\n", wfiStatus.pinBCM, wfiStatus.timeStamp_us); } printf("Testing IRQ @ GPIO%d on both edges and bouncetime %d microseconds. Toggle LED @ GPIO%d on IRQ.\n\n", IRQpin, BOUNCETIME, OUTpin); From 08cf61daff6e3947c9f34655b5e25ce3ba601574 Mon Sep 17 00:00:00 2001 From: mstroh Date: Sun, 2 Nov 2025 18:39:14 +0100 Subject: [PATCH 2/3] #407 en fix ISR example --- documentation/english/functions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/english/functions.md b/documentation/english/functions.md index f13874a..739f9ab 100644 --- a/documentation/english/functions.md +++ b/documentation/english/functions.md @@ -497,19 +497,19 @@ int main (void) printf("Testing waitForInterrupt on both edges IRQ @ GPIO%d, timeout is %d\n", IRQpin, TIMEOUT); struct WPIWfiStatus wfiStatus = waitForInterrupt2(IRQpin, INT_EDGE_BOTH, TIMEOUT, BOUNCETIME_WFI); - if (wfiStatus.status < 0) { + if (wfiStatus.statusOK < 0) { printf("waitForInterrupt returned error\n"); pinMode(OUTpin, INPUT); return 0; } - else if (wfiStatus.status == 0) { + else if (wfiStatus.statusOK == 0) { printf("waitForInterrupt timed out\n\n"); } else { if (wfiStatus.edge == INT_EDGE_FALLING) - printf("waitForInterrupt: GPIO pin %d falling edge fired at %lld microseconds\n\n", wfiStatus.gpioPin, wfiStatus.timeStamp_us); + printf("waitForInterrupt: GPIO pin %d falling edge fired at %lld microseconds\n\n", wfiStatus.pinBCM, wfiStatus.timeStamp_us); else - printf("waitForInterrupt: GPIO pin %d rising edge fired at %lld microseconds\n\n", wfiStatus.gpioPin, wfiStatus.timeStamp_us); + printf("waitForInterrupt: GPIO pin %d rising edge fired at %lld microseconds\n\n", wfiStatus.pinBCM, wfiStatus.timeStamp_us); } printf("Testing IRQ @ GPIO%d on both edges and bouncetime %d microseconds. Toggle LED @ GPIO%d on IRQ.\n\n", IRQpin, BOUNCETIME, OUTpin); From 0f76f5e116a01f1c775b07308133c6f68b9f29f7 Mon Sep 17 00:00:00 2001 From: mstroh Date: Sun, 2 Nov 2025 18:45:03 +0100 Subject: [PATCH 3/3] #407 en fix ISR example --- documentation/english/functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/english/functions.md b/documentation/english/functions.md index 739f9ab..6875205 100644 --- a/documentation/english/functions.md +++ b/documentation/english/functions.md @@ -470,7 +470,7 @@ static void wfi(struct WPIWfiStatus wfiStatus, void* userdata) { edgeType = "falling"; else edgeType = "none"; - printf("gpio BCM = %d, IRQ edge = %s, timestamp = %lld microseconds, timenow = %lld, diff = %lld\n", wfiStatus.gpioPin, edgeType, wfiStatus.timeStamp_us, timenow, diff); + printf("gpio BCM = %d, IRQ edge = %s, timestamp = %lld microseconds, timenow = %lld, diff = %lld\n", wfiStatus.pinBCM, edgeType, wfiStatus.timeStamp_us, timenow, diff); if (toggle == 0) { digitalWrite (OUTpin, HIGH); toggle = 1;