mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
drivers/usbdev: CDC/ACM should reset all 'irregular' notifications to zero after sending the SerialState packet.
This commit is contained in:
@@ -703,6 +703,10 @@ static int cdcacm_serialstate(FAR struct cdcacm_dev_s *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
errout_with_flags:
|
errout_with_flags:
|
||||||
|
/* Reset all of the "irregular" notification */
|
||||||
|
|
||||||
|
priv->serialstate &= CDC_UART_CONSISTENT;
|
||||||
|
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -2117,7 +2121,7 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_CDCACM_IFLOWCONTROL
|
#ifdef CONFIG_CDCACM_IFLOWCONTROL
|
||||||
/* Report state of input flow control */
|
/* Report state of input flow control */
|
||||||
|
|
||||||
termiosp->c_lflag = (priv->iflow) ? CRTS_IFLOW : 0;
|
termiosp->c_cflag |= (priv->iflow) ? CRTS_IFLOW : 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -419,6 +419,8 @@
|
|||||||
* 105 and RS-232 signal RTS.
|
* 105 and RS-232 signal RTS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* CDC/ACM friendly naming */
|
||||||
|
|
||||||
#define CDCACM_UART_DTR CDC_DTE_PRESENT
|
#define CDCACM_UART_DTR CDC_DTE_PRESENT
|
||||||
#define CDCACM_UART_RTS CDC_ACTIVATE_CARRIER
|
#define CDCACM_UART_RTS CDC_ACTIVATE_CARRIER
|
||||||
|
|
||||||
@@ -547,9 +549,21 @@
|
|||||||
* overrun in the device.
|
* overrun in the device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* CDC/ACM friendly naming */
|
||||||
|
|
||||||
#define CDCACM_UART_DCD CDC_UART_RXCARRIER
|
#define CDCACM_UART_DCD CDC_UART_RXCARRIER
|
||||||
#define CDCACM_UART_DSR CDC_UART_TXCARRIER
|
#define CDCACM_UART_DSR CDC_UART_TXCARRIER
|
||||||
|
|
||||||
|
/* "SerialState is used like a real interrupt status register. Once a notification has been
|
||||||
|
* sent, the device will reset and reevaluate the different signals. For the consistent
|
||||||
|
* signals like carrier detect or transmission carrier, this will mean another notification
|
||||||
|
* will not be generated until there is a state change. For the irregular signals like
|
||||||
|
* break, the incoming ring signal, or the overrun error state, this will reset their values
|
||||||
|
* to zero and again will not send another notification until their state changes."
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CDC_UART_CONSISTENT (CDC_UART_RXCARRIER | CDC_UART_TXCARRIER)
|
||||||
|
|
||||||
/* Table 70: Call State Change Value Definitions */
|
/* Table 70: Call State Change Value Definitions */
|
||||||
|
|
||||||
#define CDC_CALLST_IDLE 0x01 /* Call has become idle */
|
#define CDC_CALLST_IDLE 0x01 /* Call has become idle */
|
||||||
|
|||||||
Reference in New Issue
Block a user