]> git.feebdaed.xyz Git - 0xmirror/WiringPi.git/commitdiff
#264 adjust unit test and autodetect unit test 6.2 irq
authormstroh76 <m.stroh76@gmail.com>
Sat, 24 May 2025 10:31:00 +0000 (12:31 +0200)
committermstroh76 <m.stroh76@gmail.com>
Sat, 24 May 2025 10:31:00 +0000 (12:31 +0200)
wiringPi/test/wiringpi_test62_isr_wpin.c

index 500e7c6f3894e345c17d401c8ec2548ca61ec192..6132d217de56a788ce5c502c6cfc3759b021751a 100644 (file)
@@ -76,10 +76,10 @@ int main (void) {
 
   CheckNotSame("piBoardId", RaspberryPiModel, 0);
 
-  int _is40pin = is40pin();
+  int _is40pin = piBoard40Pin();
   CheckNotSame("is40pin", _is40pin, -1);
 
-  if (_is40pin) {
+  if (_is40pin==1) {
 
     int IRQpin = GPIOIN;
     int OUTpin = GPIO;
@@ -88,7 +88,7 @@ int main (void) {
     pinMode(OUTpin, OUTPUT);
     digitalWrite(OUTpin, LOW);
     delayMicroseconds(100);
-    CheckNotSame("Input", digitalRead(IRQpin), LOW);
+    CheckSame("Input", digitalRead(IRQpin), LOW);
     digitalWrite(OUTpin, HIGH);
     delayMicroseconds(100);
     if (digitalRead(IRQpin)==HIGH) {