Close

Planning the Tokens

A project log for Ugly USB

After the Good and the Bad here you are the Ugly USB!

danjovicdanjovic 04/07/2017 at 19:140 Comments

Started to plan the tokens for the translated duckscript file.

The end of line is 0x00, just like the strings.

The end of contents is 0xFF, which will tell the player to stop sending commands.

the commands

DEFAULT_DELAY

DELAY

REPLAY

SHIFT

ALT

CONTROL

GUI

STRING

are allocated on the unused hid codes 0xA5 to 0xAC ( 0xAD to 0xAF and 0xDE 0xDF)

The remaining keys use their own hid code.

The STRING command parse the following characters up to the next 0x00 (or 0xFF) to differentiate between shifted and unshifted characters.

The REPLAY command uses the saved EEPROM address from the previous command to point to the next instruction to be performed. There is one boolean variable, though, to know when to stop replaying the commands.

Discussions