ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
Go to the source code of this file.
Functions | |
void | urldecode2 (char *dst, const char *src) |
void | urlencode2 (char *dst, const char *src) |
int | setid (usbid *id, const char *guid) |
char * | getid (usbid *id) |
void | u16enc (char *in, ushort *out, size_t *srclen, size_t *dstlen) |
void | u16dec (ushort *in, char *out, size_t *srclen, size_t *dstlen) |
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 * | printname (ushort *name, int length) |
char * | getmodename (usbmode *mode) |
char * | getprofilename (usbprofile *profile) |
char * | gethwmodename (hwprofile *profile, int index) |
char * | gethwprofilename (hwprofile *profile) |
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) |
static void | initmode (usbmode *mode) |
void | allocprofile (usbdevice *kb) |
int | loadprofile (usbdevice *kb) |
static void | freemode (usbmode *mode) |
void | cmd_erase (usbdevice *kb, usbmode *mode, int dummy1, int dummy2, const char *dummy3) |
static void | _freeprofile (usbdevice *kb) |
void | cmd_eraseprofile (usbdevice *kb, usbmode *dummy1, int dummy2, int dummy3, const char *dummy4) |
void | freeprofile (usbdevice *kb) |
void | hwtonative (usbprofile *profile, hwprofile *hw, int modecount) |
void | nativetohw (usbprofile *profile, hwprofile *hw, int modecount) |
Variables | |
static iconv_t | utf8to16 = 0 |
static iconv_t | utf16to8 = 0 |
|
static |
Definition at line 230 of file profile.c.
References freemode(), usbprofile::mode, MODE_COUNT, and usbdevice::profile.
Referenced by cmd_eraseprofile(), and freeprofile().
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 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().
|
static |
Definition at line 214 of file profile.c.
References usbmode::bind, and freebind().
Referenced by _freeprofile(), and cmd_erase().
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().
|
static |
Definition at line 191 of file profile.c.
References usbmode::bind, usbmode::dpi, dpiset::forceupdate, lighting::forceupdate, initbind(), and usbmode::light.
Referenced by allocprofile(), and cmd_erase().
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().
char* printname | ( | ushort * | name, |
int | length | ||
) |
Definition at line 140 of file profile.c.
References u16dec(), and urlencode2().
Referenced by gethwmodename(), gethwprofilename(), getmodename(), and getprofilename().
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().
void u16dec | ( | ushort * | in, |
char * | out, | ||
size_t * | srclen, | ||
size_t * | dstlen | ||
) |
Definition at line 105 of file profile.c.
References utf16to8.
Referenced by printname().
void u16enc | ( | char * | in, |
ushort * | out, | ||
size_t * | srclen, | ||
size_t * | dstlen | ||
) |
Definition at line 97 of file profile.c.
References utf8to16.
Referenced by cmd_name(), and cmd_profilename().
void urldecode2 | ( | char * | dst, |
const char * | src | ||
) |
Definition at line 8 of file profile.c.
Referenced by cmd_name(), and cmd_profilename().
void urlencode2 | ( | char * | dst, |
const char * | src | ||
) |
Definition at line 37 of file profile.c.
Referenced by printname().