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