c++ - What value should i insert there? -


i'm trying set driver or alike keyboard. i'm editing elses code according instructions 1 thing bothering me.

here's code

/* add new device, create new device() in list */ /* fields are: "name",vendorid,productid,capabilities */ const libg15_devices_t g15_devices[] = {     device("logitech g510",0x46d,0xc22d, g15_lcd|g15_keys|g15_device_5byte_return|g15_device_is_shared),     device("logitech g15",0x46d,0xc222,g15_lcd|g15_keys),     device("logitech g11",0x46d,0xc225,g15_keys),     device("logitech z-10",0x46d,0x0a07,g15_lcd|g15_keys|g15_device_is_shared),     device("logitech g15 v2",0x46d,0xc227,g15_lcd|g15_keys|g15_device_5byte_return),     device("logitech gamepanel",0x46d,0xc251,g15_lcd|g15_keys|g15_device_is_shared),     device(null,0,0,0) };   /* return device capabilities */ int g15devicecapabilities() {     if(found_devicetype>-1)         return g15_devices[found_devicetype].caps;     else         return -1; } 

the first device entry i'm aiming , part of code added. here stop.

int setleds(unsigned int leds) {     int retval = 0;     unsigned char m_led_buf[4] = { 2, 4, 0, 0 };     unsigned char g510_led_buf[2] = {4, 0};     m_led_buf[2] = ~(unsigned char)leds;      if(g15devicecapabilities() & g15_device_g510) { 

on g15_device_g510 stops. not know value should replacing with.

here's pastebin of entire code if info insufficient.

pastebin link

thanks. :)

edit: found out functions defined in file. here are.

pastebin link

so need define g15_device_g510 somehow in file.

this how supposed done.

#define g15_device_g510 32 #define g510_standard_keyboard_interface    0x0 

then @ later point in code

  int setg510ledcolor(unsigned char r, unsigned char g, unsigned char b); 

i managed find file here

then i'd need edit line had this. device("logitech g510",0x46d,0xc22d, g15_lcd|g15_keys|g15_device_5byte_return|g15_device_is_shared|g15_device_g510), code written guy calls himself "multitude"

so multitude :)


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -