Skip to content

Commit bcaa52e

Browse files
xiaoxiang781216pkarashchenko
authored andcommitted
driver/segger: Simplify serial driver configuation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
1 parent 7160849 commit bcaa52e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

drivers/segger/Kconfig

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,56 +123,59 @@ config SYSLOG_RTT
123123
Use Segger J-Link RTT as a SYSLOG output device.
124124

125125
config SERIAL_RTT
126-
bool "Segger RTT serial driver"
126+
bool
127127
select SEGGER_RTT
128128
select SERIAL_RXDMA
129129
select SERIAL_TXDMA
130-
depends on SERIAL
131130
default n
132131
---help---
133132
This option is used to enable RTT serial device
134133
In Segger RTT serial driver, RTT channel buffer and serial DMA buffer are shared,
135134
So you cannot use RTT stream to operate it
136135

137-
if SERIAL_RTT
138-
139136
config SERIAL_RTT_POLLING_INTERVAL
140137
int "Segger RTT serial pilling interval (us)"
138+
depends on SERIAL_RTT
141139
default USEC_PER_TICK
142140
---help---
143141
This option is used to configure the RTT serial polling interval
144142

145143
config SERIAL_RTT0
146144
bool "Segger RTT serial for channel 0"
145+
select SERIAL_RTT
146+
depends on SERIAL
147147
default n
148148
---help---
149149
This option is used to enable the serial driver of channel 0
150150

151151
config SERIAL_RTT1
152152
bool "Segger RTT serial for channel 1"
153+
select SERIAL_RTT
154+
depends on SERIAL
153155
default n
154-
depends on SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 2
155156
---help---
156157
This option is used to enable the serial driver of channel 1
157158

158159
config SERIAL_RTT2
159160
bool "Segger RTT serial for channel 2"
161+
select SERIAL_RTT
162+
depends on SERIAL
160163
default n
161-
depends on SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 3
162164
---help---
163165
This option is used to enable the serial driver of channel 2
164166

165167
config SERIAL_RTT_CONSOLE
166168
int "Segger RTT console channel"
169+
depends on SERIAL_RTT
167170
default 0 if SERIAL_RTT0
171+
default 1 if SERIAL_RTT1
172+
default 2 if SERIAL_RTT2
168173
default -1
169174
---help---
170175
Select RTT console channel, using RTT channel 0 by default.
171176
The buffer size of RTT channel 0 is configured by SEGGER_RTT_BUFFER_SIZE_UP/DOWN
172177
You need to turn off other console devices before using Segger RTT console
173178

174-
endif # SERIAL_RTT
175-
176179
if DRIVERS_NOTE
177180

178181
config NOTE_RTT

0 commit comments

Comments
 (0)