Fix preprocessing directives for uart flow control
commit 58bd8737297efcf5c6f4f8961c88e86a3d5113c7 had a mix of `#if defined(X)` and `#ifdef X`, but used `#if X` in its TCSETS ioctl logic which causes compile warnings.
This commit is contained in:
parent
f32ce9d930
commit
185de258bf
@ -567,19 +567,19 @@ static int bl602_ioctl(struct file *filep, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
if (priv->config.idx == 0)
|
if (priv->config.idx == 0)
|
||||||
{
|
{
|
||||||
#if CONFIG_UART0_IFLOWCONTROL
|
#ifdef CONFIG_UART0_IFLOWCONTROL
|
||||||
config.iflow_ctl = (termiosp->c_cflag & CRTS_IFLOW) != 0;
|
config.iflow_ctl = (termiosp->c_cflag & CRTS_IFLOW) != 0;
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_UART0_OFLOWCONTROL
|
#ifdef CONFIG_UART0_OFLOWCONTROL
|
||||||
config.oflow_ctl = (termiosp->c_cflag & CCTS_OFLOW) != 0;
|
config.oflow_ctl = (termiosp->c_cflag & CCTS_OFLOW) != 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if CONFIG_UART1_IFLOWCONTROL
|
#ifdef CONFIG_UART1_IFLOWCONTROL
|
||||||
config.iflow_ctl = (termiosp->c_cflag & CRTS_IFLOW) != 0;
|
config.iflow_ctl = (termiosp->c_cflag & CRTS_IFLOW) != 0;
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_UART1_OFLOWCONTROL
|
#ifdef CONFIG_UART1_OFLOWCONTROL
|
||||||
config.oflow_ctl = (termiosp->c_cflag & CCTS_OFLOW) != 0;
|
config.oflow_ctl = (termiosp->c_cflag & CCTS_OFLOW) != 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user