From 08cf61daff6e3947c9f34655b5e25ce3ba601574 Mon Sep 17 00:00:00 2001 From: mstroh Date: Sun, 2 Nov 2025 18:39:14 +0100 Subject: [PATCH] #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);