X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fcommon%2Fserial.c;h=cd7002b8345d8be7e76d6624e7cac8a39fafa14f;hb=f4a9e5c0aa81738d26e7893d6cf47ebdb4a91047;hp=332cb587cd1a6678f3d89636e406965bfc971a6d;hpb=133a37bfba1a7e1423716b2b872d3bb82a2e64d9;p=libsigrok.git diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 332cb587..cd7002b8 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -1,7 +1,7 @@ /* * This file is part of the sigrok project. * - * Copyright (C) 2010 Bert Vermeulen + * Copyright (C) 2010-2012 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -190,7 +190,7 @@ SR_PRIV void serial_restore_params(int fd, void *backup) * flowcontrol: 1 = rts/cts, 2 = xon/xoff * parity: 0 = none, 1 = even, 2 = odd */ -SR_PRIV int serial_set_params(int fd, int speed, int bits, int parity, +SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity, int stopbits, int flowcontrol) { #ifdef _WIN32 @@ -201,8 +201,7 @@ SR_PRIV int serial_set_params(int fd, int speed, int bits, int parity, return SR_ERR; } - /* TODO: Rename 'speed' to 'baudrate'. */ - switch(speed) { + switch (baudrate) { /* TODO: Support for higher baud rates. */ case 115200: dcb.BaudRate = CBR_115200; @@ -235,7 +234,7 @@ SR_PRIV int serial_set_params(int fd, int speed, int bits, int parity, struct termios term; speed_t baud; - switch (speed) { + switch (baudrate) { case 9600: baud = B9600; break;