20 lines
560 B
Plaintext
20 lines
560 B
Plaintext
--:Minify:--
|
|
local kernel=...
|
|
kernel.nc={}
|
|
kernel.nc.io=kernel.apis.io
|
|
kernel.nc.chip=kernel.apis.chip
|
|
kernel.nc.event=kernel.apis.event
|
|
kernel.nc.files=kernel.apis.files
|
|
|
|
kernel.log("Installed peripherals:")
|
|
local ok, peripherals = pcall(kernel.nc.io.getPeripherals)
|
|
if ok and type(peripherals)=="table" then
|
|
for _, id in ipairs(peripherals) do
|
|
local okT, typ = pcall(kernel.nc.io.getType, id)
|
|
if not okT then typ = "unknown" end
|
|
kernel.log(" "..tostring(id).." : "..tostring(typ))
|
|
end
|
|
else
|
|
kernel.log(" (none)")
|
|
end
|