![]() |
ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
Include dependency graph for structures.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | usbid |
| struct | macroaction |
| struct | keymacro |
| struct | binding |
| struct | dpiset |
| struct | lighting |
| struct | usbmode |
| struct | usbprofile |
| struct | hwprofile |
| struct | usbinput |
| struct | usbdevice |
Macros | |
| #define | SET_KEYBIT(array, index) do { (array)[(index) / 8] |= 1 << ((index) % 8); } while(0) |
| #define | CLEAR_KEYBIT(array, index) do { (array)[(index) / 8] &= ~(1 << ((index) % 8)); } while(0) |
| #define | I_NUM 1 |
| #define | I_CAPS 2 |
| #define | I_SCROLL 4 |
| #define | OUTFIFO_MAX 10 |
| #define | MACRO_MAX 1024 |
| #define | DPI_COUNT 6 |
| #define | LIFT_MIN 1 |
| #define | LIFT_MAX 5 |
| #define | MD_NAME_LEN 16 |
| #define | PR_NAME_LEN 16 |
| #define | MODE_COUNT 6 |
| #define | HWMODE_K70 1 |
| #define | HWMODE_K95 3 |
| #define | HWMODE_MAX 3 |
| #define | FEAT_RGB 0x001 |
| #define | FEAT_MONOCHROME 0x002 |
| #define | FEAT_POLLRATE 0x004 |
| #define | FEAT_ADJRATE 0x008 |
| #define | FEAT_BIND 0x010 |
| #define | FEAT_NOTIFY 0x020 |
| #define | FEAT_FWVERSION 0x040 |
| #define | FEAT_FWUPDATE 0x080 |
| #define | FEAT_HWLOAD 0x100 |
| #define | FEAT_ANSI 0x200 |
| #define | FEAT_ISO 0x400 |
| #define | FEAT_MOUSEACCEL 0x800 |
| #define | FEAT_COMMON (FEAT_BIND | FEAT_NOTIFY | FEAT_FWVERSION | FEAT_MOUSEACCEL | FEAT_HWLOAD) |
| #define | FEAT_STD_RGB (FEAT_COMMON | FEAT_RGB | FEAT_POLLRATE | FEAT_FWUPDATE) |
| #define | FEAT_STD_NRGB (FEAT_COMMON) |
| #define | FEAT_LMASK (FEAT_ANSI | FEAT_ISO) |
| #define | HAS_FEATURES(kb, feat) (((kb)->features & (feat)) == (feat)) |
| #define | HAS_ANY_FEATURE(kb, feat) (!!((kb)->features & (feat))) |
| #define | NEEDS_FW_UPDATE(kb) ((kb)->fwversion == 0 && HAS_FEATURES((kb), FEAT_FWUPDATE | FEAT_FWVERSION)) |
| #define | SCROLL_ACCELERATED 0 |
| #define | SCROLL_MIN 1 |
| #define | SCROLL_MAX 10 |
| #define | KB_NAME_LEN 40 |
| #define | SERIAL_LEN 34 |
| #define | MSG_SIZE 64 |
| #define | IFACE_MAX 4 |
Variables | |
| const union devcmd | vtable_keyboard |
| RGB keyboard vtable holds functions for each device type. More... | |
| const union devcmd | vtable_keyboard_nonrgb |
| const union devcmd | vtable_mouse |
| struct usbid |
Definition at line 8 of file structures.h.
Collaboration diagram for usbid:| Data Fields | ||
|---|---|---|
| char | guid[16] | |
| char | modified[4] | |
| struct macroaction |
Definition at line 27 of file structures.h.
Collaboration diagram for macroaction:| Data Fields | ||
|---|---|---|
| uint | delay | |
| char | down | |
| short | rel_x | |
| short | rel_y | |
| short | scan | |
| struct keymacro |
Definition at line 35 of file structures.h.
Collaboration diagram for keymacro:| Data Fields | ||
|---|---|---|
| int | actioncount | |
| macroaction * | actions | |
| uchar | combo[((((152+22+12)+25)+7)/8)] | |
| char | triggered | |
| struct binding |
Definition at line 43 of file structures.h.
Collaboration diagram for binding:| Data Fields | ||
|---|---|---|
| int | base[((152+22+12)+25)] | |
| int | macrocap | |
| int | macrocount | |
| keymacro * | macros | |
| struct dpiset |
| struct lighting |
| struct usbmode |
| struct usbprofile |
| struct hwprofile |
| struct usbinput |
Definition at line 129 of file structures.h.
Collaboration diagram for usbinput:| Data Fields | ||
|---|---|---|
| uchar | keys[((((152+22+12)+25)+7)/8)] | |
| uchar | prevkeys[((((152+22+12)+25)+7)/8)] | |
| short | rel_x | |
| short | rel_y | |
| struct usbdevice |
Definition at line 178 of file structures.h.
Collaboration diagram for usbdevice:| Data Fields | ||
|---|---|---|
| char | active | |
| uint | delay | |
| char | dither | |
| int | epcount | |
| ushort | features | |
| ushort | fwversion | |
| int | handle | |
| hwprofile * | hw | |
| uchar | hw_ileds | |
| uchar | hw_ileds_old | |
| uchar | ileds | |
| int | infifo | |
| usbinput | input | |
| pthread_t | inputthread | |
| char | name[40+1] | |
| int | outfifo[10] | |
| char | pollrate | |
| short | product | |
| usbprofile * | profile | |
| char | serial[34] | |
| pthread_t | thread | |
| struct udev_device * | udev | |
| int | uinput_kb | |
| int | uinput_mouse | |
| char | usbdelay | |
| short | vendor | |
| const union devcmd * | vtable | |
| #define CLEAR_KEYBIT | ( | array, | |
| index | |||
| ) | do { (array)[(index) / 8] &= ~(1 << ((index) % 8)); } while(0) |
Definition at line 16 of file structures.h.
Referenced by cmd_notify(), corsair_mousecopy(), hid_kb_translate(), and hid_mouse_translate().
| #define DPI_COUNT 6 |
Definition at line 54 of file structures.h.
Referenced by cmd_dpi(), cmd_dpisel(), loaddpi(), printdpi(), savedpi(), and updatedpi().
| #define FEAT_ADJRATE 0x008 |
Definition at line 139 of file structures.h.
Referenced by _mkdevpath(), _setupusb(), and _start_dev().
| #define FEAT_ANSI 0x200 |
Definition at line 146 of file structures.h.
Referenced by readcmd().
| #define FEAT_BIND 0x010 |
Definition at line 140 of file structures.h.
Referenced by _mkdevpath(), main(), and readcmd().
| #define FEAT_COMMON (FEAT_BIND | FEAT_NOTIFY | FEAT_FWVERSION | FEAT_MOUSEACCEL | FEAT_HWLOAD) |
Definition at line 151 of file structures.h.
| #define FEAT_FWUPDATE 0x080 |
Definition at line 143 of file structures.h.
Referenced by _mkdevpath(), _start_dev(), and cmd_fwupdate().
| #define FEAT_FWVERSION 0x040 |
Definition at line 142 of file structures.h.
Referenced by _mkdevpath(), and _start_dev().
| #define FEAT_HWLOAD 0x100 |
Definition at line 144 of file structures.h.
Referenced by _start_dev().
| #define FEAT_ISO 0x400 |
Definition at line 147 of file structures.h.
Referenced by readcmd().
Definition at line 154 of file structures.h.
Referenced by readcmd().
| #define FEAT_MONOCHROME 0x002 |
Definition at line 137 of file structures.h.
Referenced by _mkdevpath(), and _setupusb().
| #define FEAT_MOUSEACCEL 0x800 |
Definition at line 148 of file structures.h.
| #define FEAT_NOTIFY 0x020 |
Definition at line 141 of file structures.h.
Referenced by _mkdevpath(), main(), and readcmd().
| #define FEAT_POLLRATE 0x004 |
Definition at line 138 of file structures.h.
Referenced by _mkdevpath(), _start_dev(), and getfwversion().
| #define FEAT_RGB 0x001 |
Definition at line 136 of file structures.h.
Referenced by _mkdevpath(), _start_dev(), revertusb(), and usbunclaim().
| #define FEAT_STD_NRGB (FEAT_COMMON) |
Definition at line 153 of file structures.h.
Referenced by _setupusb().
| #define FEAT_STD_RGB (FEAT_COMMON | FEAT_RGB | FEAT_POLLRATE | FEAT_FWUPDATE) |
Definition at line 152 of file structures.h.
Referenced by _setupusb().
| #define HAS_ANY_FEATURE | ( | kb, | |
| feat | |||
| ) | (!!((kb)->features & (feat))) |
Definition at line 158 of file structures.h.
| #define HAS_FEATURES | ( | kb, | |
| feat | |||
| ) | (((kb)->features & (feat)) == (feat)) |
Definition at line 157 of file structures.h.
Referenced by _mkdevpath(), _start_dev(), cmd_fwupdate(), readcmd(), revertusb(), and usbunclaim().
| #define HWMODE_K70 1 |
Definition at line 115 of file structures.h.
Referenced by cmd_hwload_kb(), and cmd_hwsave_kb().
| #define HWMODE_K95 3 |
Definition at line 116 of file structures.h.
Referenced by cmd_hwload_kb(), and cmd_hwsave_kb().
| #define HWMODE_MAX 3 |
Definition at line 117 of file structures.h.
| #define I_CAPS 2 |
Definition at line 20 of file structures.h.
Referenced by _cmd_get(), iselect(), nprintind(), and updateindicators_kb().
| #define I_NUM 1 |
Definition at line 19 of file structures.h.
Referenced by _cmd_get(), iselect(), nprintind(), and updateindicators_kb().
| #define I_SCROLL 4 |
Definition at line 21 of file structures.h.
Referenced by _cmd_get(), iselect(), nprintind(), and updateindicators_kb().
| #define IFACE_MAX 4 |
Definition at line 177 of file structures.h.
| #define KB_NAME_LEN 40 |
Definition at line 174 of file structures.h.
Referenced by _setupusb(), and os_setupusb().
| #define LIFT_MAX 5 |
Definition at line 56 of file structures.h.
Referenced by cmd_lift(), and loaddpi().
| #define LIFT_MIN 1 |
Definition at line 55 of file structures.h.
Referenced by cmd_lift(), and loaddpi().
| #define MACRO_MAX 1024 |
Definition at line 51 of file structures.h.
Referenced by _cmd_macro().
| #define MD_NAME_LEN 16 |
Definition at line 82 of file structures.h.
Referenced by cmd_hwsave_kb(), cmd_hwsave_mouse(), cmd_name(), gethwmodename(), gethwprofilename(), getmodename(), hwloadmode(), hwtonative(), and nativetohw().
| #define MODE_COUNT 6 |
Definition at line 100 of file structures.h.
Referenced by _freeprofile(), allocprofile(), and readcmd().
| #define MSG_SIZE 64 |
Definition at line 176 of file structures.h.
Referenced by _usbsend(), cmd_hwload_kb(), cmd_hwload_mouse(), cmd_hwsave_kb(), cmd_hwsave_mouse(), cmd_pollrate(), fwupdate(), getfwversion(), hwloadmode(), loaddpi(), loadrgb_kb(), loadrgb_mouse(), os_inputmain(), os_usbrecv(), os_usbsend(), savedpi(), savergb_kb(), savergb_mouse(), setactive_kb(), setactive_mouse(), updatedpi(), updatergb_kb(), and updatergb_mouse().
| #define NEEDS_FW_UPDATE | ( | kb | ) | ((kb)->fwversion == 0 && HAS_FEATURES((kb), FEAT_FWUPDATE | FEAT_FWVERSION)) |
Definition at line 161 of file structures.h.
Referenced by _start_dev(), readcmd(), revertusb(), setactive_kb(), and setactive_mouse().
| #define OUTFIFO_MAX 10 |
Definition at line 24 of file structures.h.
Referenced by _mknotifynode(), _rmnotifynode(), inputupdate_keys(), nprintf(), readcmd(), rmdevpath(), and updateindicators_kb().
| #define PR_NAME_LEN 16 |
Definition at line 99 of file structures.h.
Referenced by cmd_hwload_kb(), cmd_hwload_mouse(), cmd_profilename(), getprofilename(), hwtonative(), and nativetohw().
| #define SCROLL_ACCELERATED 0 |
Definition at line 164 of file structures.h.
Referenced by readcmd().
| #define SCROLL_MAX 10 |
Definition at line 166 of file structures.h.
Referenced by readcmd().
| #define SCROLL_MIN 1 |
Definition at line 165 of file structures.h.
Referenced by readcmd().
| #define SERIAL_LEN 34 |
Definition at line 175 of file structures.h.
Referenced by _setupusb(), and os_setupusb().
| #define SET_KEYBIT | ( | array, | |
| index | |||
| ) | do { (array)[(index) / 8] |= 1 << ((index) % 8); } while(0) |
Definition at line 15 of file structures.h.
Referenced by _cmd_macro(), cmd_notify(), corsair_mousecopy(), hid_kb_translate(), and hid_mouse_translate().
| const union devcmd vtable_keyboard |
Definition at line 52 of file device_vtable.c.
Referenced by get_vtable().
| const union devcmd vtable_keyboard_nonrgb |
Definition at line 99 of file device_vtable.c.
Referenced by get_vtable().
| const union devcmd vtable_mouse |
Definition at line 146 of file device_vtable.c.
Referenced by get_vtable().