Changeset d900699 in mainline for uspace/srv/hid/input/ctl/pc.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/pc.c
rdf8110d3 rd900699 1 1 /* 2 * Copyright (c) 20 09Jiri 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 */ … … 43 43 #include <gsp.h> 44 44 45 static void pc_ctl_parse_scancode(int); 46 static int pc_ctl_init(kbd_dev_t *); 47 static void pc_ctl_set_ind(kbd_dev_t *, unsigned); 48 49 kbd_ctl_ops_t pc_ctl = { 50 .parse_scancode = pc_ctl_parse_scancode, 51 .init = pc_ctl_init, 52 .set_ind = pc_ctl_set_ind 53 }; 54 45 55 enum dec_state { 46 56 ds_s, … … 64 74 65 75 static enum dec_state ds; 76 static kbd_dev_t *kbd_dev; 66 77 67 78 static int scanmap_simple[] = { … … 197 208 }; 198 209 199 int kbd_ctl_init(void)210 static int pc_ctl_init(kbd_dev_t *kdev) 200 211 { 212 kbd_dev = kdev; 201 213 ds = ds_s; 202 214 return 0; 203 215 } 204 216 205 void kbd_ctl_parse_scancode(int scancode)217 static void pc_ctl_parse_scancode(int scancode) 206 218 { 207 219 kbd_event_type_t type; … … 250 262 key = map[scancode]; 251 263 if (key != 0) 252 kbd_push_ev( type, key);264 kbd_push_ev(kbd_dev, type, key); 253 265 } 254 266 255 void kbd_ctl_set_ind(unsigned mods)267 static void pc_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 256 268 { 257 269 uint8_t b; … … 265 277 b = b | LI_SCROLL; 266 278 267 kbd_port_write(KBD_CMD_SET_LEDS);268 kbd_port_write(b);279 (*kbd_dev->port_ops->write)(KBD_CMD_SET_LEDS); 280 (*kbd_dev->port_ops->write)(b); 269 281 } 270 282
Note:
See TracChangeset
for help on using the changeset viewer.