Changeset d9fae235 in mainline for uspace/srv/hid/kbd/port/msim.c


Ignore:
Timestamp:
2010-04-17T01:28:38Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9d6bfa5
Parents:
9256ad29
Message:

sysinfo overhaul

  • cleanup (nicer data structures, use of SLAB allocator)
  • add support for storing arbitrary binary data
  • properly reimplement non-constant values (generated by functions)
  • add support for non-constant subtrees (generated by functions)
  • syscall ABI change, libc API change
  • reflect changes in user code

libc: task_spawn() can now return error code

  • reflect change in user code, print error strings after failed task_spawn()

uspace cleanup

  • more use of string and other constants
  • more use of str_error()
  • unify error reporting in init
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/port/msim.c

    r9256ad29 rd9fae235  
    3030 * @ingroup  kbd
    3131 * @{
    32  */ 
     32 */
    3333/** @file
    34  * @brief       Msim keyboard port driver.
     34 * @brief Msim keyboard port driver.
    3535 */
    3636
     
    4141#include <kbd.h>
    4242#include <ddi.h>
     43#include <errno.h>
    4344
    4445irq_cmd_t msim_cmds[] = {
     
    6364int kbd_port_init(void)
    6465{
     66        sysarg_t vaddr;
     67        if (sysinfo_get_value("kbd.address.virtual", &vaddr) != EOK)
     68                return -1;
     69       
     70        sysarg_t inr;
     71        if (sysinfo_get_value("kbd.inr", &inr) != EOK)
     72                return -1;
     73       
     74        msim_cmds[0].addr = (void *) vaddr;
    6575        async_set_interrupt_received(msim_irq_handler);
    66         msim_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual");
    67         ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
    68             0, &msim_kbd);
     76        ipc_register_irq(inr, device_assign_devno(), 0, &msim_kbd);
     77       
    6978        return 0;
    7079}
Note: See TracChangeset for help on using the changeset viewer.