Mistake on this page?
Report an issue in GitHub or email us
print.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file print.h
4  *
5  * \brief Print functions.
6  *
7  * Copyright (c) 2015-2018 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 
25 #ifndef PRINT_H
26 #define PRINT_H
27 
28 #include <stdarg.h>
29 
30 #include "wsf_types.h"
31 
32 /*! \addtogroup WSF_UTIL_API
33  * \{ */
34 
35 /**************************************************************************************************
36  Macros
37 **************************************************************************************************/
38 
39 /*! \brief Print function attributes. */
40 #if defined(__GNUC__) || defined(__CC_ARM)
41 #define PRINT_ATTRIBUTE(a, b) __attribute__((format(printf, a, b)))
42 #else
43 #define PRINT_ATTRIBUTE(a, b)
44 #endif
45 
46 /*************************************************************************************************/
47 /*!
48  * \brief Print a trace message.
49  *
50  * \param pStr Storage for formatted string.
51  * \param size Maximum number of characters to store.
52  * \param pFmt Format string.
53  * \param ap Arguments.
54  *
55  * \return Number of characters stored.
56  */
57 /*************************************************************************************************/
58 uint32_t PrintVsn(char *pStr, uint32_t size, const char *pFmt, va_list ap) PRINT_ATTRIBUTE(3, 0);
59 
60 /*! \} */ /* WSF_UTIL_API */
61 
62 #endif /* PRINT_H */
#define PRINT_ATTRIBUTE(a, b)
Print function attributes.
Definition: print.h:43
uint32_t PrintVsn(char *pStr, uint32_t size, const char *pFmt, va_list ap)
Print a trace message.
Platform-independent data types.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.