hid-lg4ff.c (961af46f8e2c7bf793352c11262fb37e87706921) | hid-lg4ff.c (c832f86effbcf8833fc2c842aa501ce1eb4d0478) |
---|---|
1/* 2 * Force feedback support for Logitech Gaming Wheels 3 * 4 * Including G27, G25, DFP, DFGT, FFEX, Momo, Momo2 & 5 * Speed Force Wireless (WiiWheel) 6 * 7 * Copyright (c) 2010 Simon Wood <simon@mungewell.org> 8 */ --- 315 unchanged lines hidden (view full) --- 324 default: 325 return 0; 326 } 327 default: 328 return 0; 329 } 330} 331 | 1/* 2 * Force feedback support for Logitech Gaming Wheels 3 * 4 * Including G27, G25, DFP, DFGT, FFEX, Momo, Momo2 & 5 * Speed Force Wireless (WiiWheel) 6 * 7 * Copyright (c) 2010 Simon Wood <simon@mungewell.org> 8 */ --- 315 unchanged lines hidden (view full) --- 324 default: 325 return 0; 326 } 327 default: 328 return 0; 329 } 330} 331 |
332int lg4ff_raw_event(struct hid_device *hdev, struct hid_report *report, 333 u8 *rd, int size, struct lg_drv_data *drv_data) 334{ 335 struct lg4ff_device_entry *entry = drv_data->device_props; 336 337 if (!entry) 338 return 0; 339 340 /* adjust HID report present combined pedals data */ 341 if (entry->wdata.combine) { 342 switch (entry->wdata.product_id) { 343 case USB_DEVICE_ID_LOGITECH_WHEEL: 344 rd[5] = rd[3]; 345 rd[6] = 0x7F; 346 return 1; 347 case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL: 348 case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2: 349 rd[4] = rd[3]; 350 rd[5] = 0x7F; 351 return 1; 352 case USB_DEVICE_ID_LOGITECH_DFP_WHEEL: 353 rd[5] = rd[4]; 354 rd[6] = 0x7F; 355 return 1; 356 default: 357 return 0; 358 } 359 } 360 361 return 0; 362} 363 |
|
332static void lg4ff_init_wheel_data(struct lg4ff_wheel_data * const wdata, const struct lg4ff_wheel *wheel, 333 const struct lg4ff_multimode_wheel *mmode_wheel, 334 const u16 real_product_id) 335{ 336 u32 alternate_modes = 0; 337 const char *real_tag = NULL; 338 const char *real_name = NULL; 339 --- 1105 unchanged lines hidden --- | 364static void lg4ff_init_wheel_data(struct lg4ff_wheel_data * const wdata, const struct lg4ff_wheel *wheel, 365 const struct lg4ff_multimode_wheel *mmode_wheel, 366 const u16 real_product_id) 367{ 368 u32 alternate_modes = 0; 369 const char *real_tag = NULL; 370 const char *real_name = NULL; 371 --- 1105 unchanged lines hidden --- |