Changes in uspace/drv/usbkbd/main.c [966acede:252e30c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbkbd/main.c
r966acede r252e30c 33 33 /** 34 34 * @file 35 * Main routines of USB KBD driver.35 * Main routines of USB HID driver. 36 36 */ 37 37 … … 75 75 * @sa usb_kbd_fibril(), usb_kbd_repeat_fibril() 76 76 */ 77 static int usb _kbd_try_add_device(usb_device_t *dev)77 static int usbhid_try_add_device(usb_device_t *dev) 78 78 { 79 79 /* Create the function exposed under /dev/devices. */ … … 195 195 * @retval EREFUSED if the device is not supported. 196 196 */ 197 static int usb _kbd_add_device(usb_device_t *dev)197 static int usbhid_add_device(usb_device_t *dev) 198 198 { 199 usb_log_debug("usb _kbd_add_device()\n");199 usb_log_debug("usbhid_add_device()\n"); 200 200 201 201 if (dev->interface_no < 0) { 202 202 usb_log_warning("Device is not a supported keyboard.\n"); 203 usb_log_error("Failed to add USB KBD device: endpoint not found."203 usb_log_error("Failed to add HID device: endpoint not found." 204 204 "\n"); 205 205 return ENOTSUP; 206 206 } 207 207 208 int rc = usb _kbd_try_add_device(dev);208 int rc = usbhid_try_add_device(dev); 209 209 210 210 if (rc != EOK) { 211 211 usb_log_warning("Device is not a supported keyboard.\n"); 212 usb_log_error("Failed to add KBD device: %s.\n",212 usb_log_error("Failed to add HID device: %s.\n", 213 213 str_error(rc)); 214 214 return rc; … … 224 224 /* Currently, the framework supports only device adding. Once the framework 225 225 * supports unplug, more callbacks will be added. */ 226 static usb_driver_ops_t usb _kbd_driver_ops = {227 .add_device = usb _kbd_add_device,226 static usb_driver_ops_t usbhid_driver_ops = { 227 .add_device = usbhid_add_device, 228 228 }; 229 229 230 230 231 231 /* The driver itself. */ 232 static usb_driver_t usb _kbd_driver = {232 static usb_driver_t usbhid_driver = { 233 233 .name = NAME, 234 .ops = &usb _kbd_driver_ops,234 .ops = &usbhid_driver_ops, 235 235 .endpoints = usb_kbd_endpoints 236 236 }; … … 238 238 /*----------------------------------------------------------------------------*/ 239 239 240 //static driver_ops_t kbd_driver_ops = { 241 // .add_device = usbhid_add_device, 242 //}; 243 244 ///*----------------------------------------------------------------------------*/ 245 246 //static driver_t kbd_driver = { 247 // .name = NAME, 248 // .driver_ops = &kbd_driver_ops 249 //}; 250 251 /*----------------------------------------------------------------------------*/ 252 240 253 int main(int argc, char *argv[]) 241 254 { 242 printf(NAME ": HelenOS USB KBD driver.\n");255 printf(NAME ": HelenOS USB HID driver.\n"); 243 256 244 257 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 245 258 246 return usb_driver_main(&usb _kbd_driver);259 return usb_driver_main(&usbhid_driver); 247 260 } 248 261
Note:
See TracChangeset
for help on using the changeset viewer.