We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 209d520 commit b39ec3aCopy full SHA for b39ec3a
adapter/drv_rtt.c
@@ -85,13 +85,13 @@ static void segger_rtt_check(void)
85
struct rt_serial_rx_fifo *rx_fifo;
86
rx_fifo = (struct rt_serial_rx_fifo *)_serial_jlink_rtt.serial_rx;
87
RT_ASSERT(rx_fifo != RT_NULL);
88
- while (SEGGER_RTT_HasKey())
+ while (SEGGER_RTT_HasKey() && (_serial_jlink_rtt.parent.open_flag & RT_DEVICE_OFLAG_OPEN))
89
{
90
rt_ringbuffer_putchar(&(rx_fifo->rb), SEGGER_RTT_GetKey());
91
rt_hw_serial_isr(&_serial_jlink_rtt, RT_SERIAL_EVENT_RX_IND);
92
}
93
#else //RT_USING_SERIAL_V1
94
95
96
97
0 commit comments