13.4.1.4 SEGGER_RTT_HasKey()
Description
Checks if at least one character for reading is available in SEGGER RTT buffer. 0
Prototype
int SEGGER_RTT_HasKey (void);
Return value
0
No characters are available to be read.
1
At least one character is available in the buffer.
Example
if (SEGGER_RTT_HasKey()) {
int c = SEGGER_RTT_GetKey();
}
13.4.1.5 SEGGER_RTT_Init()
Description
Initializes the RTT Control Block.
Prototype
void SEGGER_RTT_Init (void);
Additional information
Should be used in RAM targets, at start of the application.
13.4.1.6 SEGGER_RTT_printf()
Description
Send a formatted string to the host.
Prototype
int SEGGER_RTT_printf (unsigned BufferIndex, const char * sFormat, ...)
Parameters
Parameter
BufferIndex
sFormat
Table 13.3: SEGGER_RTT_printf() parameter list
Return value
>= 0
Number of bytes which have been sent.
< 0
Error.
Example
SEGGER_RTT_printf(0, "SEGGER RTT Sample. Uptime: %.10dms.", /*OS_Time*/ 890912);
// Formatted output on channel 0: SEGGER RTT Sample. Uptime: 890912ms.
Additional information
(1) Conversion specifications have following syntax:
•
%[flags][FieldWidth][.Precision]ConversionSpecifier
J-Link / J-Trace (UM08001)
Index of the up channel to sent the string to.
Pointer to format string, followed by arguments for conversion.
Meaning
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
363
Need help?
Do you have a question about the J-Link and is the answer not in the manual?