Changeset d900699 in mainline for uspace/srv/hid/input/ctl/stty.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/stty.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 */ … … 39 39 #include <io/keycode.h> 40 40 #include <kbd_ctl.h> 41 #include <kbd_port.h> 41 42 #include <gsp.h> 42 43 #include <stroke.h> 43 44 45 static void stty_ctl_parse_scancode(int); 46 static int stty_ctl_init(kbd_dev_t *); 47 static void stty_ctl_set_ind(kbd_dev_t *, unsigned); 48 49 kbd_ctl_ops_t stty_ctl = { 50 .parse_scancode = stty_ctl_parse_scancode, 51 .init = stty_ctl_init, 52 .set_ind = stty_ctl_set_ind 53 }; 54 55 static kbd_dev_t *kbd_dev; 56 44 57 /** Scancode parser */ 45 58 static gsp_t sp; … … 50 63 #include <stdio.h> 51 64 52 int seq_defs[] = {65 static int seq_defs[] = { 53 66 /* Not shifted */ 54 67 … … 206 219 }; 207 220 208 int kbd_ctl_init(void)221 static int stty_ctl_init(kbd_dev_t *kdev) 209 222 { 223 kbd_dev = kdev; 210 224 ds = 0; 211 225 … … 214 228 } 215 229 216 void kbd_ctl_parse_scancode(int scancode)230 static void stty_ctl_parse_scancode(int scancode) 217 231 { 218 232 unsigned mods, key; … … 220 234 ds = gsp_step(&sp, ds, scancode, &mods, &key); 221 235 if (key != 0) { 222 stroke_sim( mods, key);236 stroke_sim(kbd_dev, mods, key); 223 237 } 224 238 } 225 239 226 void kbd_ctl_set_ind(unsigned mods)240 static void stty_ctl_set_ind(kbd_dev_t *kdev, unsigned mods) 227 241 { 228 242 (void) mods;
Note:
See TracChangeset
for help on using the changeset viewer.