Cordio Stack and Cordio Profiles  r2p3-02rel0
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  * ARM Ltd. confidential and proprietary.
9  *
10  * IMPORTANT. Your use of this file is governed by a Software License Agreement
11  * ("Agreement") that must be accepted in order to download or otherwise receive a
12  * copy of this file. You may not use or copy this file for any purpose other than
13  * as described in the Agreement. If you do not agree to all of the terms of the
14  * Agreement do not use this file and delete all copies in your possession or control;
15  * if you do not have a copy of the Agreement, you must contact ARM Ltd. prior
16  * to any use, copying or further distribution of this software.
17  */
18 /*************************************************************************************************/
19 
20 #ifndef PRINT_H
21 #define PRINT_H
22 
23 #include <stdarg.h>
24 
25 #include "wsf_types.h"
26 
27 /*! \addtogroup WSF_UTIL_API
28  * \{ */
29 
30 /**************************************************************************************************
31  Macros
32 **************************************************************************************************/
33 
34 /*! \brief Print function attributes. */
35 #if defined(__GNUC__) || defined(__CC_ARM)
36 #define PRINT_ATTRIBUTE(a, b) __attribute__((format(printf, a, b)))
37 #else
38 #define PRINT_ATTRIBUTE(a, b)
39 #endif
40 
41 /*************************************************************************************************/
42 /*!
43  * \brief Print a trace message.
44  *
45  * \param pStr Storage for formatted string.
46  * \param size Maximum number of characters to store.
47  * \param pFmt Format string.
48  * \param ap Arguments.
49  *
50  * \return Number of characters stored.
51  */
52 /*************************************************************************************************/
53 uint32_t PrintVsn(char *pStr, uint32_t size, const char *pFmt, va_list ap) PRINT_ATTRIBUTE(3, 0);
54 
55 /*! \} */ /* WSF_UTIL_API */
56 
57 #endif /* PRINT_H */
#define PRINT_ATTRIBUTE(a, b)
Print function attributes.
Definition: print.h:38
uint32_t PrintVsn(char *pStr, uint32_t size, const char *pFmt, va_list ap) PRINT_ATTRIBUTE(3
Print a trace message.
Platform-independent data types.
unsigned long uint32_t
Unsigned 32-bit value.
Definition: wsf_types.h:71