st_pwm_setup()


Run the designated Software Timer(ST) after configuring it to the PWM mode

Description

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

Parameters

Return Value

none

Example

<?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");
?>

See also