Parcourir la source

Fixed the Compute Module 4 pin mode setting. The CM4 is equal to RB4 std platform, not CM3 family as it turned out.

pull/120/head
toca21 il y a 3 ans
Parent
révision
5cabf4a4f8
2 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. +2
    -2
      gpio/readall.c
  2. +1
    -2
      wiringPi/wiringPi.c

+ 2
- 2
gpio/readall.c Voir le fichier

@@ -361,9 +361,9 @@ 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_ZERO) || (model == PI_MODEL_ZERO_W) || (model == PI_MODEL_CM4))
piPlusReadall (model) ;
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3) || (model == PI_MODEL_CM3P) || (model == PI_MODEL_CM4))
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3) || (model == PI_MODEL_CM3P) )
allReadall () ;
else
printf ("Oops - unable to determine board type... model: %d\n", model) ;


+ 1
- 2
wiringPi/wiringPi.c Voir le fichier

@@ -2284,8 +2284,7 @@ int wiringPiSetup (void)

if ((model == PI_MODEL_CM) ||
(model == PI_MODEL_CM3) ||
(model == PI_MODEL_CM3P) ||
(model == PI_MODEL_CM4))
(model == PI_MODEL_CM3P))
wiringPiMode = WPI_MODE_GPIO ;
else
wiringPiMode = WPI_MODE_PINS ;


Chargement…
Annuler
Enregistrer