Skip to content

Commit

Permalink
Add sprintf and vprintf.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlohr committed Mar 5, 2024
1 parent 0f8bfde commit 8e86d08
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ch32v003fun/ch32v003fun.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,21 @@ int printf(const char* format, ...)
va_end( args );
return ret_status;
}


int vprintf(const char* format, va_list args)
{
return mini_vpprintf(__puts_uart, 0, format, args);
}

int snprintf(char * buffer, unsigned int buffer_len, const char* format, ...)
{
va_list args;
va_start( args, format );
int ret = mini_vsnprintf( buffer, buffer_len, format, args );
va_end( args );
return ret;
}

/* Some stuff from MUSL
Expand Down

0 comments on commit 8e86d08

Please sign in to comment.