Uart_console: remove custom printf

This commit is contained in:
Christina Quast
2015-04-06 19:25:34 +02:00
parent ca39e16797
commit 1e15cb6616
2 changed files with 0 additions and 28 deletions

View File

@@ -33,8 +33,6 @@
#include <stdint.h>
extern int printf(const char *, ...);
extern void UART_Configure( uint32_t dwBaudrate, uint32_t dwMasterClock ) ;
extern void UART_PutChar( uint8_t uc ) ;
extern uint32_t UART_GetChar( void ) ;

View File

@@ -63,32 +63,6 @@
/** Is Console Initialized. */
static uint8_t _ucIsConsoleInitialized=0 ;
extern void UART_PutString(const char *str, int len) {
int i;
for (i=0; i<len; i++) {
UART_PutChar(*str++);
}
}
extern int printf(const char *fmt, ...)
{
char *cmdp;
size_t ret = 0;
va_list va;
va_start(va, fmt);
ret = vasprintf(&cmdp, fmt, va);
va_end(va);
if (ret == strlen(cmdp)) {
UART_PutString(cmdp, strlen(cmdp));
free(cmdp);
} else {
return -1;
}
return ret;
}
/**
* \brief Configures an USART peripheral with the specified parameters.
*