Changeset a33f0a6 in mainline for uspace/srv/hid/input/ctl/sun.c
- Timestamp:
- 2011-08-03T17:34:57Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1940326
- Parents:
- 52a79081 (diff), 3fab770 (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/sun.c
r52a79081 ra33f0a6 1 1 /* 2 2 * Copyright (c) 2006 Jakub Jermar 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 28 29 29 30 /** @addtogroup kbd_ctl 30 * @ingroup kbd31 * @ingroup input 31 32 * @{ 32 33 */ 33 34 /** 34 35 * @file 35 * @brief 36 * @brief Sun keyboard controller driver. 36 37 */ 37 38 … … 40 41 #include <io/keycode.h> 41 42 #include <kbd_ctl.h> 43 #include <kbd_port.h> 44 45 static void sun_ctl_parse(sysarg_t); 46 static int sun_ctl_init(kbd_dev_t *); 47 static void sun_ctl_set_ind(kbd_dev_t *, unsigned int); 48 49 kbd_ctl_ops_t sun_ctl = { 50 .parse = sun_ctl_parse, 51 .init = sun_ctl_init, 52 .set_ind = sun_ctl_set_ind 53 }; 54 55 static kbd_dev_t *kbd_dev; 42 56 43 57 #define KBD_KEY_RELEASE 0x80 … … 46 60 static int scanmap_simple[]; 47 61 48 int kbd_ctl_init(void)62 static int sun_ctl_init(kbd_dev_t *kdev) 49 63 { 64 kbd_dev = kdev; 50 65 return 0; 51 66 } 52 67 53 void kbd_ctl_parse_scancode(int scancode)68 static void sun_ctl_parse(sysarg_t scancode) 54 69 { 55 console_ev_type_t type;70 kbd_event_type_t type; 56 71 unsigned int key; 57 72 58 if (scancode < 0 || scancode>= 0x100)73 if (scancode >= 0x100) 59 74 return; 60 75 … … 71 86 key = scanmap_simple[scancode]; 72 87 if (key != 0) 73 kbd_push_ev (type, key);88 kbd_push_event(kbd_dev, type, key); 74 89 } 75 90 76 void kbd_ctl_set_ind(unsigned mods)91 static void sun_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 77 92 { 78 93 (void) mods;
Note:
See TracChangeset
for help on using the changeset viewer.