57 lines
2.9 KiB
Lua
57 lines
2.9 KiB
Lua
---@meta EFI
|
|
|
|
---@class HyperionOS.kernel.EFI Bootloader interface
|
|
---@field yield fun() yeilds os to bootloader to prevent watchdog
|
|
---@field getEpochMs fun(): number gets current epoch ms
|
|
---@field getUptime fun(): number gets current uptime in ms
|
|
---@field date fun(): string "!%Y-%m-%dT%H:%M:%SZ" of current ms utc
|
|
---@field getMachineEvent fun(): ... returns queued machine events
|
|
---@field getEEPROM fun(): string returns current EEPROM program
|
|
---@field setEEPROM fun(self, code:string) sets the EEPROM code to code
|
|
---@field initfs table initfs api
|
|
---@field disks table disks api
|
|
---@field screenctl HyperionOS.kernel.EFI.screen screen control handle
|
|
---@field architecture string architecture signature
|
|
---@field getNvram fun(): string reads non-volitile ram
|
|
---@field setNvram fun(self, data:string) sets non-volitile ram
|
|
---@field firmware table extra apis for drivers to use
|
|
---@field status string run status
|
|
---@field beep fun(self, freq:number, ms:number) beep tone
|
|
|
|
---@class HyperionOS.kernel.EFI.screen
|
|
---@field print fun(self, text:string) prints with following \n
|
|
---@field printInline fun(self, text:string) prints to screen
|
|
---@field clear fun(self) clears screen
|
|
---@field resetCursor fun(self) moves cursor to 1,1
|
|
---@field setBackgroundColor fun(self, color24:number) sets background color
|
|
---@field setTextColor fun(self, color24:number) sets text color
|
|
---@field getBackgroundColor fun(self): number returns background color24
|
|
---@field getTextColor fun(self): number returns text color24
|
|
---@field enable fun(self) enables the screens
|
|
---@field disable fun(self) disables the screen
|
|
|
|
---@class file
|
|
---@field read fun(amount:number) reads x bytes from file (r)
|
|
---@field write fun(data:string) writes data to a file (w, a)
|
|
---@field flush fun() flushes appending writes (w, a)
|
|
---@field seek fun(whence:"set"|"cur"|"end", offset:number): number moves the file pointer and returns the new position
|
|
---@field close fun() closes the open file
|
|
|
|
---@class disk
|
|
---@field address string ID of disk
|
|
---@field isReadOnly fun(self): boolean Is disk read only?
|
|
---@field spaceUsed fun(self): number Returns bytes used
|
|
---@field spaceTotal fun(self): number Returns disk size in bytes
|
|
---@field list fun(self, path:string) get contents of a directory
|
|
---@field fileExists fun(self, path:string) does a file exist?
|
|
---@field directoryExists fun(self, path:string) does a directory exist?
|
|
---@field type fun(self, path:string): string returns type of a path
|
|
---@field makeDirectory fun(self, path:string) makes a directory
|
|
---@field remove fun(self, path:string) delete a file or directory
|
|
---@field setLabel fun(self, label:string) sets disk label
|
|
---@field getLabel fun(self): string returns disk label
|
|
---@field attributes fun(self, path:string) returns path attributes (ex: size and date modified)
|
|
---@field open fun(self, path:string, mode:string): file opens a file returns handle
|
|
|
|
---@class HyperionOS.kernel
|
|
---@field EFI HyperionOS.kernel.EFI |