From 216ff3db4f94f79991c082331bafefc06590261f Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 16 Mar 2005 19:08:36 +0000 Subject: [PATCH] Moved from main project to PIC18 --- bacnet-stack/ports/pic18/stdbool.h | 28 ++++++++++++++++++++++++++++ bacnet-stack/ports/pic18/stdint.h | 18 ++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 bacnet-stack/ports/pic18/stdbool.h create mode 100644 bacnet-stack/ports/pic18/stdint.h diff --git a/bacnet-stack/ports/pic18/stdbool.h b/bacnet-stack/ports/pic18/stdbool.h new file mode 100644 index 00000000..29b9a5e4 --- /dev/null +++ b/bacnet-stack/ports/pic18/stdbool.h @@ -0,0 +1,28 @@ +#ifndef STDBOOL_H +#define STDBOOL_H + +// C99 Boolean types for compilers without C99 support + +#ifndef __cplusplus + typedef int _Bool; + #ifndef bool + #define bool _Bool + #endif + #ifndef true + #define true 1 + #endif + #ifndef false + #define false 0 + #endif + #define __bool_true_false_are_defined 1 +#endif + +#ifndef FALSE + #define FALSE 0 +#endif + +#ifndef TRUE + #define TRUE 1 +#endif + +#endif diff --git a/bacnet-stack/ports/pic18/stdint.h b/bacnet-stack/ports/pic18/stdint.h new file mode 100644 index 00000000..33554d8e --- /dev/null +++ b/bacnet-stack/ports/pic18/stdint.h @@ -0,0 +1,18 @@ +// Defines the standard integer types that are used in code + +#ifndef STDINT_H +#define STDINT_H 1 + +#include + +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 short long uint24_t; // 3 bytes 0 to 16777215 +typedef unsigned long uint32_t; // 4 bytes 0 to 4294967295 +typedef signed long int32_t; // 4 bytes -2147483647 to 2147483647 +// typedef signed long long int64_t; +// typedef unsigned long long uint64_t; + +#endif // STDINT_H