Changeset 60e5a856 in mainline
- Timestamp:
- 2011-06-12T16:22:18Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46b60e6
- Parents:
- 5f88293
- Location:
- uspace
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbd/kbddev.c
r5f88293 r60e5a856 101 101 const char *HID_KBD_FUN_NAME = "keyboard"; 102 102 const char *HID_KBD_CLASS_NAME = "keyboard"; 103 104 static void usb_kbd_set_led(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev); 103 105 104 106 /*----------------------------------------------------------------------------*/ … … 174 176 { 175 177 sysarg_t method = IPC_GET_IMETHOD(*icall); 178 int callback; 176 179 177 180 usb_kbd_t *kbd_dev = (usb_kbd_t *)fun->driver_data; … … 183 186 } 184 187 185 if (method == IPC_M_CONNECT_TO_ME) { 186 int callback = IPC_GET_ARG5(*icall); 188 switch (method) { 189 case IPC_M_CONNECT_TO_ME: 190 callback = IPC_GET_ARG5(*icall); 187 191 188 192 if (kbd_dev->console_phone != -1) { … … 197 201 usb_log_debug("default_connection_handler: OK\n"); 198 202 async_answer_0(icallid, EOK); 199 return; 200 } 201 202 usb_log_debug("default_connection_handler: Wrong function.\n"); 203 async_answer_0(icallid, EINVAL); 203 break; 204 case KBDEV_SET_IND: 205 kbd_dev->mods = IPC_GET_ARG1(*icall); 206 usb_kbd_set_led(kbd_dev->hid_dev, kbd_dev); 207 async_answer_0(icallid, EOK); 208 break; 209 default: 210 usb_log_debug("default_connection_handler: Wrong function.\n"); 211 async_answer_0(icallid, EINVAL); 212 break; 213 } 204 214 } 205 215 … … 615 625 return ENOMEM; // TODO: some other code?? 616 626 } 627 628 /* Store link to HID device */ 629 kbd_dev->hid_dev = hid_dev; 617 630 618 631 /* -
uspace/drv/usbhid/kbd/kbddev.h
r5f88293 r60e5a856 65 65 */ 66 66 typedef struct usb_kbd_t { 67 /** Link to HID device structure */ 68 struct usb_hid_dev *hid_dev; 69 67 70 /** Previously pressed keys (not translated to key codes). */ 68 71 int32_t *keys_old; -
uspace/srv/hid/input/ctl/apple.c
r5f88293 r60e5a856 44 44 static void apple_ctl_parse_scancode(int); 45 45 static int apple_ctl_init(kbd_dev_t *); 46 static void apple_ctl_set_ind( unsigned);46 static void apple_ctl_set_ind(kbd_dev_t *, unsigned); 47 47 48 48 kbd_ctl_ops_t apple_ctl = { … … 84 84 } 85 85 86 static void apple_ctl_set_ind( unsigned mods)86 static void apple_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 87 87 { 88 88 (void) mods; -
uspace/srv/hid/input/ctl/gxe_fb.c
r5f88293 r60e5a856 46 46 static void gxe_fb_ctl_parse_scancode(int); 47 47 static int gxe_fb_ctl_init(kbd_dev_t *); 48 static void gxe_fb_ctl_set_ind( unsigned);48 static void gxe_fb_ctl_set_ind(kbd_dev_t *, unsigned); 49 49 50 50 kbd_ctl_ops_t gxe_fb_ctl = { … … 239 239 } 240 240 241 static void gxe_fb_ctl_set_ind( unsigned mods)241 static void gxe_fb_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 242 242 { 243 243 (void) mods; -
uspace/srv/hid/input/ctl/pc.c
r5f88293 r60e5a856 45 45 static void pc_ctl_parse_scancode(int); 46 46 static int pc_ctl_init(kbd_dev_t *); 47 static void pc_ctl_set_ind( unsigned);47 static void pc_ctl_set_ind(kbd_dev_t *, unsigned); 48 48 49 49 kbd_ctl_ops_t pc_ctl = { … … 265 265 } 266 266 267 static void pc_ctl_set_ind( unsigned mods)267 static void pc_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 268 268 { 269 269 uint8_t b; -
uspace/srv/hid/input/ctl/stty.c
r5f88293 r60e5a856 45 45 static void stty_ctl_parse_scancode(int); 46 46 static int stty_ctl_init(kbd_dev_t *); 47 static void stty_ctl_set_ind( unsigned);47 static void stty_ctl_set_ind(kbd_dev_t *, unsigned); 48 48 49 49 kbd_ctl_ops_t stty_ctl = { … … 238 238 } 239 239 240 static void stty_ctl_set_ind( unsigned mods)240 static void stty_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 241 241 { 242 242 (void) mods; -
uspace/srv/hid/input/ctl/sun.c
r5f88293 r60e5a856 45 45 static void sun_ctl_parse_scancode(int); 46 46 static int sun_ctl_init(kbd_dev_t *); 47 static void sun_ctl_set_ind( unsigned);47 static void sun_ctl_set_ind(kbd_dev_t *, unsigned); 48 48 49 49 kbd_ctl_ops_t sun_ctl = { … … 89 89 } 90 90 91 static void sun_ctl_set_ind( unsigned mods)91 static void sun_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 92 92 { 93 93 (void) mods; -
uspace/srv/hid/input/generic/input.c
r5f88293 r60e5a856 138 138 139 139 /* Update keyboard lock indicator lights. */ 140 (*kdev->ctl_ops->set_ind)( mods);140 (*kdev->ctl_ops->set_ind)(kdev, mods); 141 141 } else { 142 142 lock_keys = lock_keys & ~mod_mask; -
uspace/srv/hid/input/include/kbd.h
r5f88293 r60e5a856 60 60 /** Ctl ops */ 61 61 struct kbd_ctl_ops *ctl_ops; 62 63 /** Controller-private data */ 64 void *ctl_private; 62 65 } kbd_dev_t; 63 66 -
uspace/srv/hid/input/include/kbd_ctl.h
r5f88293 r60e5a856 45 45 void (*parse_scancode)(int); 46 46 int (*init)(struct kbd_dev *); 47 void (*set_ind)( unsigned);47 void (*set_ind)(struct kbd_dev *, unsigned); 48 48 } kbd_ctl_ops_t; 49 49
Note:
See TracChangeset
for help on using the changeset viewer.