Translations:Buzzer/4/en: различия между версиями

Материал из Wiren Board
 
Строка 1: Строка 1:
After that, the /sys/class/pwm/pwmchip0/pwm2 folder appears
The Linux kernel provides a sysfs interface to pwm that accepts a pwm frequency and a duty cycle in '''nanoseconds (10<sup>-9</sup>S)'''! Therefore, for low-level control of the Buzzer, it is necessary to recalculate the desired frequency from kHz to a period in nanoseconds using the formula:
<b>
T(ns) = 1,000,000 / f(kHz)
</b>

Текущая версия на 20:47, 22 сентября 2022

Определение сообщения (Buzzer)
Ядро Linux предоставляет интерфейс sysfs для pwm, который принимает частоту pwm и duty cycle в '''наносекундах (10<sup>-9</sup>С)'''! Поэтому, для низкоуровневого управления Buzzer'ом нужно производить пересчёт желаемой частоты из kHz в период в наносекундах по формуле:
<b>
T(ns) = 1 000 000 / f(kHz)
</b>

The Linux kernel provides a sysfs interface to pwm that accepts a pwm frequency and a duty cycle in nanoseconds (10-9S)! Therefore, for low-level control of the Buzzer, it is necessary to recalculate the desired frequency from kHz to a period in nanoseconds using the formula: T(ns) = 1,000,000 / f(kHz)