From 2ed070f7ab8be7158539bee8bbcb8610d45f604c Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Thu, 2 Feb 2023 11:20:35 +0100 Subject: [PATCH] Adapted Lua files to machine functions --- Capy64/Assets/Lua/bin/reboot.lua | 3 ++- Capy64/Assets/Lua/bin/shutdown.lua | 3 ++- Capy64/Assets/Lua/boot/99_shell.lua | 3 ++- Capy64/Assets/bios.lua | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Capy64/Assets/Lua/bin/reboot.lua b/Capy64/Assets/Lua/bin/reboot.lua index 35ebe35..3dfbb5a 100644 --- a/Capy64/Assets/Lua/bin/reboot.lua +++ b/Capy64/Assets/Lua/bin/reboot.lua @@ -1,7 +1,8 @@ local timer = require("timer") +local machine = require("machine") print("Goodbye!") timer.sleep(1000) -os.shutdown(true) +machine.reboot() diff --git a/Capy64/Assets/Lua/bin/shutdown.lua b/Capy64/Assets/Lua/bin/shutdown.lua index 7d465ac..b1fb35b 100644 --- a/Capy64/Assets/Lua/bin/shutdown.lua +++ b/Capy64/Assets/Lua/bin/shutdown.lua @@ -1,7 +1,8 @@ local timer = require("timer") +local machine = require("machine") print("Goodbye!") timer.sleep(1000) -os.shutdown(false) +machine.shutdown() diff --git a/Capy64/Assets/Lua/boot/99_shell.lua b/Capy64/Assets/Lua/boot/99_shell.lua index fd89fd7..3c5ef7c 100644 --- a/Capy64/Assets/Lua/boot/99_shell.lua +++ b/Capy64/Assets/Lua/boot/99_shell.lua @@ -1,5 +1,6 @@ local term = require("term") local colors = require("colors") +local machine = require("machine") term.setForeground(0x59c9ff) term.setBackground(colors.black) @@ -11,4 +12,4 @@ term.setPos(1, 2) dofile("/bin/shell.lua") -os.shutdown(false) +machine.shutdown() diff --git a/Capy64/Assets/bios.lua b/Capy64/Assets/bios.lua index 78fe9ac..30f097d 100644 --- a/Capy64/Assets/bios.lua +++ b/Capy64/Assets/bios.lua @@ -2,6 +2,7 @@ local timer = require("timer") local gpu = require("gpu") local fs = require("fs") +local machine = require("machine") local bootSleep = 2000 local bg = 0x0 @@ -72,7 +73,7 @@ local function setupScreen() }, { "Shutdown", - os.shutdown, + machine.shutdown, } }