Changeset 8ff0bd2 in mainline for uspace/srv/hid/input/ctl/apple.c
- Timestamp:
- 2011-09-04T11:30:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03bc76a
- Parents:
- d2c67e7 (diff), deac215e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/ctl/apple.c
rd2c67e7 r8ff0bd2 1 1 /* 2 * Copyright (c) 201 0Jiri Svoboda2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 28 28 29 29 /** @addtogroup kbd_ctl 30 * @ingroup kbd30 * @ingroup input 31 31 * @{ 32 32 */ 33 33 /** 34 34 * @file 35 * @brief 35 * @brief Apple ADB keyboard controller driver. 36 36 */ 37 37 … … 40 40 #include <io/keycode.h> 41 41 #include <kbd_ctl.h> 42 #include <kbd_port.h> 43 44 static void apple_ctl_parse(sysarg_t); 45 static int apple_ctl_init(kbd_dev_t *); 46 static void apple_ctl_set_ind(kbd_dev_t *, unsigned int); 47 48 kbd_ctl_ops_t apple_ctl = { 49 .parse = apple_ctl_parse, 50 .init = apple_ctl_init, 51 .set_ind = apple_ctl_set_ind 52 }; 42 53 43 54 #define KBD_KEY_RELEASE 0x80 44 55 56 static kbd_dev_t *kbd_dev; 57 45 58 static int scanmap[]; 46 59 47 int kbd_ctl_init(void)60 static int apple_ctl_init(kbd_dev_t *kdev) 48 61 { 62 kbd_dev = kdev; 49 63 return 0; 50 64 } 51 65 52 void kbd_ctl_parse_scancode(int scancode)66 static void apple_ctl_parse(sysarg_t scancode) 53 67 { 54 68 kbd_event_type_t type; 55 69 unsigned int key; 56 70 57 if (scancode < 0 || scancode>= 0x100)71 if (scancode >= 0x100) 58 72 return; 59 73 … … 67 81 key = scanmap[scancode]; 68 82 if (key != 0) 69 kbd_push_ev (type, key);83 kbd_push_event(kbd_dev, type, key); 70 84 } 71 85 72 void kbd_ctl_set_ind(unsigned mods)86 static void apple_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 73 87 { 74 88 (void) mods;
Note:
See TracChangeset
for help on using the changeset viewer.