st_pwm_setup()


Запуск назначенного программного таймера (ST) после настройки его в режим PWM

Описание

void st_pwm_setup(int $st_id, int $pin, int $width, int $period [, string $div = “ms”])

Параметры

Возврат значений

Отсутствуют

Пример

<?php
include "/lib/sd_340.php";
// Configuring ST0 as period 200us with 50% duty PWM with output signal pin 5 and start it
st_pwm_setup(0, 5, 100, 200);
// Configuring ST1 as period 100us with 10% duty PWM with output signal pin 9 and start it
st_pwm_setup(1, 9, 10, 100, "us");
?>

Смотрите также