blob: c6cda25e730813c7f1fe2e299c094b179685b019 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
local function dump_bin_array(output, name, data)
output:write([[
static const uint8_t ]] .. name .. [[[] = {
]])
for i = 1, #data do
output:write(string.byte(data, i) .. ', ')
if i % 10 == 0 then
output:write('\n ')
end
end
output:write([[
};
]])
end
return dump_bin_array
|