can i print char tpye variable in RTT segger
can i print char tpye variable in RTT segger
Yes, use SEGGER_RTT_printf():
SEGGER_RTT_printf(0, "%sTime: %s%s%7d\n", RTT_CTRL_RESET, RTT_CTRL_BG_BRIGHT_RED, RTT_CTRL_TEXT_BRIGHT_WHITE, 2222222);
I believe the only difference from the standard C library definition of printf is the addition of the first parameter, '0', who refereres to the RTT channel. Should be '0' as a default value.
Thank you haaakonsh.I am not gettting above command SEGGER_RTT_printf(0, "%sTime: %s%s%.7d\n", RTT_CTRL_RESET, RTT_CTRL_BG_BRIGHT_RED, RTT_CTRL_TEXT_BRIGHT_WHITE, 2222222);
what is .7d ?
and char type var can print 0-255 data
I think it should be %7d and not %.7d. I believe it asks the interpreter to display a decimal integer of 7 ciphers.
Try this: SEGGER_RTT_printf(0, "Number is: %d\n", 2);
I think it should be %7d and not %.7d. I believe it asks the interpreter to display a decimal integer of 7 ciphers.
Try this: SEGGER_RTT_printf(0, "Number is: %d\n", 2);
thank you