Changeset f619943a in mainline for uspace/app/test_serial


Ignore:
Timestamp:
2010-05-12T14:36:49Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04c7003f
Parents:
f4ef3c2
Message:

set baud rate from test_serial application; fixed a bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/test_serial/test_serial.c

    rf4ef3c2 rf619943a  
    4646#include <device/char.h>
    4747#include <string.h>
     48#include <ipc/serial_ctl.h>
    4849
    4950#define NAME            "test serial"
     
    9192        }
    9293       
     94        res = ipc_call_sync_1_0(phone, SERIAL_SET_BAUD_RATE, 1200);
     95        if (EOK != res) {
     96                printf(NAME ": failed to set baud rate, errno = %d.\n", -res);
     97                devman_hangup_phone(DEVMAN_CLIENT);
     98                ipc_hangup(phone);
     99                free(buf);
     100                return 4;               
     101        }
     102       
    93103        int total = 0;
    94104        int read = 0;
     
    100110                        devman_hangup_phone(DEVMAN_CLIENT);
    101111                        free(buf);
    102                         return 4;
     112                        return 5;
    103113                }               
    104114                total += read;
Note: See TracChangeset for help on using the changeset viewer.