mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
PWM generic doc.
This commit is contained in:
parent
1c3a5b57f0
commit
85f98342dd
@ -7,7 +7,7 @@ local doc_sections = { "arch_platform", "refman_gen" }
|
|||||||
local components =
|
local components =
|
||||||
{
|
{
|
||||||
arch_platform = { "ll", "pio", "spi", "uart", "timers", "pwm", "cpu", "eth", "adc" },
|
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)
|
-- List here all languages for the documentation (make sure to keep English ("en") the first one)
|
||||||
|
60
doc/luadoc/refman_gen_pwm.lua
Normal file
60
doc/luadoc/refman_gen_pwm.lua
Normal 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."
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user