ht_pwm_setup()


按指定HT(Hardware Timer)的PWM模式设定及使用

Description

void ht_pwm_setup(int $ht_id, int $width, int $period [, string $div = “us”])

Parameters

Return Value

none

Example

<?php
include "/lib/sd_340.php";
// Configuring HT0 as period 200us with 50% duty PWM and start it
ht_pwm_setup(0, 100, 200);
// Configuring HT1 as period 200us with 10% duty PWM and start it
ht_pwm_setup(1, 10, 100);
?>

See also