设定及使用为指定ST(Software Timer)的PWM模式
void st_pwm_setup(int $st_id, int $pin, int $width, int $period [, string $div = “ms”])
none
<?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");
?>