1 /* 2 * Copyright 2020 NXP 3 * All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #ifndef _FSL_FORMAT_H_ 9 #define _FSL_FORMAT_H_ 10 11 #include "fsl_common.h" 12 13 /******************************************************************************* 14 * Definitions 15 ******************************************************************************/ 16 #ifndef CONVERT_STRING_LENGTH 17 #define CONVERT_STRING_LENGTH 12U 18 #endif 19 20 /*! ********************************************************************************* 21 ************************************************************************************* 22 * Public type definitions 23 ************************************************************************************* 24 ********************************************************************************** */ 25 26 /*! ********************************************************************************* 27 ************************************************************************************* 28 * Public functions 29 ************************************************************************************* 30 ********************************************************************************** */ 31 /*! 32 * @brief Convert a uint32 number to a string. 33 * 34 * Call this function to convert a uint32 to string. 35 * 36 * @param num Number to be converted. 37 * @return Returns the string converted. 38 */ 39 uint8_t *FORMAT_Dec2Str(uint32_t num); 40 41 /*! 42 * @brief Convert a hex to a ascii. 43 * 44 * Call this function to convert a hex to ascii. 45 * 46 * @param hex Hex to be converted. 47 * @return Returns the ascii converted. 48 */ 49 uint8_t *FORMAT_Hex2Ascii(uint8_t hex); 50 51 #endif /*_FSL_FORMAT_H_*/ 52