]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/utilities/fsl_str.h
Increase test coverage for queue sets.
[freertos] / FreeRTOS / Demo / CORTEX_M0+_LPC51U68_GCC_IAR_KEIL / utilities / fsl_str.h
1 /*\r
2  * Copyright 2017 NXP\r
3  * All rights reserved.\r
4  *\r
5  *\r
6  * SPDX-License-Identifier: BSD-3-Clause\r
7  *\r
8  */\r
9 \r
10 #ifndef _FSL_STR_H\r
11 #define _FSL_STR_H\r
12 \r
13 #include "fsl_common.h"\r
14 \r
15 /*!\r
16  * @addtogroup debugconsole\r
17  * @{\r
18  */\r
19 \r
20 /*******************************************************************************\r
21  * Prototypes\r
22  ******************************************************************************/\r
23 #if defined(__cplusplus)\r
24 extern "C" {\r
25 #endif /* __cplusplus */\r
26 \r
27 /*!\r
28  * @brief A function pointer which is used when format printf log.\r
29  */\r
30 typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len);\r
31 \r
32 /*!\r
33  * @brief This function outputs its parameters according to a formatted string.\r
34  *\r
35  * @note I/O is performed by calling given function pointer using following\r
36  * (*func_ptr)(c);\r
37  *\r
38  * @param[in] fmt   Format string for printf.\r
39  * @param[in] ap  Arguments to printf.\r
40  * @param[in] buf  pointer to the buffer\r
41  * @param cb print callbck function pointer\r
42  *\r
43  * @return Number of characters to be print\r
44  */\r
45 int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb);\r
46 \r
47 /*!\r
48  * @brief Converts an input line of ASCII characters based upon a provided\r
49  * string format.\r
50  *\r
51  * @param[in] line_ptr The input line of ASCII data.\r
52  * @param[in] format   Format first points to the format string.\r
53  * @param[in] args_ptr The list of parameters.\r
54  *\r
55  * @return Number of input items converted and assigned.\r
56  * @retval IO_EOF When line_ptr is empty string "".\r
57  */\r
58 int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr);\r
59 \r
60 #if defined(__cplusplus)\r
61 }\r
62 #endif /* __cplusplus */\r
63 \r
64 /*! @} */\r
65 \r
66 #endif /* _FSL_STR_H */\r