Changeset c028b22 in mainline for uspace/srv/hid/input/ctl/sun.c


Ignore:
Timestamp:
2011-07-08T17:01:01Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc1a727
Parents:
4e36219 (diff), 026793d (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.
Message:

Merge mainline changes

File:
1 moved

Legend:

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

    r4e36219 rc028b22  
    11/*
    22 * Copyright (c) 2006 Jakub Jermar
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    2829
    2930/** @addtogroup kbd_ctl
    30  * @ingroup kbd
     31 * @ingroup input
    3132 * @{
    3233 */
    3334/**
    3435 * @file
    35  * @brief       Sun keyboard controller driver.
     36 * @brief Sun keyboard controller driver.
    3637 */
    3738
     
    4041#include <io/keycode.h>
    4142#include <kbd_ctl.h>
     43#include <kbd_port.h>
     44
     45static void sun_ctl_parse(sysarg_t);
     46static int sun_ctl_init(kbd_dev_t *);
     47static void sun_ctl_set_ind(kbd_dev_t *, unsigned int);
     48
     49kbd_ctl_ops_t sun_ctl = {
     50        .parse = sun_ctl_parse,
     51        .init = sun_ctl_init,
     52        .set_ind = sun_ctl_set_ind
     53};
     54
     55static kbd_dev_t *kbd_dev;
    4256
    4357#define KBD_KEY_RELEASE         0x80
     
    4660static int scanmap_simple[];
    4761
    48 int kbd_ctl_init(void)
     62static int sun_ctl_init(kbd_dev_t *kdev)
    4963{
     64        kbd_dev = kdev;
    5065        return 0;
    5166}
    5267
    53 void kbd_ctl_parse_scancode(int scancode)
     68static void sun_ctl_parse(sysarg_t scancode)
    5469{
    55         console_ev_type_t type;
     70        kbd_event_type_t type;
    5671        unsigned int key;
    5772
    58         if (scancode < 0 || scancode >= 0x100)
     73        if (scancode >= 0x100)
    5974                return;
    6075
     
    7186        key = scanmap_simple[scancode];
    7287        if (key != 0)
    73                 kbd_push_ev(type, key);
     88                kbd_push_event(kbd_dev, type, key);
    7489}
    7590
    76 void kbd_ctl_set_ind(unsigned mods)
     91static void sun_ctl_set_ind(kbd_dev_t *kdev, unsigned mods)
    7792{
    7893        (void) mods;
Note: See TracChangeset for help on using the changeset viewer.