1 /****************************************************************************** 2 * @file data_types.h 3 ******************************************************************************* 4 * # License 5 * <b>Copyright 2024 Silicon Laboratories Inc. www.silabs.com</b> 6 ******************************************************************************* 7 * 8 * SPDX-License-Identifier: Zlib 9 * 10 * The licensor of this software is Silicon Laboratories Inc. 11 * 12 * This software is provided 'as-is', without any express or implied 13 * warranty. In no event will the authors be held liable for any damages 14 * arising from the use of this software. 15 * 16 * Permission is granted to anyone to use this software for any purpose, 17 * including commercial applications, and to alter it and redistribute it 18 * freely, subject to the following restrictions: 19 * 20 * 1. The origin of this software must not be misrepresented; you must not 21 * claim that you wrote the original software. If you use this software 22 * in a product, an acknowledgment in the product documentation would be 23 * appreciated but is not required. 24 * 2. Altered source versions must be plainly marked as such, and must not be 25 * misrepresented as being the original software. 26 * 3. This notice may not be removed or altered from any source distribution. 27 * 28 ******************************************************************************/ 29 /** @file data_types.h 30 * 31 * @brief This file contains data types defines 32 * 33 */ 34 35 #ifndef DATA_TYPES_H 36 #define DATA_TYPES_H 37 38 #include <stdint.h> 39 40 //! unsigned char is mapped to uint8 41 typedef uint8_t uint8; 42 //! char is mapped to int8 43 typedef int8_t int8; 44 //! unsigned short int is mapped as uint16 45 typedef uint16_t uint16; 46 //! short int is mapped as int16 47 typedef int16_t int16; 48 //! unsigned int is mapped as uint32 49 typedef uint32_t uint32; 50 //! int is mapped as uint32 51 typedef int32_t int32; 52 53 #ifdef SINGLE_IMAGE 54 55 typedef unsigned char UINT8; 56 typedef char INT8; 57 typedef unsigned short UINT16; 58 59 typedef char STR; /* 8-bit character */ 60 typedef unsigned short WSTR; /* 16-bit character */ 61 typedef unsigned char BYTE; /* 8-bit unsigned integer */ 62 typedef unsigned char UINT08; /* 8-bit unsigned integer */ 63 typedef signed char INT08; /* 8-bit signed integer */ 64 typedef signed short INT16; /* 16-bit signed integer */ 65 typedef unsigned int UINT32; /* 32-bit unsigned integer */ 66 typedef signed int INT32; /* 32-bit signed integer */ 67 typedef unsigned long long UINT64; /* 64-bit unsigned integer */ 68 typedef signed long long INT64; /* 64-bit signed integer */ 69 typedef unsigned long ULONG; /* 32-bit long unsigned. */ 70 typedef long LONG; /* 32-bit long signed. */ 71 typedef int INTSTK; /* Defines CPU stack word size (in octets). */ 72 typedef int INTBOOL; 73 typedef unsigned long SIZE_T; 74 typedef float FLOAT32; /* 32-bit floating point */ 75 typedef double FLOAT64; /* 64-bit floating point */ 76 typedef int INTERR; 77 78 typedef volatile BYTE REG_BYTE; /* 8-bit register */ 79 typedef volatile UINT16 REG_WORD16; /* 8-bit register */ 80 typedef volatile UINT32 REG_WORD32; 81 82 typedef char CHAR; 83 typedef unsigned char UCHAR; 84 typedef int INT; 85 typedef unsigned int UINT; 86 typedef short SHORT; 87 typedef unsigned short USHORT; 88 #endif /* SINGLE_IMAGE */ 89 90 #endif 91