1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

PWM generic doc.

This commit is contained in:
James Snyder 2009-07-09 03:15:38 +00:00
parent 1c3a5b57f0
commit 85f98342dd
2 changed files with 61 additions and 1 deletions

View File

@ -7,7 +7,7 @@ local doc_sections = { "arch_platform", "refman_gen" }
local components =
{
arch_platform = { "ll", "pio", "spi", "uart", "timers", "pwm", "cpu", "eth", "adc" },
refman_gen = { "bit", "pd", "cpu", "pack", "adc" }
refman_gen = { "bit", "pd", "cpu", "pack", "pwm", "adc" }
}
-- List here all languages for the documentation (make sure to keep English ("en") the first one)

View File

@ -0,0 +1,60 @@
-- eLua reference manual - platform data
data_en =
{
-- Title
title = "eLua reference manual - PWM",
-- Menu name
menu_name = "pwm",
-- Overview
overview = [[This module contains functions that control pulse-width modulation (PWM) peripherals.]],
-- Functions
funcs =
{
{ sig = "realfrequency = #pwm.setup#( id, frequency, duty )",
desc = "Configure PWM channel.",
args =
{
"$id$ - PWM channel ID.",
"$frequency$ - Frequency of PWM channel cycle (in hertz).",
"$duty$ - PWM channel duty cycle, specified as percent (from 0 to 100). Note that some platform don't allow the full 0-100 duty cycle"
},
ret = "$realfrequency$ - actual PWM cycle frequency"
},
{ sig = "#pwm.start#( id )",
desc = "Start PWM waveform generation.",
args =
{
"$id$ - PWM channel ID.",
}
},
{ sig = "#pwm.stop#( id )",
desc = "Stop PWM waveform generation.",
args =
{
"$id$ - PWM channel ID.",
}
},
{ sig = "realfrequency = #pwm.setclock#( id, clock )",
desc = "Set base PWM clock frequency",
args =
{
"$id$ - PWM channel ID.",
"$clock$ - Frequency of base clock.",
},
ret = "$realfrequency$ - actual base PWM clock."
},
{ sig = "clock = #pwm.getclock#( id )",
desc = "Get base PWM clock frequency",
args =
{
"$id$ - PWM channel ID.",
},
ret = "$clock$ - base PWM clock."
},
},
}