xiaoxiang781216 commented on code in PR #8483:
URL: https://github.com/apache/nuttx/pull/8483#discussion_r1106496663
##########
drivers/serial/serial.c:
##########
@@ -485,6 +489,87 @@ static int uart_tcdrain(FAR uart_dev_t *dev,
return ret;
}
+/****************************************************************************
+ * Name: uart_tcsendbreak
+ *
+ * Description:
+ * Request a serial line Break by calling the lower half driver's
+ * BSD-compatible Break IOCTLs TIOCSBRK and TIOCCBRK, with a sleep of the
+ * specified duration between them.
+ *
+ * Input Parameters:
+ * dev - Serial device.
+ * filep - Required for issuing lower half driver IOCTL call.
+ * ms - If non-zero, duration of the Break in milliseconds; if
+ * zero, duration is 400 milliseconds.
+ *
+ * Returned Value:
+ * 0 on success or a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+static int uart_tcsendbreak(FAR uart_dev_t *dev, FAR struct file *filep,
+ unsigned int ms)
+{
+ int ret;
+
+ /* tcsendbreak is a cancellation point */
+
+ if (enter_cancellation_point())
+ {
+#ifdef CONFIG_CANCELLATION_POINTS
Review Comment:
ok, let keep it mow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]