Ver código fonte

Keeping compatibility of hardware clock of Pi 4 with earlier versions.

pull/71/head
neuralassembly 4 anos atrás
pai
commit
651136a110
1 arquivos alterados com 5 adições e 0 exclusões
  1. +5
    -0
      wiringPi/wiringPi.c

+ 5
- 0
wiringPi/wiringPi.c Ver arquivo

@@ -1218,6 +1218,11 @@ void pwmSetRange (unsigned int range)
void pwmSetClock (int divisor)
{
uint32_t pwm_control ;

if (piGpioBase == GPIO_PERI_BASE_2711)
{
divisor = 540*divisor/192;
}
divisor &= 4095 ;

if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO))


Carregando…
Cancelar
Salvar