]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Added common types to common header.
authorCarlos Jenkins <carlos@jenkins.co.cr>
Wed, 22 May 2013 16:47:00 +0000 (18:47 +0200)
committerCarlos Jenkins <carlos@jenkins.co.cr>
Wed, 22 May 2013 16:47:00 +0000 (18:47 +0200)
rpp/include/rpp.h
rpp/include/types.h [new file with mode: 0644]

index f7e54140c6b377fb52b2c6de12ff665e4e1041c5..f86f4b498741e1b1a31e1021b96a362d41652673 100644 (file)
@@ -16,7 +16,7 @@
 #define LOW  0x0
 
 /* Standard includes */
-#include <stdbool.h>
+#include "types.h"
 #include "binary.h"
 
 /* Include configuration */
diff --git a/rpp/include/types.h b/rpp/include/types.h
new file mode 100644 (file)
index 0000000..0f72e34
--- /dev/null
@@ -0,0 +1,75 @@
+/**
+ * RPP API types definition header file.
+ *
+ * @file types.h
+ *
+ * @copyright Copyright (C) 2013 Czech Technical University in Prague
+ *
+ * @author Carlos Jenkins <carlos@jenkins.co.cr>
+ */
+
+#ifndef __RPP_TYPES_H
+#define __RPP_TYPES_H
+
+/** @def NULL
+*   @brief NULL definition
+*/
+#ifndef NULL
+#define NULL ((void *) 0U)
+#endif
+
+/** @def TRUE
+*   @brief definition for TRUE
+*/
+#ifndef TRUE
+#define TRUE 1U
+#endif
+
+/** @def FALSE
+*   @brief Boolean definition for FALSE
+*/
+#ifndef FALSE
+#define FALSE 0U
+#endif
+
+/** @def HIGH
+*   @brief Logic definition for logic HIGH
+*/
+#ifndef HIGH
+#define HIGH TRUE
+#endif
+
+/** @def LOW
+*   @brief Logic definition for logic LOW
+*/
+#ifndef LOW
+#define LOW FALSE
+#endif
+
+#ifndef _UINT64_T_DECLARED
+typedef unsigned long long uint64_t;
+#define        _UINT64_T_DECLARED
+#endif
+
+#ifndef _UINT32_T_DECLARED
+typedef unsigned int uint32_t;
+#define        _UINT32_T_DECLARED
+#endif
+
+#ifndef _UINT16_T_DECLARED
+typedef unsigned short uint16_t;
+#define        _UINT16_T_DECLARED
+#endif
+
+#ifndef _UINT8_T_DECLARED
+typedef unsigned char uint8_t;
+#define        _UINT8_T_DECLARED
+#endif
+
+#ifndef _BOOLEAN_T_DECLARED
+typedef unsigned char boolean_t;
+#define        _BOOLEAN_T_DECLARED
+#endif
+
+
+#endif /* __RPP_TYPES_H */