瀏覽代碼

Merge pull request #71 from neuralassembly/master

Keeping compatibility of hardware clock of Pi 4 with earlier versions.
pull/72/head
Mark Liffiton 4 年之前
committed by GitHub
父節點
當前提交
5bbb6e34b8
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      wiringPi/wiringPi.c

+ 5
- 0
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))


Loading…
取消
儲存