Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/input.c

    r74017ce ra2afd8f  
    3737 */
    3838
     39#include <adt/list.h>
     40#include <stdbool.h>
     41#include <fibril_synch.h>
     42#include <ipc/services.h>
     43#include <ipc/input.h>
     44#include <config.h>
     45#include <stdio.h>
     46#include <stdlib.h>
     47#include <ns.h>
     48#include <async.h>
     49#include <errno.h>
    3950#include <adt/fifo.h>
    40 #include <adt/list.h>
    41 #include <async.h>
    42 #include <config.h>
    43 #include <errno.h>
    44 #include <fibril.h>
    45 #include <fibril_synch.h>
    46 #include <io/chardev.h>
    4751#include <io/console.h>
    4852#include <io/keycode.h>
    49 #include <ipc/services.h>
    50 #include <ipc/input.h>
    5153#include <loc.h>
    52 #include <ns.h>
    53 #include <stdbool.h>
    54 #include <stdio.h>
    55 #include <stdlib.h>
    5654#include <str_error.h>
    57 
    58 #include "input.h"
     55#include <char_dev_iface.h>
     56#include <fibril.h>
     57#include "layout.h"
    5958#include "kbd.h"
    6059#include "kbd_port.h"
    6160#include "kbd_ctl.h"
    62 #include "layout.h"
    6361#include "mouse.h"
    6462#include "mouse_proto.h"
    6563#include "serial.h"
     64#include "input.h"
    6665
    6766#define NUM_LAYOUTS  4
     
    537536        while (true) {
    538537                uint8_t data;
    539                 size_t nread;
    540 
    541                 chardev_read(sdev->chardev, &data, sizeof(data), &nread);
    542                 /* XXX Handle error */
     538
     539                char_dev_read(sdev->sess, &data, sizeof(data));
    543540                kbd_push_data(sdev->kdev, data);
    544541        }
     
    555552{
    556553        bool match = false;
    557         int rc;
    558554
    559555        serial_dev_t *sdev = serial_dev_new();
     
    563559        sdev->kdev->svc_id = service_id;
    564560       
    565         rc = loc_service_get_name(service_id, &sdev->kdev->svc_name);
     561        int rc = loc_service_get_name(service_id, &sdev->kdev->svc_name);
    566562        if (rc != EOK)
    567563                goto fail;
     
    586582                sdev->sess = loc_service_connect(service_id, INTERFACE_DDF,
    587583                    IPC_FLAG_BLOCKING);
    588 
    589                 rc = chardev_open(sdev->sess, &sdev->chardev);
    590                 if (rc != EOK) {
    591                         async_hangup(sdev->sess);
    592                         sdev->sess = NULL;
    593                         list_remove(&sdev->link);
    594                         goto fail;
    595                 }
    596584
    597585                fid_t fid = fibril_create(serial_consumer, sdev);
Note: See TracChangeset for help on using the changeset viewer.