1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-30 14:18:06 +11:00
Zorya-NEO/mods/menu_bios/config.lua
2020-12-13 15:37:13 -05:00

17 lines
498 B
Lua

local cfg = {}
local function b2a(data)
return string.format(string.format("%s-%s%s",string.rep("%.2x", 4),string.rep("%.2x%.2x-",3),string.rep("%.2x",6)),string.byte(data, 1,#data))
end
local function a2b(addr)
addr=addr:gsub("%-", "")
local baddr = ""
for i=1, #addr, 2 do
baddr = baddr .. string.char(tonumber(addr:sub(i, i+1), 16))
end
return baddr
end
do
-- Get EEPROM config data.
local eep = component.proxy(component.list("eeprom")())
local dat = eep.getData():sub(37)
end