]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M0+_LPC51U68_LPCXpresso/utilities/fsl_str.h
Adding GCC/Keil/IAR projects for NXP LPC51U68 (CM0+).
[freertos] / FreeRTOS / Demo / CORTEX_M0+_LPC51U68_LPCXpresso / utilities / fsl_str.h
diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_LPCXpresso/utilities/fsl_str.h b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_LPCXpresso/utilities/fsl_str.h
new file mode 100644 (file)
index 0000000..8255aec
--- /dev/null
@@ -0,0 +1,66 @@
+/*\r
+ * Copyright 2017 NXP\r
+ * All rights reserved.\r
+ *\r
+ *\r
+ * SPDX-License-Identifier: BSD-3-Clause\r
+ *\r
+ */\r
+\r
+#ifndef _FSL_STR_H\r
+#define _FSL_STR_H\r
+\r
+#include "fsl_common.h"\r
+\r
+/*!\r
+ * @addtogroup debugconsole\r
+ * @{\r
+ */\r
+\r
+/*******************************************************************************\r
+ * Prototypes\r
+ ******************************************************************************/\r
+#if defined(__cplusplus)\r
+extern "C" {\r
+#endif /* __cplusplus */\r
+\r
+/*!\r
+ * @brief A function pointer which is used when format printf log.\r
+ */\r
+typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len);\r
+\r
+/*!\r
+ * @brief This function outputs its parameters according to a formatted string.\r
+ *\r
+ * @note I/O is performed by calling given function pointer using following\r
+ * (*func_ptr)(c);\r
+ *\r
+ * @param[in] fmt   Format string for printf.\r
+ * @param[in] ap  Arguments to printf.\r
+ * @param[in] buf  pointer to the buffer\r
+ * @param cb print callbck function pointer\r
+ *\r
+ * @return Number of characters to be print\r
+ */\r
+int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb);\r
+\r
+/*!\r
+ * @brief Converts an input line of ASCII characters based upon a provided\r
+ * string format.\r
+ *\r
+ * @param[in] line_ptr The input line of ASCII data.\r
+ * @param[in] format   Format first points to the format string.\r
+ * @param[in] args_ptr The list of parameters.\r
+ *\r
+ * @return Number of input items converted and assigned.\r
+ * @retval IO_EOF When line_ptr is empty string "".\r
+ */\r
+int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr);\r
+\r
+#if defined(__cplusplus)\r
+}\r
+#endif /* __cplusplus */\r
+\r
+/*! @} */\r
+\r
+#endif /* _FSL_STR_H */\r