f806c5829b
* pre-commit: Update and enable clang-format check There is newer version from clang-format so use that. We do not yet want 18 as that is little bit too new. * Format some thing by hand which clang-format "breaks" Clang-format will format some things little bit off in some cases. Format some things by hand so we get cleaner end result. * Run clang-format with ``` pre-commit run --all-files clang-format ``` We have already in previously checked places where clang-format does not make good format and ignored those (hopefully most of the things). --------- Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
28 lines
786 B
C
28 lines
786 B
C
/* Defines the standard integer types that are used in code */
|
|
|
|
#ifndef STDINT_H
|
|
#define STDINT_H 1
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef unsigned char uint8_t; /* 1 byte 0 to 255 */
|
|
typedef signed char int8_t; /* 1 byte -127 to 127 */
|
|
typedef unsigned short uint16_t; /* 2 bytes 0 to 65535 */
|
|
typedef signed short int16_t; /* 2 bytes -32767 to 32767 */
|
|
typedef unsigned long uint32_t; /* 4 bytes 0 to 4294967295 */
|
|
typedef signed long int32_t; /* 4 bytes -2147483647 to 2147483647 */
|
|
|
|
#define INT8_MIN (-128)
|
|
#define INT16_MIN (-32768)
|
|
#define INT32_MIN (-2147483647 - 1)
|
|
|
|
#define INT8_MAX 127
|
|
#define INT16_MAX 32767
|
|
#define INT32_MAX 2147483647
|
|
|
|
#define UINT8_MAX 0xff /* 255U */
|
|
#define UINT16_MAX 0xffff /* 65535U */
|
|
#define UINT32_MAX 0xffffffff /* 4294967295U */
|
|
|
|
#endif /* STDINT_H */
|