Changeset 132ab5d1 in mainline for uspace/srv/hid/isdv4_tablet/main.c


Ignore:
Timestamp:
2018-01-30T03:20:45Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (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 commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/isdv4_tablet/main.c

    r8bfb163 r132ab5d1  
    2727 */
    2828
    29 #include <char_dev_iface.h>
     29#include <async.h>
    3030#include <errno.h>
    31 #include <ipc/serial_ctl.h>
     31#include <fibril_synch.h>
     32#include <io/serial.h>
     33#include <ipc/mouseev.h>
    3234#include <loc.h>
     35#include <stddef.h>
    3336#include <stdio.h>
    34 #include <fibril_synch.h>
    35 #include <abi/ipc/methods.h>
    36 #include <ipc/mouseev.h>
    37 #include <inttypes.h>
    3837#include <task.h>
    3938
     
    179178        sysarg_t baud = 38400;
    180179        service_id_t svc_id;
     180        serial_t *serial;
    181181        char *serial_port_name = NULL;
    182182
     
    268268        if (!sess) {
    269269                fprintf(stderr, "Failed connecting to service\n");
    270         }
    271 
    272         async_exch_t *exch = async_exchange_begin(sess);
    273         rc = async_req_4_0(exch, SERIAL_SET_COM_PROPS, baud,
    274             SERIAL_NO_PARITY, 8, 1);
    275         async_exchange_end(exch);
    276 
     270                return 2;
     271        }
     272
     273        rc = serial_open(sess, &serial);
     274        if (rc != EOK) {
     275                fprintf(stderr, "Failed opening serial port\n");
     276                return 2;
     277        }
     278
     279        rc = serial_set_comm_props(serial, baud, SERIAL_NO_PARITY, 8, 1);
    277280        if (rc != EOK) {
    278281                fprintf(stderr, "Failed setting serial properties\n");
Note: See TracChangeset for help on using the changeset viewer.