EVE 1.0
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
dbg-printf.c
1
#include <stdio.h>
2
#include <debug-uart.h>
3
#include <string.h>
4
#include <strformat.h>
5
6
static
StrFormatResult
7
write_str(
void
*user_data,
const
char
*
data
,
unsigned
int
len)
8
{
9
if
(len > 0) dbg_send_bytes((
unsigned
char
*)data, len);
10
return
STRFORMAT_OK;
11
}
12
13
14
static
StrFormatContext ctxt =
15
{
16
write_str,
17
NULL
18
};
19
int
20
printf(
const
char
*fmt, ...)
21
{
22
int
res;
23
va_list ap;
24
va_start(ap, fmt);
25
res = format_str_v(&ctxt, fmt, ap);
26
va_end(ap);
27
return
res;
28
}
29
30
data
uint8_t data[USBNET_RX_BUF_SIZE]
Definition:
usbnet.h:140
Contiki
cpu
arm
common
dbg-io
dbg-printf.c
Generated on Thu Mar 30 2017 10:16:55 for EVE 1.0 by
1.8.11