forked from Hyperion/HyperionOS
rewrite
This commit is contained in:
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