Changeset 9be360ee in mainline for uspace/srv/hid/kbd/port/ski.c


Ignore:
Timestamp:
2011-06-11T22:06:47Z (13 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/port/ski.c

    r56ad818 r9be360ee  
    11/*
    22 * Copyright (c) 2005 Jakub Jermar
    3  * Copyright (c) 2009 Jiri Svoboda
     3 * Copyright (c) 2011 Jiri Svoboda
    44 * All rights reserved.
    55 *
     
    4545#include <bool.h>
    4646
    47 static int ski_port_init(void);
     47static int ski_port_init(kbd_dev_t *);
    4848static void ski_port_yield(void);
    4949static void ski_port_reclaim(void);
     
    5757};
    5858
     59static kbd_dev_t *kbd_dev;
     60
    5961#define SKI_GETCHAR             21
    6062
     
    6769
    6870/** Initialize Ski port driver. */
    69 static int ski_port_init(void)
     71static int ski_port_init(kbd_dev_t *kdev)
    7072{
    7173        thread_id_t tid;
    7274        int rc;
     75
     76        kbd_dev = kdev;
    7377
    7478        rc = thread_create(ski_thread_impl, NULL, "kbd_poll", &tid);
     
    106110                        if (c == 0)
    107111                                break;
    108                         kbd_push_scancode(c);
     112                        kbd_push_scancode(kbd_dev, c);
    109113                }
    110114
Note: See TracChangeset for help on using the changeset viewer.