1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/**
* @file lv_sprintf_rtthread.c
*
*/
/*********************
* INCLUDES
*********************/
#include "../../lv_conf_internal.h"
#if LV_USE_STDLIB_SPRINTF == LV_STDLIB_RTTHREAD
#include <rtthread.h>
#include <stdarg.h>
#include "../lv_sprintf.h"
#if LV_USE_FLOAT == 1
#warning "lv_sprintf_rtthread: rtthread not support float in sprintf"
#endif
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
int lv_snprintf(char * buffer, size_t count, const char * format, ...)
{
va_list va;
va_start(va, format);
const int ret = rt_vsnprintf(buffer, count, format, va);
va_end(va);
return ret;
}
int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va)
{
return rt_vsnprintf(buffer, count, format, va);
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif /*LV_STDLIB_RTTHREAD*/
|