mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
driver/segger: Simplify serial driver configuation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
7160849f63
commit
bcaa52e0f1
+11
-8
@@ -123,56 +123,59 @@ config SYSLOG_RTT
|
|||||||
Use Segger J-Link RTT as a SYSLOG output device.
|
Use Segger J-Link RTT as a SYSLOG output device.
|
||||||
|
|
||||||
config SERIAL_RTT
|
config SERIAL_RTT
|
||||||
bool "Segger RTT serial driver"
|
bool
|
||||||
select SEGGER_RTT
|
select SEGGER_RTT
|
||||||
select SERIAL_RXDMA
|
select SERIAL_RXDMA
|
||||||
select SERIAL_TXDMA
|
select SERIAL_TXDMA
|
||||||
depends on SERIAL
|
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
This option is used to enable RTT serial device
|
This option is used to enable RTT serial device
|
||||||
In Segger RTT serial driver, RTT channel buffer and serial DMA buffer are shared,
|
In Segger RTT serial driver, RTT channel buffer and serial DMA buffer are shared,
|
||||||
So you cannot use RTT stream to operate it
|
So you cannot use RTT stream to operate it
|
||||||
|
|
||||||
if SERIAL_RTT
|
|
||||||
|
|
||||||
config SERIAL_RTT_POLLING_INTERVAL
|
config SERIAL_RTT_POLLING_INTERVAL
|
||||||
int "Segger RTT serial pilling interval (us)"
|
int "Segger RTT serial pilling interval (us)"
|
||||||
|
depends on SERIAL_RTT
|
||||||
default USEC_PER_TICK
|
default USEC_PER_TICK
|
||||||
---help---
|
---help---
|
||||||
This option is used to configure the RTT serial polling interval
|
This option is used to configure the RTT serial polling interval
|
||||||
|
|
||||||
config SERIAL_RTT0
|
config SERIAL_RTT0
|
||||||
bool "Segger RTT serial for channel 0"
|
bool "Segger RTT serial for channel 0"
|
||||||
|
select SERIAL_RTT
|
||||||
|
depends on SERIAL
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
This option is used to enable the serial driver of channel 0
|
This option is used to enable the serial driver of channel 0
|
||||||
|
|
||||||
config SERIAL_RTT1
|
config SERIAL_RTT1
|
||||||
bool "Segger RTT serial for channel 1"
|
bool "Segger RTT serial for channel 1"
|
||||||
|
select SERIAL_RTT
|
||||||
|
depends on SERIAL
|
||||||
default n
|
default n
|
||||||
depends on SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 2
|
|
||||||
---help---
|
---help---
|
||||||
This option is used to enable the serial driver of channel 1
|
This option is used to enable the serial driver of channel 1
|
||||||
|
|
||||||
config SERIAL_RTT2
|
config SERIAL_RTT2
|
||||||
bool "Segger RTT serial for channel 2"
|
bool "Segger RTT serial for channel 2"
|
||||||
|
select SERIAL_RTT
|
||||||
|
depends on SERIAL
|
||||||
default n
|
default n
|
||||||
depends on SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 3
|
|
||||||
---help---
|
---help---
|
||||||
This option is used to enable the serial driver of channel 2
|
This option is used to enable the serial driver of channel 2
|
||||||
|
|
||||||
config SERIAL_RTT_CONSOLE
|
config SERIAL_RTT_CONSOLE
|
||||||
int "Segger RTT console channel"
|
int "Segger RTT console channel"
|
||||||
|
depends on SERIAL_RTT
|
||||||
default 0 if SERIAL_RTT0
|
default 0 if SERIAL_RTT0
|
||||||
|
default 1 if SERIAL_RTT1
|
||||||
|
default 2 if SERIAL_RTT2
|
||||||
default -1
|
default -1
|
||||||
---help---
|
---help---
|
||||||
Select RTT console channel, using RTT channel 0 by default.
|
Select RTT console channel, using RTT channel 0 by default.
|
||||||
The buffer size of RTT channel 0 is configured by SEGGER_RTT_BUFFER_SIZE_UP/DOWN
|
The buffer size of RTT channel 0 is configured by SEGGER_RTT_BUFFER_SIZE_UP/DOWN
|
||||||
You need to turn off other console devices before using Segger RTT console
|
You need to turn off other console devices before using Segger RTT console
|
||||||
|
|
||||||
endif # SERIAL_RTT
|
|
||||||
|
|
||||||
if DRIVERS_NOTE
|
if DRIVERS_NOTE
|
||||||
|
|
||||||
config NOTE_RTT
|
config NOTE_RTT
|
||||||
|
|||||||
Reference in New Issue
Block a user