si114x_types.h
Go to the documentation of this file.00001
00027 #ifndef SI114X_TYPES
00028 #define SI114X_TYPES
00029
00030
00035
00040 #include "stdint.h"
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00047 typedef signed char s8;
00048 typedef signed short s16;
00049 typedef signed int s32;
00050 typedef unsigned char u8;
00051 typedef unsigned short u16;
00052 typedef unsigned int u32;
00053
00054 typedef signed char S8;
00055 typedef signed short S16;
00056 typedef signed int S32;
00057 typedef unsigned char U8;
00058 typedef unsigned short U16;
00059 typedef unsigned int U32;
00060
00061 typedef void * HANDLE;
00062 typedef char * STRING;
00063 typedef s16 PT_RESULT;
00064 typedef s8 PT_BOOL;
00066
00067
00090 typedef struct
00091 {
00092 uint16_t sequence;
00093 uint16_t timestamp;
00094 uint8_t pad;
00095 uint8_t irqstat;
00096 uint16_t vis;
00097 uint16_t ir;
00098 uint16_t ps1;
00099 uint16_t ps2;
00100 uint16_t ps3;
00101 uint16_t aux;
00102 } SI114X_IRQ_SAMPLE;
00103
00105 #define code
00106 #define xdata
00107
00108 #define LSB 0
00109 #define MSB 1
00110 #define b0 0
00111 #define b1 1
00112 #define b2 2
00113 #define b3 3
00114
00115 typedef union uu16
00116 {
00117 u16 u16;
00118 s16 s16;
00119 u8 u8[2];
00120 s8 s8[2];
00121 } uu16;
00122
00123 typedef union uu32
00124 {
00125 u32 u32;
00126 s32 s32;
00127 uu16 uu16[2];
00128 u16 u16[2];
00129 s16 s16[2];
00130 u8 u8[4];
00131 s8 s8[4];
00132
00133 } uu32;
00134
00135 typedef char BIT;
00136
00137 #ifndef TRUE
00138 #define TRUE 0xff
00139 #endif
00140
00141 #ifndef FALSE
00142 #define FALSE 0
00143 #endif
00144
00145 #ifndef NULL
00146 #define NULL 0
00147 #endif
00148
00150
00151 #ifdef __cplusplus
00152 }
00153 #endif
00154
00158 #endif