mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
bd1465ca50
Conflicts: SConstruct doc/en/arch_platform.html doc/en/comunity.html doc/en/overview.html doc/en/refman.html doc/en/refman_gen.html doc/en/status.html doc/en/tut_bootstick.html doc/images/lng_pt.png doc/images/minusnode.png doc/images/next.png doc/images/node.png doc/images/nodelast.png doc/images/plusnode.png doc/images/plusnodelast.png doc/images/previous.png doc/images/showall.png doc/images/sync.png doc/images/vertline.png doc/pt/arch.html doc/pt/arch_coding.html doc/pt/arch_con_term.html doc/pt/arch_newport.html doc/pt/arch_overview.html doc/pt/arch_platform.html doc/pt/arch_tcpip.html doc/pt/building.html doc/pt/comunity.html doc/pt/dl_binaries.html doc/pt/dl_old.html doc/pt/dl_sources.html doc/pt/downloads.html doc/pt/examples.html doc/pt/faq.html doc/pt/installing_i386.html doc/pt/installing_lm3s.html doc/pt/news.html doc/pt/overview.html doc/pt/refman_dep.html doc/pt/refman_gen.html doc/pt/status.html doc/pt/tc_386.html doc/pt/toolchains.html doc/pt/tut_openocd.html doc/pt/using.html romfs/LM3S.lua romfs/led.lua romfs/morse.lua romfs/pong.lua src/lua/linit.c src/modules/auxmods.h src/platform/lm3s/platform.c src/platform/lm3s/platform_conf.h src/platform/sim/platform_conf.h
115 lines
3.5 KiB
Lua
115 lines
3.5 KiB
Lua
-- eLua reference manual - pwm module
|
|
|
|
data_en =
|
|
{
|
|
|
|
-- Title
|
|
title = "eLua reference manual - pwm module",
|
|
|
|
-- Menu name
|
|
menu_name = "pwm",
|
|
|
|
-- Overview
|
|
overview = [[This module contains functions for accessing the PWM (Pulse Width Modulation) modules of the eLua CPU.]],
|
|
|
|
-- Functions
|
|
funcs =
|
|
{
|
|
{ sig = "frequency = #pwm.setup#( id, frequency, duty )",
|
|
desc = "Setup the PWM modules.",
|
|
args =
|
|
{
|
|
"$id$ - the ID of the PWM module.",
|
|
"$frequency$ - the frequency of the PWM module (in Hz).",
|
|
[[$duty$ - the duty cycle of the PWM module given in percents. This must be an integer between 0 and 100. $NOTE$: depending on the hardware, some
|
|
duty cycles (particulary 0 and 100) might not be achievable.]]
|
|
},
|
|
ret = "The actual frequenct set on the PWM module. Depending on the hardware, this might have a different value than the $frequency$ argument."
|
|
},
|
|
|
|
{ sig = "#pwm.start#( id )",
|
|
desc = "Start the PWM signal on the given module.",
|
|
args = "$id$ - the ID of the PWM module."
|
|
},
|
|
|
|
{ sig = "#pwm.stop#( id )",
|
|
desc = "Stop the PWM signal on the given module.",
|
|
args = "$id$ - the ID of the PWM module."
|
|
},
|
|
|
|
{ sig = "clock = #pwm.setclock#( id, clock )",
|
|
desc = "Set the base clock of the given PWM module.",
|
|
args =
|
|
{
|
|
"$id$ - the ID of the PWM module.",
|
|
"$clock$ - the desired base clock."
|
|
},
|
|
ret = "The actual base clock set on the PWM module. Depending on the hardware, this might have a different value than the $clock$ argument."
|
|
},
|
|
|
|
{ sig = "clock = #pwm.getclock#( id )",
|
|
desc = "Get the base clock of the given PWM module.",
|
|
args = "$id$ - the ID of the PWM module.",
|
|
ret = "The base clock of the PWM module."
|
|
}
|
|
},
|
|
|
|
}
|
|
|
|
data_pt =
|
|
{
|
|
|
|
-- Title
|
|
title = "eLua reference manual - pwm module",
|
|
|
|
-- Menu name
|
|
menu_name = "pwm",
|
|
|
|
-- Overview
|
|
overview = [[This module contains functions for accessing the PWM (Pulse Width Modulation) modules of the eLua CPU.]],
|
|
|
|
-- Functions
|
|
funcs =
|
|
{
|
|
{ sig = "frequency = #pwm.setup#( id, frequency, duty )",
|
|
desc = "Setup the PWM modules.",
|
|
args =
|
|
{
|
|
"$id$ - the ID of the PWM module.",
|
|
"$frequency$ - the frequency of the PWM module (in Hz).",
|
|
[[$duty$ - the duty cycle of the PWM module given in percents. This must be an integer between 0 and 100. $NOTE$: depending on the hardware, some
|
|
duty cycles (particulary 0 and 100) might not be achievable.]]
|
|
},
|
|
ret = "The actual frequenct set on the PWM module. Depending on the hardware, this might have a different value than the $frequency$ argument."
|
|
},
|
|
|
|
{ sig = "#pwm.start#( id )",
|
|
desc = "Start the PWM signal on the given module.",
|
|
args = "$id$ - the ID of the PWM module."
|
|
},
|
|
|
|
{ sig = "#pwm.stop#( id )",
|
|
desc = "Stop the PWM signal on the given module.",
|
|
args = "$id$ - the ID of the PWM module."
|
|
},
|
|
|
|
{ sig = "clock = #pwm.setclock#( id, clock )",
|
|
desc = "Set the base clock of the given PWM module.",
|
|
args =
|
|
{
|
|
"$id$ - the ID of the PWM module.",
|
|
"$clock$ - the desired base clock."
|
|
},
|
|
ret = "The actual base clock set on the PWM module. Depending on the hardware, this might have a different value than the $clock$ argument."
|
|
},
|
|
|
|
{ sig = "clock = #pwm.getclock#( id )",
|
|
desc = "Get the base clock of the given PWM module.",
|
|
args = "$id$ - the ID of the PWM module.",
|
|
ret = "The base clock of the PWM module."
|
|
}
|
|
},
|
|
|
|
}
|
|
|