For my Atmega environment I programmed my own display_printf (see below). Now I want to use the same api for the mbed Serial module, but the compiler doesnt know where to find va_list, va_start and va_end.
Regards...
Wijnand
/*****************************************************************//**
* \brief display_printf
*
* This function supports...
*
* \author W.Nijs.
* \date 28-05-2010
* \param
*********************************************************************/
static char nhd_buffer[NHD_BUFFER_SIZE]; // output buffer
void display_printf(char *format, ...) {
uint8 i = 0;
va_list args;
va_start(args, format);
vsnprintf(nhd_buffer, NHD_BUFFER_SIZE, format, args);
va_end(args);
// output until buffer is empty
while (nhd_buffer[i] != '\0') {
myUART.putc(nhd_buffer[i]);
i++;
}
return;
}
For my Atmega environment I programmed my own display_printf (see below). Now I want to use the same api for the mbed Serial module, but the compiler doesnt know where to find va_list, va_start and va_end.
Regards...
Wijnand
/*****************************************************************//**
* \brief display_printf
*
* This function supports...
*
* \author W.Nijs.
* \date 28-05-2010
* \param
*********************************************************************/
static char nhd_buffer[NHD_BUFFER_SIZE]; // output buffer
void display_printf(char *format, ...) {
uint8 i = 0;
va_list args;
va_start(args, format);
vsnprintf(nhd_buffer, NHD_BUFFER_SIZE, format, args);
va_end(args);
// output until buffer is empty
while (nhd_buffer[i] != '\0') {
myUART.putc(nhd_buffer[i]);
i++;
}
return;
}