forked from Hyperion/HyperionOS
rewrite
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
readAllText(dir) Returns string:contents
|
||||
reads all text from directory on disk
|
||||
|
||||
writeAllText(dir, content) Returns nil
|
||||
writes all content to file
|
||||
|
||||
appendAllText(dir, content) Returns nil
|
||||
appends all content to file
|
||||
|
||||
getAtributes(dir) Returns table:atributes
|
||||
returns atributes of a file or directory
|
||||
|
||||
list(dir) Returns table:files
|
||||
returns contents of directory
|
||||
|
||||
mkdir(dir) Returns nil
|
||||
makes specified directory
|
||||
|
||||
mkfile(dir) Returns nil
|
||||
makes specified file
|
||||
|
||||
-------------------------------------------------------
|
||||
Atributes table
|
||||
number:size
|
||||
size of file in bytes
|
||||
|
||||
number:owner
|
||||
owner UUID
|
||||
|
||||
number:group
|
||||
group UUID
|
||||
|
||||
number:perms
|
||||
file perms 0-21
|
||||
@@ -1,16 +0,0 @@
|
||||
# drivers
|
||||
---
|
||||
|
||||
## driver types
|
||||
---
|
||||
|
||||
```
|
||||
http - internet
|
||||
lan - local networks
|
||||
fs - filesystems
|
||||
disk - normal disks
|
||||
udisk - byte array disks
|
||||
terminal - screens that only support text
|
||||
```
|
||||
|
||||
### Driver APIS
|
||||
@@ -1,8 +0,0 @@
|
||||
print(text) Returns nil
|
||||
Prints text to the terminal with a trailing \n
|
||||
|
||||
printInline(text) Returns nil
|
||||
Same as print without the trailing \n
|
||||
|
||||
clear() Returns nil
|
||||
Clears screen
|
||||
26
docs/kernel/drivers/api/README.md
Executable file
26
docs/kernel/drivers/api/README.md
Executable file
@@ -0,0 +1,26 @@
|
||||
# Drivers
|
||||
---
|
||||
|
||||
Hyperion OS supports many driver types to allow it to run on any hardware
|
||||
```
|
||||
Driver types
|
||||
tto - Supports basic text terminal output
|
||||
gpio - Supports things like redstone
|
||||
runner - Kernel level programs (no api)
|
||||
timer - Timers and time related
|
||||
periph - Basic peripheral info
|
||||
gfx - PixelScreens
|
||||
```
|
||||
Hyperion also has a base driver api
|
||||
```
|
||||
Driver API
|
||||
name - Name of driver+
|
||||
type - Type of driver
|
||||
init - Ran before init
|
||||
main - Ran as a process and has normal behavior (used for checking network like things)
|
||||
api - api difined by type
|
||||
arch - architecture difined in bootloader (EX: cct, oc, ac, cc, ccpc)
|
||||
description - discription
|
||||
author - author of driver
|
||||
prior - priority (low first)
|
||||
```
|
||||
35
docs/kernel/drivers/api/tto.md
Executable file
35
docs/kernel/drivers/api/tto.md
Executable file
@@ -0,0 +1,35 @@
|
||||
# tty driver
|
||||
---
|
||||
|
||||
tty (Teletypewriter) is a driver class made for basic text output (ASCII only) used for primitive ui.
|
||||
|
||||
```
|
||||
API Signature
|
||||
|
||||
print(String: text):Nil
|
||||
Prints text to the screen with a following \n
|
||||
|
||||
printInline(String: text):Nil
|
||||
Prints text to the screen without following \n
|
||||
|
||||
clear():Nil
|
||||
Clears screen sets x,y of cursor to 0,0
|
||||
|
||||
setBackgroundColor(Number: index):Nil
|
||||
Sets background color to index of pallete
|
||||
|
||||
getBackgroundColor():Number
|
||||
Returns current background index of screen
|
||||
|
||||
setForegroundColor(Number: index):Nil
|
||||
Sets foreground color to index of pallete
|
||||
|
||||
getForegroundColor():Number
|
||||
Returns current foreground index of screen
|
||||
|
||||
setCursorPos(Number: x, Number: y):Nil
|
||||
Sets x,y position of cursor
|
||||
|
||||
getCursorPos():Number, Number
|
||||
Gets x,y position of cursor
|
||||
```
|
||||
Reference in New Issue
Block a user