mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Document pio.decode()
This commit is contained in:
parent
ff2ba18585
commit
27da495151
@ -151,6 +151,19 @@ data_en =
|
||||
"$portn (optional)$ - the %n%-th port"
|
||||
}
|
||||
},
|
||||
|
||||
{ sig = "port, pin = #pio.decode#( resnum )",
|
||||
desc = "Convert a PIO resource number to the corresponding port and pin. This is most commonly used in GPIO edge interrupt routines to convert the Lua interrupt routine's argument to the port and pin that caused the interrupt but it can also be used on the values returned by the pin names pio.PA_0, pio.P2_15 and so on.",
|
||||
args =
|
||||
{
|
||||
"$resnum$ - the resource number of the pin",
|
||||
},
|
||||
ret =
|
||||
{
|
||||
"$port$ - the index of the port, starting from 0 (so port A is 0, port B is 1 and so on)",
|
||||
"$pin$ - the pin number, usually from 0 to 31",
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user