You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/03/04 12:50:34 UTC

[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8714: samv7: raise input flow control warning only for serial drivers

xiaoxiang781216 commented on code in PR #8714:
URL: https://github.com/apache/nuttx/pull/8714#discussion_r1125460626


##########
arch/arm/src/samv7/sam_config.h:
##########
@@ -154,14 +154,22 @@
 #undef CONFIG_UART3_IFLOWCONTROL
 #undef CONFIG_UART4_IFLOWCONTROL
 
-/* Hardware flow control requires using a DMAC channel (not yet supported) */
+/* Hardware flow control requires using a DMAC channel (not yet supported).
+ * However CONFIG_SERIAL_IFLOWCONTROL is also used for USB CDC/ACM flow
+ * control which is supported, therefore the warning flag should be raised
+ * only if flowcontrol is configured for USART drivers.
+ */
 
 #ifdef CONFIG_SERIAL_IFLOWCONTROL
-#  warning XDMAC support is required for RTS hardware flow control
-#  undef CONFIG_SERIAL_IFLOWCONTROL
-#  undef CONFIG_USART0_IFLOWCONTROL
-#  undef CONFIG_USART1_IFLOWCONTROL
-#  undef CONFIG_USART2_IFLOWCONTROL
+#  if defined(CONFIG_USART0_IFLOWCONTROL) || \
+      defined(CONFIG_USART1_IFLOWCONTROL) || \
+      defined(CONFIG_USART2_IFLOWCONTROL)
+#    warning XDMAC support is required for RTS hardware flow control
+#    undef CONFIG_USART0_IFLOWCONTROL
+#    undef CONFIG_USART1_IFLOWCONTROL
+#    undef CONFIG_USART2_IFLOWCONTROL
+#    undef CONFIG_SERIAL_IFLOWCONTROL
+#endif

Review Comment:
   ```suggestion
   #  endif
   ```



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org