Explorar el Código
Merge pull request #71 from neuralassembly/master
Keeping compatibility of hardware clock of Pi 4 with earlier versions.
pull/72/head
Mark Liffiton
hace 4 años
committed by
GitHub
No se encontró ninguna clave conocida en la base de datos para esta firma
ID de clave GPG: 4AEE18F83AFDEB23
Se han
modificado 1 ficheros con
5 adiciones y
0 borrados
-
wiringPi/wiringPi.c
|
|
@@ -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)) |
|
|
|