ChibiOS/HAL 9.0.0
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#include "hal.h"
31
32/**
33 * @brief Float type support.
34 */
35#if !defined(CHPRINTF_USE_FLOAT) || defined(__DOXYGEN__)
36#define CHPRINTF_USE_FLOAT FALSE
37#endif
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42 int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap);
43 int chprintf(BaseSequentialStream *chp, const char *fmt, ...);
44 int chsnprintf(char *str, size_t size, const char *fmt, ...);
45 int chvsnprintf(char *str, size_t size, const char *fmt, va_list ap);
46#ifdef __cplusplus
47}
48#endif
49
50#endif /* CHPRINTF_H */
51
52/** @} */
int chsnprintf(char *str, size_t size, const char *fmt,...)
System formatted output function.
Definition chprintf.c:403
int chprintf(BaseSequentialStream *chp, const char *fmt,...)
System formatted output function.
Definition chprintf.c:365
int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap)
System formatted output function.
Definition chprintf.c:124
int chvsnprintf(char *str, size_t size, const char *fmt, va_list ap)
System formatted output function.
Definition chprintf.c:444
HAL subsystem header.
Base stream class.
Definition hal_streams.h:90