Changeset f1fae414 in mainline for uspace/srv/hid/input/ctl/stty.c


Ignore:
Timestamp:
2011-06-22T01:34:53Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d7e82c1, cac458f
Parents:
72ec8cc (diff), bf172825 (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/stty.c

    r72ec8cc rf1fae414  
    11/*
    2  * Copyright (c) 2009 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       Serial TTY-like keyboard controller driver.
     35 * @brief Serial TTY-like keyboard controller driver.
    3636 */
    3737
     
    3939#include <io/keycode.h>
    4040#include <kbd_ctl.h>
     41#include <kbd_port.h>
    4142#include <gsp.h>
    4243#include <stroke.h>
    4344
     45static void stty_ctl_parse(sysarg_t);
     46static int stty_ctl_init(kbd_dev_t *);
     47static void stty_ctl_set_ind(kbd_dev_t *, unsigned int);
     48
     49kbd_ctl_ops_t stty_ctl = {
     50        .parse = stty_ctl_parse,
     51        .init = stty_ctl_init,
     52        .set_ind = stty_ctl_set_ind
     53};
     54
     55static kbd_dev_t *kbd_dev;
     56
    4457/** Scancode parser */
    4558static gsp_t sp;
     
    5063#include <stdio.h>
    5164
    52 int seq_defs[] = {
     65static int seq_defs[] = {
    5366        /* Not shifted */
    5467
     
    206219};
    207220
    208 int kbd_ctl_init(void)
     221static int stty_ctl_init(kbd_dev_t *kdev)
    209222{
     223        kbd_dev = kdev;
    210224        ds = 0;
    211225
     
    214228}
    215229
    216 void kbd_ctl_parse_scancode(int scancode)
     230static void stty_ctl_parse(sysarg_t scancode)
    217231{
    218232        unsigned mods, key;
     
    220234        ds = gsp_step(&sp, ds, scancode, &mods, &key);
    221235        if (key != 0) {
    222                 stroke_sim(mods, key);
     236                stroke_sim(kbd_dev, mods, key);
    223237        }
    224238}
    225239
    226 void kbd_ctl_set_ind(unsigned mods)
     240static void stty_ctl_set_ind(kbd_dev_t *kdev, unsigned mods)
    227241{
    228242        (void) mods;
Note: See TracChangeset for help on using the changeset viewer.