Trident IoT SDK
 
Loading...
Searching...
No Matches
tr_printf.h
Go to the documentation of this file.
1
10#ifndef TR_PRINTF_H
11#define TR_PRINTF_H
12
13#include <stdio.h>
14#include <stdint.h>
15#include <stdbool.h>
16#include <string.h>
17#include <stdarg.h>
18
33typedef void (*putchar_cb)(char ch);
34
39typedef void (*putstr_cb)(const char *str,
40 int len);
41
50 putstr_cb puts);
51
62void tr_vsprintf(char *buf,
63 int maxlen,
64 const char *fmt,
65 const va_list args);
66
73void tr_printf(const char *fmt,
74 ...);
75
81#endif // TR_PRINTF_H
void tr_printf(const char *fmt,...)
Writes the passed in C string to the standard output (stdout).
void(* putchar_cb)(char ch)
Function pointer definition for put char callback.
Definition tr_printf.h:33
void(* putstr_cb)(const char *str, int len)
Function pointer definition for put string callback.
Definition tr_printf.h:39
void tr_vsprintf(char *buf, int maxlen, const char *fmt, const va_list args)
Write formated data from variable argument list to string.
void tr_printf_init(putchar_cb putc, putstr_cb puts)
Initializes the printf utility.