Changeset d900699 in mainline for uspace/srv/hid/input/ctl/apple.c
- Timestamp:
- 2011-06-17T16:48:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3a605be
- Parents:
- df8110d3 (diff), 98caf49 (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
rdf8110d3 rd900699 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 */ … … 40 40 #include <io/keycode.h> 41 41 #include <kbd_ctl.h> 42 #include <kbd_port.h> 43 44 static void apple_ctl_parse_scancode(int); 45 static int apple_ctl_init(kbd_dev_t *); 46 static void apple_ctl_set_ind(kbd_dev_t *, unsigned); 47 48 kbd_ctl_ops_t apple_ctl = { 49 .parse_scancode = apple_ctl_parse_scancode, 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_scancode(int scancode) 53 67 { 54 68 kbd_event_type_t type; … … 67 81 key = scanmap[scancode]; 68 82 if (key != 0) 69 kbd_push_ev( type, key);83 kbd_push_ev(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.