Parcourir la source

Add RPi4 detection

pull/65/head
Igor Kanyuka il y a 5 ans
Parent
révision
cd8e37719f
2 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. +4
    -1
      gpio/readall.c
  2. +1
    -0
      wiringPi/wiringPi.h

+ 4
- 1
gpio/readall.c Voir le fichier

@@ -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 Voir le fichier

@@ -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


Chargement…
Annuler
Enregistrer