mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
48 lines
1.0 KiB
Lua
48 lines
1.0 KiB
Lua
-- eLua reference manual - platform data
|
|
|
|
data_en =
|
|
{
|
|
|
|
-- Title
|
|
title = "eLua reference manual - STM32 enc module",
|
|
|
|
-- Menu name
|
|
menu_name = "enc",
|
|
|
|
-- Overview
|
|
overview = [[This module contains functions to set up and use timers in quadrature encoder mode.]],
|
|
|
|
-- Functions
|
|
funcs =
|
|
{
|
|
{ sig = "#stm32.enc.init#( id )",
|
|
desc = "Configure timer for quadrature mode.",
|
|
args =
|
|
{
|
|
"$id$ - timer ID"
|
|
}
|
|
},
|
|
{ sig = "#stm32.enc.setcounter#( id, count )",
|
|
desc = "Set the counter for a timer.",
|
|
args =
|
|
{
|
|
"$id$ - timer ID",
|
|
"$count$ - value to set counter to."
|
|
}
|
|
},
|
|
{ sig = "#stm32.enc.setidxtrig#( id, resnum, tmr_id, count )",
|
|
desc = "Configure an interrupt trigger to set timer counter to a predefined value.",
|
|
args =
|
|
{
|
|
"$id$ - interrupt ID",
|
|
"$resnum$ - resource ID associated with interrupt",
|
|
"$tmr_id$ - timer ID",
|
|
"$count$ - value to set counter to when triggered"
|
|
}
|
|
},
|
|
|
|
},
|
|
}
|
|
|
|
data_pt = data_en
|