#include "dpi.h"
#include "profile.h"
#include "usb.h"
#include "led.h"
Go to the source code of this file.
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.
15 { 0x0e, 0x15, 0x01, 0 },
16 { 0x0e, 0x16, 0x01, 0 }
19 for(
int i = 0; i <= 1; i++){
21 if(!
usbrecv(kb, data_pkt[0], in_pkt)){
25 memcpy(hw->
id + i, in_pkt + 4,
sizeof(
usbid));
28 for(
int i = 0; i <= 1; i++){
30 if(!
usbrecv(kb, data_pkt[1],in_pkt)){
int loadrgb_mouse(usbdevice *kb, lighting *light, int mode)
#define DELAY_LONG(kb)
The longest delay takes place where something went wrong (eg when resetting the device) ...
void hwtonative(usbprofile *profile, hwprofile *hw, int modecount)
#define usbrecv(kb, out_msg, in_msg)
usbrecv macro is used to wrap _usbrecv() with debugging information (file and lineno) ...
int loaddpi(usbdevice *kb, dpiset *dpi, lighting *light)
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.
67 { 0x07, 0x16, 0x01, 0 },
68 { 0x07, 0x15, 0x01, 0 },
70 for(
int i = 0; i <= 1; i++){
73 if(!
usbsend(kb, data_pkt[0], 1))
77 for(
int i = 0; i <= 1; i++){
79 memcpy(data_pkt[1] + 4, hw->
id + i,
sizeof(
usbid));
80 if(!
usbsend(kb, data_pkt[1], 1))
int savergb_mouse(usbdevice *kb, lighting *light, int mode)
#define DELAY_LONG(kb)
The longest delay takes place where something went wrong (eg when resetting the device) ...
int savedpi(usbdevice *kb, dpiset *dpi, lighting *light)
void nativetohw(usbprofile *profile, hwprofile *hw, int modecount)
#define usbsend(kb, messages, count)
usbsend macro is used to wrap _usbsend() with debugging information (file and lineno) ...