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


Ignore:
Timestamp:
2011-06-17T16:48:53Z (14 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3a605be
Parents:
df8110d3 (diff), 98caf49 (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

    rdf8110d3 rd900699  
    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 */
     
    4040#include <io/keycode.h>
    4141#include <kbd_ctl.h>
     42#include <kbd_port.h>
     43
     44static void apple_ctl_parse_scancode(int);
     45static int apple_ctl_init(kbd_dev_t *);
     46static void apple_ctl_set_ind(kbd_dev_t *, unsigned);
     47
     48kbd_ctl_ops_t apple_ctl = {
     49        .parse_scancode = apple_ctl_parse_scancode,
     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_scancode(int scancode)
    5367{
    5468        kbd_event_type_t type;
     
    6781        key = scanmap[scancode];
    6882        if (key != 0)
    69                 kbd_push_ev(type, key);
     83                kbd_push_ev(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.