Changeset 9be360ee in mainline for uspace/srv/hid/kbd/ctl
- Timestamp:
- 2011-06-11T22:06:47Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4f3f9659
- Parents:
- 56ad818
- Location:
- uspace/srv/hid/kbd/ctl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/kbd/ctl/apple.c
r56ad818 r9be360ee 1 1 /* 2 * Copyright (c) 201 0Jiri Svoboda2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 42 42 #include <kbd_port.h> 43 43 44 static void apple_ctl_parse_scancode(int scancode);45 static int apple_ctl_init(kbd_ port_ops_t *kbd_port);46 static void apple_ctl_set_ind(unsigned mods);44 static void apple_ctl_parse_scancode(int); 45 static int apple_ctl_init(kbd_dev_t *); 46 static void apple_ctl_set_ind(unsigned); 47 47 48 48 kbd_ctl_ops_t apple_ctl = { … … 54 54 #define KBD_KEY_RELEASE 0x80 55 55 56 static kbd_dev_t *kbd_dev; 57 56 58 static int scanmap[]; 57 59 58 static int apple_ctl_init(kbd_ port_ops_t *kbd_port)60 static int apple_ctl_init(kbd_dev_t *kdev) 59 61 { 60 (void) kbd_port;62 kbd_dev = kdev; 61 63 return 0; 62 64 } … … 79 81 key = scanmap[scancode]; 80 82 if (key != 0) 81 kbd_push_ev( type, key);83 kbd_push_ev(kbd_dev, type, key); 82 84 } 83 85 -
uspace/srv/hid/kbd/ctl/gxe_fb.c
r56ad818 r9be360ee 1 1 /* 2 * Copyright (c) 20 09Jiri Svoboda2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 44 44 #include <stroke.h> 45 45 46 static void gxe_fb_ctl_parse_scancode(int scancode);47 static int gxe_fb_ctl_init(kbd_ port_ops_t *kbd_port);48 static void gxe_fb_ctl_set_ind(unsigned mods);46 static void gxe_fb_ctl_parse_scancode(int); 47 static int gxe_fb_ctl_init(kbd_dev_t *); 48 static void gxe_fb_ctl_set_ind(unsigned); 49 49 50 50 kbd_ctl_ops_t gxe_fb_ctl = { … … 53 53 .set_ind = gxe_fb_ctl_set_ind 54 54 }; 55 56 static kbd_dev_t *kbd_dev; 55 57 56 58 /** Scancode parser */ … … 218 220 }; 219 221 220 static int gxe_fb_ctl_init(kbd_ port_ops_t *kbd_port)222 static int gxe_fb_ctl_init(kbd_dev_t *kdev) 221 223 { 222 (void) kbd_port;224 kbd_dev = kdev; 223 225 ds = 0; 224 226 … … 233 235 ds = gsp_step(&sp, ds, scancode, &mods, &key); 234 236 if (key != 0) { 235 stroke_sim( mods, key);237 stroke_sim(kbd_dev, mods, key); 236 238 } 237 239 } -
uspace/srv/hid/kbd/ctl/pc.c
r56ad818 r9be360ee 1 1 /* 2 * Copyright (c) 20 09Jiri Svoboda2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 43 43 #include <gsp.h> 44 44 45 static void pc_ctl_parse_scancode(int scancode);46 static int pc_ctl_init(kbd_ port_ops_t *kbd_port);47 static void pc_ctl_set_ind(unsigned mods);45 static void pc_ctl_parse_scancode(int); 46 static int pc_ctl_init(kbd_dev_t *); 47 static void pc_ctl_set_ind(unsigned); 48 48 49 49 kbd_ctl_ops_t pc_ctl = { … … 74 74 75 75 static enum dec_state ds; 76 static kbd_ port_ops_t *kbd_port;76 static kbd_dev_t *kbd_dev; 77 77 78 78 static int scanmap_simple[] = { … … 208 208 }; 209 209 210 static int pc_ctl_init(kbd_ port_ops_t *kbd_p)210 static int pc_ctl_init(kbd_dev_t *kdev) 211 211 { 212 kbd_ port = kbd_p;212 kbd_dev = kdev; 213 213 ds = ds_s; 214 214 return 0; … … 262 262 key = map[scancode]; 263 263 if (key != 0) 264 kbd_push_ev( type, key);264 kbd_push_ev(kbd_dev, type, key); 265 265 } 266 266 … … 277 277 b = b | LI_SCROLL; 278 278 279 (*kbd_ port->write)(KBD_CMD_SET_LEDS);280 (*kbd_ port->write)(b);279 (*kbd_dev->port_ops->write)(KBD_CMD_SET_LEDS); 280 (*kbd_dev->port_ops->write)(b); 281 281 } 282 282 -
uspace/srv/hid/kbd/ctl/stty.c
r56ad818 r9be360ee 1 1 /* 2 * Copyright (c) 20 09Jiri Svoboda2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 43 43 #include <stroke.h> 44 44 45 static void stty_ctl_parse_scancode(int scancode);46 static int stty_ctl_init(kbd_ port_ops_t *kbd_port);47 static void stty_ctl_set_ind(unsigned mods);45 static void stty_ctl_parse_scancode(int); 46 static int stty_ctl_init(kbd_dev_t *); 47 static void stty_ctl_set_ind(unsigned); 48 48 49 49 kbd_ctl_ops_t stty_ctl = { … … 52 52 .set_ind = stty_ctl_set_ind 53 53 }; 54 55 static kbd_dev_t *kbd_dev; 54 56 55 57 /** Scancode parser */ … … 217 219 }; 218 220 219 static int stty_ctl_init(kbd_ port_ops_t *kbd_port)221 static int stty_ctl_init(kbd_dev_t *kdev) 220 222 { 221 (void) kbd_port;223 kbd_dev = kdev; 222 224 ds = 0; 223 225 … … 232 234 ds = gsp_step(&sp, ds, scancode, &mods, &key); 233 235 if (key != 0) { 234 stroke_sim( mods, key);236 stroke_sim(kbd_dev, mods, key); 235 237 } 236 238 } -
uspace/srv/hid/kbd/ctl/sun.c
r56ad818 r9be360ee 1 1 /* 2 2 * Copyright (c) 2006 Jakub Jermar 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 42 43 #include <kbd_port.h> 43 44 44 static void sun_ctl_parse_scancode(int scancode);45 static int sun_ctl_init(kbd_ port_ops_t *kbd_port);46 static void sun_ctl_set_ind(unsigned mods);45 static void sun_ctl_parse_scancode(int); 46 static int sun_ctl_init(kbd_dev_t *); 47 static void sun_ctl_set_ind(unsigned); 47 48 48 49 kbd_ctl_ops_t sun_ctl = { … … 52 53 }; 53 54 55 static kbd_dev_t *kbd_dev; 56 54 57 #define KBD_KEY_RELEASE 0x80 55 58 #define KBD_ALL_KEYS_UP 0x7f … … 57 60 static int scanmap_simple[]; 58 61 59 static int sun_ctl_init(kbd_ port_ops_t *kbd_port)62 static int sun_ctl_init(kbd_dev_t *kdev) 60 63 { 64 kbd_dev = kdev; 61 65 return 0; 62 66 } … … 82 86 key = scanmap_simple[scancode]; 83 87 if (key != 0) 84 kbd_push_ev( type, key);88 kbd_push_ev(kbd_dev, type, key); 85 89 } 86 90
Note:
See TracChangeset
for help on using the changeset viewer.
