-
Notifications
You must be signed in to change notification settings - Fork 9
at api
benjaminaigner edited this page Mar 11, 2016
·
7 revisions
The FLipmouse firmware provides 4 different USB HID device classes:
- Mouse
- Keyboard
- Joystick (currently unused)
- Serial CDC
All configuration is done via the serial interface, which provides the persistent configuration of all functionalities and in addition a live mode (e.g. write "mouse move" to the serial port and the firmware moves the mouse cursor).
The serial port configuration is 115200 8N1 (even these settings are not necessary due to the USB encapsulation).
Following commands are currently available:
| Command | Parameter | Description |
|---|---|---|
| AT | -- | returns OK |
| AT ID | -- | returns the current version string |
| AT BM | number (1-11) | set the button, which corresponds to the next command. The button assignments are described on the bottom |
| USB HID commands | ||
| AT CL | -- | Click left mouse button |
| AT CR | -- | Click right mouse button |
| AT CM | -- | Click middle mouse button |
| AT CD | -- | Doubleclick left mouse button |
| AT PL | -- | Press+hold left mouse button |
| AT PR | -- | Press+hold right mouse button |
| AT PM | -- | Press+hold middle mouse button |
| AT RL | -- | Release left mouse button |
| AT RR | -- | Release right mouse button |
| AT RM | -- | Release middle mouse button |
| AT WU | -- | Move mouse wheel up |
| AT WD | -- | Move mouse wheel down |
| AT WS | number (1-) | Set mousewheel stepsize (e.g.: "AT WS 3" sets the stepsize to 3 rows) |
| AT MX | number | Move mouse (X direction), e.g. AT MX -25 |
| AT MY | number | Move mouse (Y direction), e.g. AT MY 10 |
| AT KW | string | Keyboard write (e.g. "AT KW Hi" types "Hi" |
| AT KP | string | Key press (e.g. "AT KP KEY_UP" presses the up arrow key), a full list of supported key identifiers is provided on the bottom |
| AT KR | string | Key release (e.g. "AT KR KEY_UP" releases the up arrow key) |
| AT RA | -- | Release all keys |
| Storage commands | ||
| AT SA | string | save current configuration at the next free EEPROM slot under the give name (e.g. "AT SA mouse" stores a slot with the name "mouse" |
| AT LO | string | load a configuration from the EEPROM (e.g. "AT LO mouse") |
| AT LA | -- | load all slots and print the configuration |
| AT LI | -- | list all available slots |
| AT NE | -- | load next slot (wrap around after the last slot) |
| AT DE | -- | delete all EEPROM slots |
| AT NC | -- | do nothing |
| AT E0 | -- | disable debug output |
| AT E1 | -- | enable debug output |
| Mouthpiece settings | ||
| AT MM | number (0,1) | use the mouthpiece either as mouse cursor (AT MM 1) or as the alternative function (AT MM 0) |
| AT SW | -- | switch between cursor and alternative mode |
| AT SR | -- | start reporting out the raw sensor values |
| AT ER | -- | stop reporting the sensor values |
| AT CA | -- | trigger zeropoint calibration |
| AT AX | number (0-100) | acceleration x-axis |
| AT AY | number (0-100) | acceleration y-axis |
| AT DX | number (0-10000) | deadzone x-axis |
| AT DY | number (0-10000) | deadzone y-axis |
| AT TS | number (0-512) | sip action threshold |
| AT TP | number (512-1023) | puff action threshold |
| AT SM | number (512-1023) | special mode threshold |
| AT HM | number (0-512) | hold mode threshold |
| AT GU | number (0-100) | "up" sensor gain |
| AT GD | number (0-100) | "down sensor gain |
| AT GL | number (0-100) | "left sensor gain |
| AT GR | number (0-100) | "right" sensor gain |
| Infrared commands | ||
| AT IR | string | record a new infrared command, store it with the given name |
| AT IP | string | replay a recorded IR command, stored with the given name |
| AT IC | string | clear an IR command, defined by the name |
| AT IL | list all available stored IR commands |
1: internal button1 / Special UP 2: external button2 / Special LEFT