Selaa lähdekoodia

Add RPi4 detection

pull/65/head
Igor Kanyuka 5 vuotta sitten
vanhempi
commit
cd8e37719f
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. +4
    -1
      gpio/readall.c
  2. +1
    -0
      wiringPi/wiringPi.h

+ 4
- 1
gpio/readall.c Näytä tiedosto

@@ -307,6 +307,8 @@ static void plus2header (int model)
printf (" +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_3P)
printf (" +-----+-----+---------+------+---+---Pi 3+--+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_4)
printf (" +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+\n") ;
else
printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
}
@@ -353,7 +355,8 @@ void doReadall (void)
else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) ||
(model == PI_MODEL_2) ||
(model == PI_MODEL_3) || (model == PI_MODEL_3P) ||
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W))
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W) ||
(model == PI_MODEL_4))
piPlusReadall (model) ;
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3))
allReadall () ;


+ 1
- 0
wiringPi/wiringPi.h Näytä tiedosto

@@ -100,6 +100,7 @@
#define PI_MODEL_CM3 10
#define PI_MODEL_ZERO_W 12
#define PI_MODEL_3P 13
#define PI_MODEL_4 17

#define PI_VERSION_1 0
#define PI_VERSION_1_1 1


Ladataan…
Peruuta
Tallenna