mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2025-12-12 16:08:49 +01:00
gpio readall didn't work on the Zero. This fixed that little goof
This commit is contained in:
parent
bb6f08487c
commit
31a8a2cdb8
@ -289,6 +289,8 @@ static void plus2header (int model)
|
||||
printf (" +-----+-----+---------+------+---+--A Plus--+---+------+---------+-----+-----+\n") ;
|
||||
else if (model == PI_MODEL_BP)
|
||||
printf (" +-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+\n") ;
|
||||
else if (model == PI_MODEL_ZERO)
|
||||
printf (" +-----+-----+---------+------+---+-Pi Zero--+---+------+---------+-----+-----+\n") ;
|
||||
else
|
||||
printf (" +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+\n") ;
|
||||
}
|
||||
@ -325,7 +327,7 @@ void doReadall (void)
|
||||
|
||||
/**/ if ((model == PI_MODEL_A) || (model == PI_MODEL_B))
|
||||
abReadall (model, rev) ;
|
||||
else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) || (model == PI_MODEL_2))
|
||||
else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) || (model == PI_MODEL_2) || (model == PI_MODEL_ZERO))
|
||||
piPlusReadall (model) ;
|
||||
else if (model == PI_MODEL_CM)
|
||||
cmReadall () ;
|
||||
|
||||
@ -76,6 +76,9 @@
|
||||
#define PI_MODEL_2 4
|
||||
#define PI_ALPHA 5
|
||||
#define PI_MODEL_CM 6
|
||||
#define PI_MODEL_07 7
|
||||
#define PI_MODEL_08 8
|
||||
#define PI_MODEL_ZERO 9
|
||||
|
||||
#define PI_VERSION_1 0
|
||||
#define PI_VERSION_1_1 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user