#545 ppm type annotation updates
This commit is contained in:
parent
b2e5ced54d
commit
033bcdb9e3
@ -334,12 +334,12 @@ end
|
|||||||
|
|
||||||
-- list all available peripherals
|
-- list all available peripherals
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@return table names
|
---@return string[] names
|
||||||
function ppm.list_avail() return peripheral.getNames() end
|
function ppm.list_avail() return peripheral.getNames() end
|
||||||
|
|
||||||
-- list mounted peripherals
|
-- list mounted peripherals
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@return table mounts
|
---@return { [string]: ppm_entry } mounts
|
||||||
function ppm.list_mounts()
|
function ppm.list_mounts()
|
||||||
local list = {}
|
local list = {}
|
||||||
for k, v in pairs(ppm_sys.mounts) do list[k] = v end
|
for k, v in pairs(ppm_sys.mounts) do list[k] = v end
|
||||||
@ -363,7 +363,7 @@ end
|
|||||||
-- get a mounted peripheral by side/interface
|
-- get a mounted peripheral by side/interface
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param iface string CC peripheral interface
|
---@param iface string CC peripheral interface
|
||||||
---@return table|nil device function table
|
---@return { [string]: function }|nil device function table
|
||||||
function ppm.get_periph(iface)
|
function ppm.get_periph(iface)
|
||||||
if ppm_sys.mounts[iface] then
|
if ppm_sys.mounts[iface] then
|
||||||
return ppm_sys.mounts[iface].dev
|
return ppm_sys.mounts[iface].dev
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user