ChibiOS/HAL  7.0.3
chprintf.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
17 /**
18  * @file chprintf.h
19  * @brief Mini printf-like functionality.
20  *
21  * @addtogroup HAL_CHPRINTF
22  * @{
23  */
24 
25 #ifndef CHPRINTF_H
26 #define CHPRINTF_H
27 
28 #include <stdarg.h>
29 
30 /**
31  * @brief Float type support.
32  */
33 #if !defined(CHPRINTF_USE_FLOAT) || defined(__DOXYGEN__)
34 #define CHPRINTF_USE_FLOAT FALSE
35 #endif
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40  int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap);
41  int chprintf(BaseSequentialStream *chp, const char *fmt, ...);
42  int chsnprintf(char *str, size_t size, const char *fmt, ...);
43  int chvsnprintf(char *str, size_t size, const char *fmt, va_list ap);
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* CHPRINTF_H */
49 
50 /** @} */
Base stream class.
Definition: hal_streams.h:83
int chsnprintf(char *str, size_t size, const char *fmt,...)
System formatted output function.
Definition: chprintf.c:343
int chvsnprintf(char *str, size_t size, const char *fmt, va_list ap)
System formatted output function.
Definition: chprintf.c:384
int chprintf(BaseSequentialStream *chp, const char *fmt,...)
System formatted output function.
Definition: chprintf.c:305
int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap)
System formatted output function.
Definition: chprintf.c:122