9 if(!
usbrecv(kb, data_pkt, in_pkt))
25 { 0x0e, 0x15, 0x01, 0 },
26 { 0x0e, 0x16, 0x01, 0 }
30 for(
int i = 0; i <= modes; i++){
32 if(!
usbrecv(kb, data_pkt[0], in_pkt)){
36 memcpy(hw->
id + i, in_pkt + 4,
sizeof(
usbid));
39 if(!
usbrecv(kb, data_pkt[1], in_pkt)){
45 for(
int i = 0; i < modes; i++){
75 { 0x07, 0x16, 0x01, 0 },
76 { 0x07, 0x15, 0x01, 0 },
79 for(
int i = 0; i <= modes; i++){
82 if(!
usbsend(kb, data_pkt[0], 1))
86 for(
int i = 0; i <= modes; i++){
88 memcpy(data_pkt[1] + 4, hw->
id + i,
sizeof(
usbid));
89 if(!
usbsend(kb, data_pkt[1], 1))
93 for(
int i = 0; i < modes; i++){
#define DELAY_LONG(kb)
The longest delay takes place where something went wrong (eg when resetting the device) ...
int cmd_hwsave_kb(usbdevice *kb, usbmode *dummy1, int dummy2, int dummy3, const char *dummy4)
int loadrgb_kb(usbdevice *kb, lighting *light, int mode)
void hwtonative(usbprofile *profile, hwprofile *hw, int modecount)
static int hwloadmode(usbdevice *kb, hwprofile *hw, int mode)
void nativetohw(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) ...
Definitions for using USB interface.
int cmd_hwload_kb(usbdevice *kb, usbmode *dummy1, int dummy2, int apply, const char *dummy3)
int savergb_kb(usbdevice *kb, lighting *light, int mode)
#define usbsend(kb, messages, count)
usbsend macro is used to wrap _usbsend() with debugging information (file and lineno) ...