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

    rdf8110d3 rd900699  
    11/*
    22 * Copyright (c) 2008 Pavel Rimsky
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    4647#include <errno.h>
    4748
     49static int sgcn_port_init(kbd_dev_t *);
     50static void sgcn_port_yield(void);
     51static void sgcn_port_reclaim(void);
     52static void sgcn_port_write(uint8_t data);
     53
     54kbd_port_ops_t sgcn_port = {
     55        .init = sgcn_port_init,
     56        .yield = sgcn_port_yield,
     57        .reclaim = sgcn_port_reclaim,
     58        .write = sgcn_port_write
     59};
     60
     61static kbd_dev_t *kbd_dev;
     62
    4863#define POLL_INTERVAL  10000
    4964
     
    101116 * Maps the physical memory (SRAM) and creates the polling thread.
    102117 */
    103 int kbd_port_init(void)
    104 {
     118static int sgcn_port_init(kbd_dev_t *kdev)
     119{
     120        kbd_dev = kdev;
     121       
    105122        sysarg_t sram_paddr;
    106123        if (sysinfo_get_value("sram.address.physical", &sram_paddr) != EOK)
     
    130147}
    131148
    132 void kbd_port_yield(void)
     149static void sgcn_port_yield(void)
    133150{
    134151        polling_disabled = true;
    135152}
    136153
    137 void kbd_port_reclaim(void)
     154static void sgcn_port_reclaim(void)
    138155{
    139156        polling_disabled = false;
    140157}
    141158
    142 void kbd_port_write(uint8_t data)
     159static void sgcn_port_write(uint8_t data)
    143160{
    144161        (void) data;
     
    167184                buf_ptr = (volatile char *)
    168185                        SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr);
    169                 kbd_push_scancode(c);
     186                kbd_push_scancode(kbd_dev, c);
    170187        }
    171188}
Note: See TracChangeset for help on using the changeset viewer.