Changeset 9be360ee in mainline for uspace/srv/hid/kbd/include


Ignore:
Timestamp:
2011-06-11T22:06:47Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f3f9659
Parents:
56ad818
Message:

Allow keyboard server to handle more than one driver at the same time.

Location:
uspace/srv/hid/kbd/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/include/kbd.h

    r56ad818 r9be360ee  
    11/*
    22 * Copyright (c) 2006 Josef Cejka
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    3839#define KBD_KBD_H_
    3940
     41#include <adt/list.h>
    4042#include <bool.h>
     43
     44struct kbd_port_ops;
     45struct kbd_ctl_ops;
     46
     47typedef struct kbd_dev {
     48        /** Link to kbd_devs list */
     49        link_t kbd_devs;
     50
     51        /** Port ops */
     52        struct kbd_port_ops *port_ops;
     53
     54        /** Ctl ops */
     55        struct kbd_ctl_ops *ctl_ops;
     56} kbd_dev_t;
    4157
    4258extern bool irc_service;
    4359extern int irc_phone;
    4460
    45 extern void kbd_push_scancode(int);
    46 extern void kbd_push_ev(int, unsigned int);
     61extern void kbd_push_scancode(kbd_dev_t *, int);
     62extern void kbd_push_ev(kbd_dev_t *, int, unsigned int);
    4763
    4864#endif
  • uspace/srv/hid/kbd/include/kbd_ctl.h

    r56ad818 r9be360ee  
    4040#include <kbd_port.h>
    4141
    42 typedef struct {
     42struct kbd_dev;
     43
     44typedef struct kbd_ctl_ops {
    4345        void (*parse_scancode)(int);
    44         int (*init)(kbd_port_ops_t *);
     46        int (*init)(struct kbd_dev *);
    4547        void (*set_ind)(unsigned);
    4648} kbd_ctl_ops_t;
  • uspace/srv/hid/kbd/include/kbd_port.h

    r56ad818 r9be360ee  
    4040#include <sys/types.h>
    4141
    42 typedef struct {
    43         int (*init)(void);
     42struct kbd_dev;
     43
     44typedef struct kbd_port_ops {
     45        int (*init)(struct kbd_dev *);
    4446        void (*yield)(void);
    4547        void (*reclaim)(void);
  • uspace/srv/hid/kbd/include/stroke.h

    r56ad818 r9be360ee  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2011 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3838#define KBD_STROKE_H_
    3939
    40 extern void stroke_sim(unsigned, unsigned);
     40#include <kbd.h>
     41
     42extern void stroke_sim(kbd_dev_t *, unsigned, unsigned);
    4143
    4244#endif
  • uspace/srv/hid/kbd/include/sun.h

    r56ad818 r9be360ee  
    3838#define KBD_SUN_H_
    3939
    40 extern int ns16550_port_init(void);
    41 extern int z8530_port_init(void);
     40#include <kbd.h>
     41
     42extern int ns16550_port_init(kbd_dev_t *);
     43extern int z8530_port_init(kbd_dev_t *);
    4244
    4345#endif
Note: See TracChangeset for help on using the changeset viewer.