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


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

    r56ad818 r9be360ee  
    11/*
    22 * Copyright (c) 2009 Vineeth Pillai
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    4647#include <errno.h>
    4748
    48 static int pl050_port_init(void);
     49static int pl050_port_init(kbd_dev_t *);
    4950static void pl050_port_yield(void);
    5051static void pl050_port_reclaim(void);
     
    5758        .write = pl050_port_write
    5859};
     60
     61static kbd_dev_t *kbd_dev;
    5962
    6063#define PL050_STAT_RXFULL  (1 << 4)
     
    9497static void pl050_irq_handler(ipc_callid_t iid, ipc_call_t *call);
    9598
    96 static int pl050_port_init(void)
     99static int pl050_port_init(kbd_dev_t *kdev)
    97100{
     101        kbd_dev = kdev;
     102       
    98103        sysarg_t addr;
    99104        if (sysinfo_get_value("kbd.address.status", &addr) != EOK)
     
    134139        int scan_code = IPC_GET_ARG2(*call);
    135140
    136         kbd_push_scancode(scan_code);
     141        kbd_push_scancode(kbd_dev, scan_code);
    137142        return;
    138143}
Note: See TracChangeset for help on using the changeset viewer.