Skip to content

Commit

Permalink
Fix segger rtt
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Jun 3, 2024
1 parent c92a436 commit 006c76a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pinetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@ void pinetime_step(pinetime_t *pt)
nrf52832_step(pt->nrf);

#ifdef ENABLE_SEGGER_RTT
if ((pt->rtt_found || pt->rtt_counter < 1000000) && pt->rtt_counter % 1000 == 0)
if (pt->rtt_found || pt->rtt_counter < 1000000)
{
if (!pt->rtt_found)
pt->rtt_found = rtt_find_control(pt->rtt);
if (pt->rtt_counter % 1000 == 0)
{
if (!pt->rtt_found)
pt->rtt_found = rtt_find_control(pt->rtt);

rtt_flush_buffers(pt->rtt);
rtt_flush_buffers(pt->rtt);
}

pt->rtt_counter++;
}
Expand Down

0 comments on commit 006c76a

Please sign in to comment.