ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
Go to the source code of this file.
Macros | |
#define | hwloadprofile(kb, apply) (kb)->vtable->hwload(kb, 0, 0, apply, 0) |
Functions | |
void | allocprofile (usbdevice *kb) |
int | loadprofile (usbdevice *kb) |
void | freeprofile (usbdevice *kb) |
void | cmd_erase (usbdevice *kb, usbmode *mode, int dummy1, int dummy2, const char *dummy3) |
void | cmd_eraseprofile (usbdevice *kb, usbmode *dummy1, int dummy2, int dummy3, const char *dummy4) |
void | cmd_name (usbdevice *kb, usbmode *mode, int dummy1, int dummy2, const char *name) |
void | cmd_profilename (usbdevice *kb, usbmode *dummy1, int dummy2, int dummy3, const char *name) |
char * | getmodename (usbmode *mode) |
char * | getprofilename (usbprofile *profile) |
char * | gethwmodename (hwprofile *profile, int index) |
char * | gethwprofilename (hwprofile *profile) |
int | setid (usbid *id, const char *guid) |
char * | getid (usbid *id) |
void | hwtonative (usbprofile *profile, hwprofile *hw, int modecount) |
void | nativetohw (usbprofile *profile, hwprofile *hw, int modecount) |
void | cmd_id (usbdevice *kb, usbmode *mode, int dummy1, int dummy2, const char *id) |
void | cmd_profileid (usbdevice *kb, usbmode *mode, int dummy1, int dummy2, const char *id) |
int | cmd_hwload_kb (usbdevice *kb, usbmode *dummy1, int dummy2, int apply, const char *dummy3) |
int | cmd_hwload_mouse (usbdevice *kb, usbmode *dummy1, int dummy2, int apply, const char *dummy3) |
int | cmd_hwsave_kb (usbdevice *kb, usbmode *dummy1, int dummy2, int dummy3, const char *dummy4) |
int | cmd_hwsave_mouse (usbdevice *kb, usbmode *dummy1, int dummy2, int dummy3, const char *dummy4) |
#define hwloadprofile | ( | kb, | |
apply | |||
) | (kb)->vtable->hwload(kb, 0, 0, apply, 0) |
Definition at line 52 of file profile.h.
Referenced by _start_dev(), and loadprofile().
void allocprofile | ( | usbdevice * | kb | ) |
Definition at line 198 of file profile.c.
References usbprofile::currentmode, dpiset::forceupdate, lighting::forceupdate, initmode(), usbprofile::lastdpi, usbprofile::lastlight, usbprofile::mode, MODE_COUNT, and usbdevice::profile.
Referenced by cmd_eraseprofile().
Definition at line 219 of file profile.c.
References freemode(), imutex, and initmode().
void cmd_eraseprofile | ( | usbdevice * | kb, |
usbmode * | dummy1, | ||
int | dummy2, | ||
int | dummy3, | ||
const char * | dummy4 | ||
) |
Definition at line 241 of file profile.c.
References _freeprofile(), allocprofile(), and imutex.
Definition at line 16 of file profile_keyboard.c.
References DELAY_LONG, usbdevice::hw, hwloadmode(), HWMODE_K70, HWMODE_K95, hwtonative(), hwprofile::id, IS_K95, MSG_SIZE, hwprofile::name, PR_NAME_LEN, usbdevice::profile, and usbrecv.
int cmd_hwload_mouse | ( | usbdevice * | kb, |
usbmode * | dummy1, | ||
int | dummy2, | ||
int | apply, | ||
const char * | dummy3 | ||
) |
Definition at line 6 of file profile_mouse.c.
References DELAY_LONG, hwprofile::dpi, usbdevice::hw, hwtonative(), hwprofile::id, hwprofile::light, loaddpi(), loadrgb_mouse(), MSG_SIZE, hwprofile::name, PR_NAME_LEN, usbdevice::profile, and usbrecv.
Definition at line 61 of file profile_keyboard.c.
References DELAY_LONG, usbdevice::hw, HWMODE_K70, HWMODE_K95, hwprofile::id, IS_K95, hwprofile::light, MD_NAME_LEN, MSG_SIZE, hwprofile::name, nativetohw(), usbdevice::profile, savergb_kb(), and usbsend.
int cmd_hwsave_mouse | ( | usbdevice * | kb, |
usbmode * | dummy1, | ||
int | dummy2, | ||
int | dummy3, | ||
const char * | dummy4 | ||
) |
Definition at line 54 of file profile_mouse.c.
References DELAY_LONG, hwprofile::dpi, usbdevice::hw, hwprofile::id, hwprofile::light, MD_NAME_LEN, MSG_SIZE, hwprofile::name, nativetohw(), usbdevice::profile, savedpi(), savergb_mouse(), and usbsend.
Definition at line 168 of file profile.c.
References usbmode::id, usbid::modified, and setid().
Definition at line 117 of file profile.c.
References MD_NAME_LEN, usbmode::name, u16enc(), and urldecode2().
Definition at line 179 of file profile.c.
References usbprofile::id, usbid::modified, usbdevice::profile, and setid().
void cmd_profilename | ( | usbdevice * | kb, |
usbmode * | dummy1, | ||
int | dummy2, | ||
int | dummy3, | ||
const char * | name | ||
) |
Definition at line 128 of file profile.c.
References usbprofile::name, PR_NAME_LEN, usbdevice::profile, u16enc(), and urldecode2().
void freeprofile | ( | usbdevice * | kb | ) |
Definition at line 253 of file profile.c.
References _freeprofile(), and usbdevice::hw.
char* gethwmodename | ( | hwprofile * | profile, |
int | index | ||
) |
Definition at line 160 of file profile.c.
References MD_NAME_LEN, hwprofile::name, and printname().
Referenced by _cmd_get().
char* gethwprofilename | ( | hwprofile * | profile | ) |
Definition at line 164 of file profile.c.
References MD_NAME_LEN, hwprofile::name, and printname().
Referenced by _cmd_get().
char* getid | ( | usbid * | id | ) |
Definition at line 79 of file profile.c.
References usbid::guid.
Referenced by _cmd_get().
char* getmodename | ( | usbmode * | mode | ) |
Definition at line 152 of file profile.c.
References MD_NAME_LEN, usbmode::name, and printname().
Referenced by _cmd_get().
char* getprofilename | ( | usbprofile * | profile | ) |
Definition at line 156 of file profile.c.
References usbprofile::name, PR_NAME_LEN, and printname().
Referenced by _cmd_get().
void hwtonative | ( | usbprofile * | profile, |
hwprofile * | hw, | ||
int | modecount | ||
) |
Definition at line 260 of file profile.c.
References usbmode::dpi, hwprofile::dpi, dpiset::forceupdate, lighting::forceupdate, usbmode::id, usbprofile::id, hwprofile::id, usbprofile::lastdpi, usbprofile::lastlight, usbmode::light, hwprofile::light, MD_NAME_LEN, usbprofile::mode, usbmode::name, usbprofile::name, hwprofile::name, and PR_NAME_LEN.
Referenced by cmd_hwload_kb(), and cmd_hwload_mouse().
int loadprofile | ( | usbdevice * | kb | ) |
void nativetohw | ( | usbprofile * | profile, |
hwprofile * | hw, | ||
int | modecount | ||
) |
Definition at line 277 of file profile.c.
References usbmode::dpi, hwprofile::dpi, usbmode::id, usbprofile::id, hwprofile::id, usbmode::light, hwprofile::light, MD_NAME_LEN, usbprofile::mode, usbmode::name, usbprofile::name, hwprofile::name, and PR_NAME_LEN.
Referenced by cmd_hwsave_kb(), and cmd_hwsave_mouse().
int setid | ( | usbid * | id, |
const char * | guid | ||
) |
Definition at line 64 of file profile.c.
References usbid::guid.
Referenced by cmd_id(), and cmd_profileid().