Przeglądaj źródła

gpio readall didn't work on the Zero. This fixed that little goof

pull/62/head
Gordon Henderson 9 lat temu
rodzic
commit
31a8a2cdb8
2 zmienionych plików z 6 dodań i 1 usunięć
  1. +3
    -1
      gpio/readall.c
  2. +3
    -0
      wiringPi/wiringPi.h

+ 3
- 1
gpio/readall.c Wyświetl plik

@@ -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 () ;


+ 3
- 0
wiringPi/wiringPi.h Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz