Browse Source

Add Pi Zero 2 to model list

Add Pi Zero 2 to model list
pull/145/head
Tom 2 years ago
parent
commit
a4ae6fe184
3 changed files with 5 additions and 2 deletions
  1. +3
    -1
      gpio/readall.c
  2. +1
    -1
      wiringPi/wiringPi.c
  3. +1
    -0
      wiringPi/wiringPi.h

+ 3
- 1
gpio/readall.c View File

@@ -313,6 +313,8 @@ static void plus2header (int model)
printf (" +-----+-----+---------+------+---+---Pi 4B--+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_400)
printf (" +-----+-----+---------+------+---+---Pi 400-+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_ZERO2_W)
printf (" +-----+-----+---------+------+---+--Pi Zero2W---+------+---------+-----+-----+\n") ;
else
printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
}
@@ -361,7 +363,7 @@ void doReadall (void)
(model == PI_MODEL_3AP) ||
(model == PI_MODEL_3B) || (model == PI_MODEL_3BP) ||
(model == PI_MODEL_4B) || (model == PI_MODEL_400) ||
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W) || (model == PI_MODEL_CM4))
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W) || (model == PI_MODEL_CM4) || (model == PI_MODEL_ZERO2_W))
piPlusReadall (model) ;
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3) || (model == PI_MODEL_CM3P) )
allReadall () ;


+ 1
- 1
wiringPi/wiringPi.c View File

@@ -239,7 +239,7 @@ const char *piModelNames [21] =
"Unknown15", // 15
"CM3+", // 16
"Pi 4B", // 17
"Unknown18", // 18
"Pi Zero2-W", // 18
"Pi 400", // 19
"CM4", // 20
} ;


+ 1
- 0
wiringPi/wiringPi.h View File

@@ -99,6 +99,7 @@
#define PI_MODEL_ZERO 9
#define PI_MODEL_CM3 10
#define PI_MODEL_ZERO_W 12
#define PI_MODEL_ZERO2_W 18
#define PI_MODEL_3BP 13
#define PI_MODEL_3AP 14
#define PI_MODEL_CM3P 16


Loading…
Cancel
Save