Skip to content

Commit e928499

Browse files
committed
Logging via env parameter RPIGPIO_DEBUG
1 parent 0437d27 commit e928499

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

source/c_gpio_bpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ int bpi_get_rpi_info(rpi_info *info)
674674
pinToGpio_BP = board->pinToGpio ;
675675
physToGpio_BP = board->physToGpio ;
676676
pinTobcm_BP = board->pinTobcm ;
677-
if (bpi_debug>=4) printf("BPI: name[%s] bType(%d) model(%d)\n",board->name, bType, board->model);
677+
if (bpi_debug>=4) printf("BPI: name[%s] model(%d)\n",board->name, board->model);
678678
return 0;
679679
}
680680
return -1;

test/pull18_bcm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#!/usr/bin/python3
22
import RPi.GPIO as GPIO
33
import time
4+
import os
45

56

67
led = 18
78
stime = 2
89

10+
os.environ['RPIGPIO_DEBUG'] = "2"
11+
print("Debug level set to " + os.environ["RPIGPIO_DEBUG"])
12+
913
GPIO.setmode(GPIO.BCM)
1014

1115
print("GPIO.setup led ")

0 commit comments

Comments
 (0)