Changeset 9be360ee in mainline for uspace/srv/hid/kbd/port/sgcn.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/sgcn.c

    r56ad818 r9be360ee  
    11/*
    22 * Copyright (c) 2008 Pavel Rimsky
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    4647#include <errno.h>
    4748
    48 static int sgcn_port_init(void);
     49static int sgcn_port_init(kbd_dev_t *);
    4950static void sgcn_port_yield(void);
    5051static void sgcn_port_reclaim(void);
     
    5859};
    5960
     61static kbd_dev_t *kbd_dev;
     62
    6063#define POLL_INTERVAL  10000
    6164
     
    113116 * Maps the physical memory (SRAM) and creates the polling thread.
    114117 */
    115 static int sgcn_port_init(void)
    116 {
     118static int sgcn_port_init(kbd_dev_t *kdev)
     119{
     120        kbd_dev = kdev;
     121       
    117122        sysarg_t sram_paddr;
    118123        if (sysinfo_get_value("sram.address.physical", &sram_paddr) != EOK)
     
    179184                buf_ptr = (volatile char *)
    180185                        SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr);
    181                 kbd_push_scancode(c);
     186                kbd_push_scancode(kbd_dev, c);
    182187        }
    183188}
Note: See TracChangeset for help on using the changeset viewer.