Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 216576

Forum Post: M3 printf

$
0
0

Hello,

I'm using Concerto-M3 processor with rtos.

I want to write a routine like printf that calls printf.

Here the snippet

void Write(const char* string, ...)  {   va_list va;   va_start(va, string);   char testo[30],len;   len=sprintf(testo,string,va);   va_end(va);   UINT dw; f_write(&file,testo,len,&dw);  }

The routine works very well if I pass float number like this

Write("\n%f",16.4);

The routine not work with strings

Write("<%s(t)>","hello");

can someone help me ?

 


Viewing all articles
Browse latest Browse all 216576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>