name | source | action | data |
---|---|---|---|
ss0 | sender | send | 0 |
sc0 | sender | confirm | 0 |
ss1 | sender | send | 1 |
sc1 | sender | confirm | 1 |
rs0 | reciever | send | 0 |
rc0 | reciever | confirm | 0 |
rs1 | reciever | send | 1 |
rc1 | reciever | confirm | 1 |
/-----------\
|ss0|sc0|ss1|
|---|---|---|
|rc1|gnd|sc1|
|---|---|---|
|rs1|rc0|rs0|
\-----------/
USC has 2 independent channels in opposite directions.
sending 0:
sender: pulse ss0
reciever: pulse sc0 (rc0)
sender: wait for rc0 to be pulsed
sending 1:
sender: pulse ss1
reciever: pulse sc1 (rc1)
sender: wait for rc1 to be pulsed
This allows detecting what type of data is being sent.
send 0x1D (GS)
send "USC-mime:"
send mime
send '\r' if request else '\n'
send "Content-Length:"
send the length of the content as an infinity int
if the length is 0, the content ends at 0x04 (EOT)
send content
See Infinity Ints
Example mimes:
dev/mouse
dev/kbd
video/ram;color-space=rgb
This allows more than 1 bit to be sent before confirming.
send 0x05 ENQ
switch recieve:
case NAK (0x15):
done (Multi Bit Extension is not avaliable)
case ACK (0x06):
recieve avaliable packet size count as infinity_int<1>
recieve avaliable packet sizes as infinity_int<1>[]
send selected size as mask (0 exits)
communicate over USC
send 0x04 EOT to exit 1 layer of the multi-bit extention
default:
done (Multi Bit Extension is not avaliable)
use +5V
for 1
pulses and -5V
for 0
pulses to communicate.
Sending NAK
is reccomended if the multi-bit extension is not avaliable.
This allows the wires to carry any signal.
Entered when packet size count is 0x0324. Exit with 4s of silence.
infinity_int<1>:
0??????? => value
1???????... => size, infinity_int<size>