Fork of original LPS331 library Changed the I2C address to 0xBA

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers typedef.h Source File

typedef.h

00001 //**********************
00002 // typedef for mbed
00003 //
00004 // Condition:
00005 //
00006 // (C)Copyright 2014 All rights reserved by Y.Onodera
00007 // http://einstlab.web.fc2.com
00008 //**********************
00009 #ifndef TYPEDEF_H
00010 #define TYPEDEF_H
00011 
00012 typedef unsigned char       BYTE;                           /* 8-bit unsigned  */
00013 typedef unsigned short int  WORD;                           /* 16-bit unsigned */
00014 typedef unsigned int        DWORD;                          /* 32-bit unsigned */
00015 typedef unsigned long long  QWORD;                          /* 64-bit unsigned */
00016 
00017 
00018 typedef union
00019 {
00020     WORD Val;
00021     BYTE v[2];
00022     short S;
00023     struct
00024     {
00025         BYTE LB;
00026         BYTE HB;
00027     } byte;
00028 } WORD_VAL;
00029 
00030 typedef union
00031 {
00032     DWORD Val;
00033     WORD w[2];
00034     BYTE v[4];
00035     struct
00036     {
00037         WORD LW;
00038         WORD HW;
00039     } word;
00040     struct
00041     {
00042         BYTE LB;
00043         BYTE HB;
00044         BYTE UB;
00045         BYTE MB;
00046     } byte;
00047     struct
00048     {
00049         WORD_VAL low;
00050         WORD_VAL high;
00051     }wordUnion;
00052 
00053 } DWORD_VAL;
00054 
00055 #endif /* TYPEDEF_H */