| ||||||
Files | |
| file | mindsensors-hid.h |
Mindsensors HID Sensor driver. | |
Defines | |
| #define | MSHID_I2C_ADDR 0x04 |
| #define | MSHID_CMD 0x41 |
| #define | MSHID_KEYBMOD 0x42 |
| #define | MSHID_KEYBDATA 0x43 |
| #define | MSHID_XMIT 0x54 |
| #define | MSHID_ASCII 0x41 |
| #define | MSHID_DDATA 0x44 |
| #define | MSHID_MOD_NONE 0x00 |
| #define | MSHID_MOD_LCTRL 0x01 |
| #define | MSHID_MOD_LSHIFT 0x02 |
| #define | MSHID_MOD_LALT 0x04 |
| #define | MSHID_MOD_LGUI 0x08 |
| #define | MSHID_MOD_RCTRL 0x10 |
| #define | MSHID_MOD_RSHIFT 0x20 |
| #define | MSHID_MOD_RALT 0x40 |
| #define | MSHID_MOD_RGUI 0x80 |
Functions | |
| bool | MSHIDsendCommand (tSensors link, byte command, ubyte address=MSHID_I2C_ADDR) |
| bool | MSHIDsendKeyboardData (tSensors link, byte modifier, byte keybdata, ubyte address=MSHID_I2C_ADDR) |
| bool | MSHIDsendString (tSensors link, string data, ubyte address=MSHID_I2C_ADDR) |
Variables | |
| tByteArray | MSHID_I2CRequest |
HID Sensor
| #define MSHID_ASCII 0x41 |
Definition at line 50 of file mindsensors-hid.h.
| #define MSHID_CMD 0x41 |
Definition at line 45 of file mindsensors-hid.h.
| #define MSHID_DDATA 0x44 |
Definition at line 51 of file mindsensors-hid.h.
| #define MSHID_I2C_ADDR 0x04 |
Definition at line 44 of file mindsensors-hid.h.
| #define MSHID_KEYBDATA 0x43 |
Definition at line 47 of file mindsensors-hid.h.
| #define MSHID_KEYBMOD 0x42 |
Definition at line 46 of file mindsensors-hid.h.
| #define MSHID_MOD_LALT 0x04 |
Definition at line 57 of file mindsensors-hid.h.
| #define MSHID_MOD_LCTRL 0x01 |
Definition at line 55 of file mindsensors-hid.h.
| #define MSHID_MOD_LGUI 0x08 |
Definition at line 58 of file mindsensors-hid.h.
| #define MSHID_MOD_LSHIFT 0x02 |
Definition at line 56 of file mindsensors-hid.h.
| #define MSHID_MOD_NONE 0x00 |
Definition at line 54 of file mindsensors-hid.h.
| #define MSHID_MOD_RALT 0x40 |
Definition at line 61 of file mindsensors-hid.h.
| #define MSHID_MOD_RCTRL 0x10 |
Definition at line 59 of file mindsensors-hid.h.
| #define MSHID_MOD_RGUI 0x80 |
Definition at line 62 of file mindsensors-hid.h.
| #define MSHID_MOD_RSHIFT 0x20 |
Definition at line 60 of file mindsensors-hid.h.
| #define MSHID_XMIT 0x54 |
Definition at line 49 of file mindsensors-hid.h.
| bool MSHIDsendCommand | ( | tSensors | link, |
| byte | command, | ||
| ubyte | address | ||
| ) |
Send a direct command to the HID sensor
| link | the HID port number |
| command | the command to be sent |
| address | the I2C address to use, optional, defaults to 0x04 |
Definition at line 78 of file mindsensors-hid.h.
| bool MSHIDsendKeyboardData | ( | tSensors | link, |
| byte | modifier, | ||
| byte | keybdata, | ||
| ubyte | address | ||
| ) |
Send keyboard data to the HID sensor. Must be followed by a MSHID_XMIT command using MSHIDsendCommand()
| link | the HID port number |
| modifier | the keyboard modifier, like shift, control. Can be OR'd together. |
| keybdata | the keystroke to be sent to the computer |
| address | the I2C address to use, optional, defaults to 0x04 |
Definition at line 98 of file mindsensors-hid.h.
| bool MSHIDsendString | ( | tSensors | link, |
| string | data, | ||
| ubyte | address | ||
| ) |
Send a string to the computer. Can be up to 19 characters long.
It recognises the following escaped keys:
| link | the HID port number |
| data | the string to be transmitted |
| address | the I2C address to use, optional, defaults to 0x04 |
Definition at line 123 of file mindsensors-hid.h.
Array to hold I2C command data
Definition at line 68 of file mindsensors-hid.h.
1.7.2