Преглед на файлове

Changes to support the Zero 2 W (model type 18|0x12)

pull/128/head
schwartz преди 3 години
родител
ревизия
a682a01a25
променени са 3 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. +4
    -2
      gpio/readall.c
  2. +1
    -1
      wiringPi/wiringPi.c
  3. +1
    -0
      wiringPi/wiringPi.h

+ 4
- 2
gpio/readall.c Целия файл

@@ -301,6 +301,8 @@ static void plus2header (int model)
printf (" +-----+-----+---------+------+---+-Pi Zero--+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_ZERO_W)
printf (" +-----+-----+---------+------+---+-Pi ZeroW-+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_ZERO_2W)
printf (" +-----+-----+---------+------+---+Pi Zero 2W+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_2)
printf (" +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+\n") ;
else if (model == PI_MODEL_3B)
@@ -360,8 +362,8 @@ void doReadall (void)
(model == PI_MODEL_2) ||
(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_4B) || (model == PI_MODEL_400) || (model == PI_MODEL_CM4) ||
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W) || (model == PI_MODEL_ZERO_2W))
piPlusReadall (model) ;
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3) || (model == PI_MODEL_CM3P) )
allReadall () ;


+ 1
- 1
wiringPi/wiringPi.c Целия файл

@@ -2294,7 +2294,7 @@ int wiringPiSetup (void)
pinToGpio = pinToGpioR1 ;
physToGpio = physToGpioR1 ;
}
else // A2, B2, A+, B+, CM, Pi2, Pi3, Zero
else // A2, B2, A+, B+, CM, Pi2, Pi3, Zero, Zero W, Zero 2 W
{
pinToGpio = pinToGpioR2 ;
physToGpio = physToGpioR2 ;


+ 1
- 0
wiringPi/wiringPi.h Целия файл

@@ -103,6 +103,7 @@
#define PI_MODEL_3AP 14
#define PI_MODEL_CM3P 16
#define PI_MODEL_4B 17
#define PI_MODEL_ZERO_2W 18
#define PI_MODEL_400 19
#define PI_MODEL_CM4 20



Зареждане…
Отказ
Запис