ht_pwm_setup()


Run the designated Hardware Timer(HT) after configuring it to the PWM mode

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