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
28
33#ifndef PRINTF_FLOAT_ENABLE
34#define PRINTF_FLOAT_ENABLE 1
35#endif
36
41typedef void (*putchar_cb)(char ch);
42
47typedef void (*putstr_cb)(const char *str,
48 int len);
49
58 putstr_cb puts);
59
70void tr_vsprintf(char *buf,
71 int maxlen,
72 const char *fmt,
73 const va_list args);
74
81void tr_printf(const char *fmt,
82 ...);
83
88
89#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:41
void(* putstr_cb)(const char *str, int len)
Function pointer definition for put string callback.
Definition tr_printf.h:47
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.