Skip to content

Commit 3a52ab2

Browse files
pdgendtgalak
authored andcommitted
config: Use zephyr provided options
Re-introduced the zephyr Kconfig options which were removed in PR #6 Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 7cbc844 commit 3a52ab2

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

Config/SEGGER_RTT_Conf.h

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,33 +78,21 @@ Revision: $Rev: 21386 $
7878
// Up-channel 0: RTT
7979
// Up-channel 1: SystemView
8080
//
81-
#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS
82-
#define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3)
83-
#endif
81+
#define SEGGER_RTT_MAX_NUM_UP_BUFFERS CONFIG_SEGGER_RTT_MAX_NUM_UP_BUFFERS // Max. number of up-buffers (T->H) available on this target (Default: 3)
8482
//
8583
// Most common case:
8684
// Down-channel 0: RTT
8785
// Down-channel 1: SystemView
8886
//
89-
#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS
90-
#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3)
91-
#endif
87+
#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS CONFIG_SEGGER_RTT_MAX_NUM_DOWN_BUFFERS // Max. number of down-buffers (H->T) available on this target (Default: 3)
9288

93-
#ifndef BUFFER_SIZE_UP
94-
#define BUFFER_SIZE_UP (1024) // Size of the buffer for terminal output of target, up to host (Default: 1k)
95-
#endif
89+
#define BUFFER_SIZE_UP CONFIG_SEGGER_RTT_BUFFER_SIZE_UP // Size of the buffer for terminal output of target, up to host (Default: 1k)
9690

97-
#ifndef BUFFER_SIZE_DOWN
98-
#define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16)
99-
#endif
91+
#define BUFFER_SIZE_DOWN CONFIG_SEGGER_RTT_BUFFER_SIZE_DOWN // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16)
10092

101-
#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE
102-
#define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)
103-
#endif
93+
#define SEGGER_RTT_PRINTF_BUFFER_SIZE CONFIG_SEGGER_RTT_PRINTF_BUFFER_SIZE // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)
10494

105-
#ifndef SEGGER_RTT_MODE_DEFAULT
106-
#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0)
107-
#endif
95+
#define SEGGER_RTT_MODE_DEFAULT CONFIG_SEGGER_RTT_MODE // Mode for pre-initialized terminal channel (buffer 0)
10896

10997
#if defined(CONFIG_SEGGER_RTT_SECTION_DTCM)
11098
#define SEGGER_RTT_SECTION ".dtcm_data"
@@ -122,8 +110,10 @@ Revision: $Rev: 21386 $
122110
* This is may be required with memory access restrictions,
123111
* such as on Cortex-A devices with MMU.
124112
*/
125-
#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP
126-
#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop
113+
#if defined(CONFIG_SEGGER_RTT_MEMCPY_USE_BYTELOOP)
114+
#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 1 // 1: Use a simple byte-loop
115+
#else
116+
#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY
127117
#endif
128118
//
129119
// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets

0 commit comments

Comments
 (0)