Changeset 6a44ee4 in mainline for uspace/srv/hid/input/ctl/apple.c


Ignore:
Timestamp:
2011-07-20T15:26:21Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
efcebe1
Parents:
25bef0ff (diff), a701812 (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/apple.c

    r25bef0ff r6a44ee4  
    11/*
    2  * Copyright (c) 2010 Jiri Svoboda
     2 * Copyright (c) 2011 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2828
    2929/** @addtogroup kbd_ctl
    30  * @ingroup kbd
     30 * @ingroup input
    3131 * @{
    3232 */
    3333/**
    3434 * @file
    35  * @brief       Apple ADB keyboard controller driver.
     35 * @brief Apple ADB keyboard controller driver.
    3636 */
    3737
     
    4040#include <io/keycode.h>
    4141#include <kbd_ctl.h>
     42#include <kbd_port.h>
     43
     44static void apple_ctl_parse(sysarg_t);
     45static int apple_ctl_init(kbd_dev_t *);
     46static void apple_ctl_set_ind(kbd_dev_t *, unsigned int);
     47
     48kbd_ctl_ops_t apple_ctl = {
     49        .parse = apple_ctl_parse,
     50        .init = apple_ctl_init,
     51        .set_ind = apple_ctl_set_ind
     52};
    4253
    4354#define KBD_KEY_RELEASE         0x80
    4455
     56static kbd_dev_t *kbd_dev;
     57
    4558static int scanmap[];
    4659
    47 int kbd_ctl_init(void)
     60static int apple_ctl_init(kbd_dev_t *kdev)
    4861{
     62        kbd_dev = kdev;
    4963        return 0;
    5064}
    5165
    52 void kbd_ctl_parse_scancode(int scancode)
     66static void apple_ctl_parse(sysarg_t scancode)
    5367{
    54         console_ev_type_t type;
     68        kbd_event_type_t type;
    5569        unsigned int key;
    5670
    57         if (scancode < 0 || scancode >= 0x100)
     71        if (scancode >= 0x100)
    5872                return;
    5973
     
    6781        key = scanmap[scancode];
    6882        if (key != 0)
    69                 kbd_push_ev(type, key);
     83                kbd_push_event(kbd_dev, type, key);
    7084}
    7185
    72 void kbd_ctl_set_ind(unsigned mods)
     86static void apple_ctl_set_ind(kbd_dev_t *kdev, unsigned mods)
    7387{
    7488        (void) mods;
Note: See TracChangeset for help on using the changeset viewer.