Skip to content

Commit 2f8af56

Browse files
gianstacarlescufi
authored andcommitted
drivers: console: rtt_console: use Segger recommended write API
Use recommended write API that internally locks RTT usage and checks if the RTTcontrol block initialization is done. Signed-off-by: Giancarlo Stasi <[email protected]>
1 parent 711ed08 commit 2f8af56

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/console/rtt_console.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ static int rtt_console_out(int character)
4040
int max_cnt = CONFIG_RTT_TX_RETRY_CNT;
4141

4242
do {
43-
SEGGER_RTT_LOCK();
44-
cnt = SEGGER_RTT_WriteNoLock(0, &c, 1);
45-
SEGGER_RTT_UNLOCK();
43+
cnt = SEGGER_RTT_Write(0, &c, 1);
4644

4745
/* There are two possible reasons for not writing any data to
4846
* RTT:

0 commit comments

Comments
 (0)