Просмотр исходного кода

Merge pull request #120 from toca21/master

Fixed the Compute Module 4 pin mode setting.
pull/123/head
Mark Liffiton 3 лет назад
committed by GitHub
Родитель
Сommit
7f8fe26e4f
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
2 измененных файлов: 3 добавлений и 4 удалений
  1. +2
    -2
      gpio/readall.c
  2. +1
    -2
      wiringPi/wiringPi.c

+ 2
- 2
gpio/readall.c Просмотреть файл

@@ -361,9 +361,9 @@ void doReadall (void)
(model == PI_MODEL_3AP) || (model == PI_MODEL_3AP) ||
(model == PI_MODEL_3B) || (model == PI_MODEL_3BP) || (model == PI_MODEL_3B) || (model == PI_MODEL_3BP) ||
(model == PI_MODEL_4B) || (model == PI_MODEL_400) || (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) ; 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 () ; allReadall () ;
else else
printf ("Oops - unable to determine board type... model: %d\n", model) ; printf ("Oops - unable to determine board type... model: %d\n", model) ;


+ 1
- 2
wiringPi/wiringPi.c Просмотреть файл

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


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


Загрузка…
Отмена
Сохранить