xiaoxiang781216 commented on code in PR #21643:
URL: https://github.com/apache/nuttx/pull/21643#discussion_r4542129506
##########
drivers/misc/Kconfig:
##########
@@ -149,13 +149,76 @@ config ARCH_HAVE_RDWR_MEM_CPU_RUN
default n
config LWL_CONSOLE
-bool "Lightweight Link Console Support"
+ bool "Lightweight Link Console Support"
default n
depends on DEV_CONSOLE && ARCH_HAVE_RDWR_MEM_CPU_RUN
+ select SERIAL
---help---
Use the lightweight link console which provides console over a
debug channel by means of shared memory. A terminal application
- for openocd as the debugger is available in tools/ocdconsole.py.
+ for openocd as the debugger is available in
tools/lwl/ocdconsole.py.
+ See Documentation/guides/drivers/lwl.rst.
+
+if LWL_CONSOLE
+
+config LWL_CONSOLE_RXBUFSIZE
+ int "Receive buffer size"
+ default 64
+ ---help---
+ Size of the buffer that holds the characters received from the
+ host until they are read. While it is full the host is held
off,
+ so no input is lost.
+
+config LWL_CONSOLE_TXBUFSIZE
+ int "Transmit buffer size"
+ default 256
+ ---help---
+ Size of the buffer that holds the characters waiting to be
+ collected by the host. While no host is connected the most
recent
+ output is kept here and shown when the host connects.
+
+config LWL_CONSOLE_RINGSIZE
+ int "Output ring buffer size"
+ default 256
+ ---help---
+ Size of the ring buffer in the control block from which the host
+ collects the output, many bytes per debugger access instead of
+ three per word. This is what makes the output fast. It must be
+ a multiple of 4. 0 disables it: the output then only uses the
+ word protocol, as with old host tools.
+
+config LWL_CONSOLE_DOORBELL
+ bool "Doorbell interrupt"
+ default n
+ depends on ARCH_ARMV6M || ARCH_ARMV7M || ARCH_ARMV8M
+ ---help---
+ Let the host raise an interrupt every time it updates the link,
by
+ setting the pending bit of an unused interrupt in the NVIC. The
+ console is then entirely interrupt driven: the CPU does no work
+ at all while the console is idle. Hosts that don't use the
+ doorbell keep working through polling, see
+ LWL_CONSOLE_POLL_INTERVAL.
+
+config LWL_CONSOLE_DOORBELL_IRQ
+ int "Doorbell IRQ number"
+ depends on LWL_CONSOLE_DOORBELL
+ range 16 511
+ ---help---
+ The NuttX IRQ number (the vector number, so external interrupt
0 is
+ 16) used as the doorbell. It must be implemented by the chip
but
+ not used by any other driver.
+
+config LWL_CONSOLE_POLL_INTERVAL
+ int "Polling interval (usec)"
+ default 10000
Review Comment:
if the user wants to use poll, why does he enable LWL_CONSOLE_DOORBELL in
the first step?
--
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]