jerpelea commented on code in PR #16466: URL: https://github.com/apache/nuttx/pull/16466#discussion_r2139918418
########## drivers/serial/Kconfig-usart: ########## @@ -705,13 +723,15 @@ menu "USART9 Configuration" config USART9_RXBUFSIZE int "Receive buffer size" + default 128 if ARCH_LD_16BIT_NOT_ATOMIC default 256 ---help--- Characters are buffered as they are received. This specifies the size of the receive buffer. config USART9_TXBUFSIZE int "Transmit buffer size" + default 128 if ARCH_LD_16BIT_NOT_ATOMIC Review Comment: I am not sure if that means to a) change the name from ARCH_LD_16BIT_NOT_ATOMIC to ARCH_HAVE_8BIT_BUFSIZE or b) add ARCH_HAVE_8BIT_BUFSIZE and have it selected by ARCH_LD_16BIT_NOT_ATOMIC? Neither seems fully correct though. The first variant reduces the problem to buffers only but that is too narrow. Essentially, any other value that is simultaneously written in interrupt code and read in non-interrupt code needs the be treated in the same manner as buffer head/tail here. The current name reflects that. Also, adding ARCH_LD_32BIT_NOT_ATOMIC may be needed as well (possibly not only for AVR but for 16 bit microcontrollers too - if I understand it correctly, that applies to Freescale M9S12.) The second variant implies that all of the arch has 8 bit buffer size for all buffers everywhere which is not true and may not be desirable. How about adding ARCH_HAVE_8BIT_SERIAL_BUFSIZE to serial/Kconfig and have it selected by ARCH_LD_16BIT_NOT_ATOMIC? -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org