305
Return value
Value
≥ 0
Number of bytes which have been sent.
< 0
Error.
Example
SEGGER_RTT_printf(0,
// Formatted output on channel 0: SEGGER RTT Sample. Uptime: 890912ms.
Additional information
(1) Conversion specifications have following syntax:
•
%[flags][FieldWidth][.Precision]ConversionSpecifier
(2) Supported flags:
•
-: Left justify within the field width
•
+: Always print sign extension for signed conversions
•
0: Pad with 0 instead of spaces. Ignored when using '-'-flag or precision
(3) Supported conversion specifiers:
•
c: Print the argument as one char
•
d: Print the argument as a signed integer
•
u: Print the argument as an unsigned integer
•
x: Print the argument as an hexadecimal integer
•
s: Print the string pointed to by the argument
•
p: Print the argument as an 8-digit hexadecimal integer. (Argument shall be a pointer
to void.)
13.4.1.7
SEGGER_RTT_Read()
Read characters from any RTT down channel which have been previously stored by the host.
Syntax
unsigned
SEGGER_RTT_Read
BufferSize);
Parameter
BufferIndex
pBuffer
BufferSize
Return value
Value
≥ 0
Number of bytes that have been read.
Example
char
acIn[4];
unsigned
NumBytes = sizeof(acIn);
NumBytes = SEGGER_RTT_Read(0, &acIn[0], NumBytes);
if
(NumBytes) {
AnalyzeInput(acIn);
}
J-Link / J-Trace (UM08001)
CHAPTER 13
Meaning
"SEGGER RTT Sample. Uptime:
(unsigned
Index of the down channel to read from.
Pointer to a character buffer to store the read characters.
Number of bytes available in the buffer.
Meaning
%.10dms.",
/*OS_Time*/
BufferIndex,
char*
Meaning
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
Implementation
890912);
pBuffer,
unsigned
Need help?
Do you have a question about the J-Link and is the answer not in the manual?