This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SEGGER_RTT_vprintf and sprintf (va_list help please)

Hello,

I want to rewritte SEGGER_RTT_vprintf to use sprintf Inside (because it's already linked in my application and allow float display).

The problem is that i don't know how to use va_list * pParamList.

There are a lot of exemples like the next but they don't use a va_list pointer. If i tried with *thepointed but GCC doesn't accept that. Does anyone is strong enough with va_list to tell me how please ?

char buffer[256];
	va_list args;
	va_start(args, fmt);
	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
	if (rc > 0)
	{
		SEGGER_RTT_Write(0, buffer, rc);
	}
	va_end(args);
	return rc;
Parents Reply Children
No Data
Related