Skip to content

Commit b72cf05

Browse files
committed
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 e51b82e commit b72cf05

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
@@ -41,9 +41,7 @@ static int rtt_console_out(int character)
4141
int max_cnt = CONFIG_RTT_TX_RETRY_CNT;
4242

4343
do {
44-
SEGGER_RTT_LOCK();
45-
cnt = SEGGER_RTT_WriteNoLock(0, &c, 1);
46-
SEGGER_RTT_UNLOCK();
44+
cnt = SEGGER_RTT_Write(0, &c, 1);
4745

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

0 commit comments

Comments
 (0)