1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-08 06:18:05 +11:00
collapseos/doc/protocol.txt
Virgil Dupras 124da6adec Move SD Card subsystem outside of RC2014 recipe and add protocols
Although the SPI Relay driver is RC2014-specific, the SD Card driver
is generic enough to be a subsystem. That's the second subsystem we
add and this warrants, I think, the formalization of a new concept:
protocols.
2020-08-16 14:30:33 -04:00

28 lines
806 B
Plaintext

# Protocols
Some subsystems (and in the case of KEY and EMIT, the core) re-
quire drivers to implement certain words in a certain way. For
example, the core requires drivers to implement (key) and (emit)
or else it won't know how to provide a console.
These protocols are described here.
# TTY protocol
(key) -- c Returns the next typed key on the console.
If none, block until there is one.
(emit) c -- Spit a character on the console.
# PS/2 protocol
(ps2kc) -- kc Returns the next typed PS/2 keycode from the
console. Blocking.
# SPI Relay protocol
(spie) -- Enable SPI device
(spid) -- Disable SPI device
(spix) n -- n Perform SPI exchange (push a number, get a
number back)