Changeset 9be360ee in mainline for uspace/srv/hid/kbd/ctl/sun.c


Ignore:
Timestamp:
2011-06-11T22:06:47Z (14 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/ctl/sun.c

    r56ad818 r9be360ee  
    11/*
    22 * Copyright (c) 2006 Jakub Jermar
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    4243#include <kbd_port.h>
    4344
    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);
     45static void sun_ctl_parse_scancode(int);
     46static int sun_ctl_init(kbd_dev_t *);
     47static void sun_ctl_set_ind(unsigned);
    4748
    4849kbd_ctl_ops_t sun_ctl = {
     
    5253};
    5354
     55static kbd_dev_t *kbd_dev;
     56
    5457#define KBD_KEY_RELEASE         0x80
    5558#define KBD_ALL_KEYS_UP         0x7f
     
    5760static int scanmap_simple[];
    5861
    59 static int sun_ctl_init(kbd_port_ops_t *kbd_port)
     62static int sun_ctl_init(kbd_dev_t *kdev)
    6063{
     64        kbd_dev = kdev;
    6165        return 0;
    6266}
     
    8286        key = scanmap_simple[scancode];
    8387        if (key != 0)
    84                 kbd_push_ev(type, key);
     88                kbd_push_ev(kbd_dev, type, key);
    8589}
    8690
Note: See TracChangeset for help on using the changeset viewer.