Merge pull request #1646 from jdede/fix-putchar-ipv4

Fix putchar include when using IPv4
This commit is contained in:
Simon Duquennoy 2016-05-04 14:41:18 +02:00
commit 2a1da5dbad
2 changed files with 6 additions and 2 deletions

View File

@ -1,9 +1,11 @@
#include "dev/uart0.h" #include "dev/uart0.h"
#include <stdio.h>
#if !NETSTACK_CONF_WITH_IPV4
/* In case of IPv4: putchar() is defined by the SLIP driver */
int int
putchar(int c) putchar(int c)
{ {
uart0_writeb((char)c); uart0_writeb((char)c);
return c; return c;
} }
#endif /* ! NETSTACK_CONF_WITH_IPV4 */

View File

@ -1,9 +1,11 @@
#include <stdio.h>
#include "dev/uart1.h" #include "dev/uart1.h"
#if !NETSTACK_CONF_WITH_IPV4
/* In case of IPv4: putchar() is defined by the SLIP driver */
int int
putchar(int c) putchar(int c)
{ {
uart1_writeb((char)c); uart1_writeb((char)c);
return c; return c;
} }
#endif /* ! NETSTACK_CONF_WITH_IPV4 */