mirror of
git://sigrok.org/libserialport
synced 2023-08-10 21:13:24 +03:00
Minor cosmetics.
This commit is contained in:
parent
8645feda60
commit
24abdb680f
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @mainpage libserialport API
|
* @mainpage libserialport API
|
||||||
*
|
*
|
||||||
* Introduction
|
* Introduction
|
||||||
|
@ -99,8 +99,8 @@ int get_termiox_size(void)
|
|||||||
int get_termiox_flow(void *data)
|
int get_termiox_flow(void *data)
|
||||||
{
|
{
|
||||||
struct termiox *termx = (struct termiox *) data;
|
struct termiox *termx = (struct termiox *) data;
|
||||||
|
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
if (termx->x_cflag & RTSXOFF)
|
if (termx->x_cflag & RTSXOFF)
|
||||||
flags |= RTS_FLOW;
|
flags |= RTS_FLOW;
|
||||||
if (termx->x_cflag & CTSXON)
|
if (termx->x_cflag & CTSXON)
|
||||||
@ -131,4 +131,3 @@ void set_termiox_flow(void *data, int flags)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1028,7 +1028,7 @@ static enum sp_return set_config(struct sp_port *port, struct port_data *data,
|
|||||||
/* Non-standard baud rate */
|
/* Non-standard baud rate */
|
||||||
if (i == NUM_STD_BAUDRATES) {
|
if (i == NUM_STD_BAUDRATES) {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
/* Set "dummy" baud rate */
|
/* Set "dummy" baud rate. */
|
||||||
if (cfsetspeed(&data->term, B9600) < 0)
|
if (cfsetspeed(&data->term, B9600) < 0)
|
||||||
return SP_ERR_FAIL;
|
return SP_ERR_FAIL;
|
||||||
baud_nonstd = config->baudrate;
|
baud_nonstd = config->baudrate;
|
||||||
@ -1099,8 +1099,7 @@ static enum sp_return set_config(struct sp_port *port, struct port_data *data,
|
|||||||
case SP_RTS_OFF:
|
case SP_RTS_OFF:
|
||||||
case SP_RTS_ON:
|
case SP_RTS_ON:
|
||||||
controlbits = TIOCM_RTS;
|
controlbits = TIOCM_RTS;
|
||||||
if (ioctl(port->fd, config->rts == SP_RTS_ON ? TIOCMBIS : TIOCMBIC,
|
if (ioctl(port->fd, config->rts == SP_RTS_ON ? TIOCMBIS : TIOCMBIC, &controlbits) < 0)
|
||||||
&controlbits) < 0)
|
|
||||||
return SP_ERR_FAIL;
|
return SP_ERR_FAIL;
|
||||||
break;
|
break;
|
||||||
case SP_RTS_FLOW_CONTROL:
|
case SP_RTS_FLOW_CONTROL:
|
||||||
@ -1155,8 +1154,7 @@ static enum sp_return set_config(struct sp_port *port, struct port_data *data,
|
|||||||
case SP_DTR_OFF:
|
case SP_DTR_OFF:
|
||||||
case SP_DTR_ON:
|
case SP_DTR_ON:
|
||||||
controlbits = TIOCM_DTR;
|
controlbits = TIOCM_DTR;
|
||||||
if (ioctl(port->fd, config->dtr == SP_DTR_ON ? TIOCMBIS : TIOCMBIC,
|
if (ioctl(port->fd, config->dtr == SP_DTR_ON ? TIOCMBIS : TIOCMBIC, &controlbits) < 0)
|
||||||
&controlbits) < 0)
|
|
||||||
return SP_ERR_FAIL;
|
return SP_ERR_FAIL;
|
||||||
break;
|
break;
|
||||||
case SP_DTR_FLOW_CONTROL:
|
case SP_DTR_FLOW_CONTROL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user