Skip to content

Commit

Permalink
Logging via env parameter RPIGPIO_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
mstroh76 committed May 15, 2020
1 parent 0437d27 commit e928499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/c_gpio_bpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ int bpi_get_rpi_info(rpi_info *info)
pinToGpio_BP = board->pinToGpio ;
physToGpio_BP = board->physToGpio ;
pinTobcm_BP = board->pinTobcm ;
if (bpi_debug>=4) printf("BPI: name[%s] bType(%d) model(%d)\n",board->name, bType, board->model);
if (bpi_debug>=4) printf("BPI: name[%s] model(%d)\n",board->name, board->model);
return 0;
}
return -1;
Expand Down
4 changes: 4 additions & 0 deletions test/pull18_bcm.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/usr/bin/python3
import RPi.GPIO as GPIO
import time
import os


led = 18
stime = 2

os.environ['RPIGPIO_DEBUG'] = "2"
print("Debug level set to " + os.environ["RPIGPIO_DEBUG"])

GPIO.setmode(GPIO.BCM)

print("GPIO.setup led ")
Expand Down

0 comments on commit e928499

Please # to comment.