HDC1000 library

Dependents:   Condensation_Monitor mbed_HDC1000 BLE_Condensation_Monitor GR-PEACH_TAMORI

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     struct
00023     {
00024         BYTE LB;
00025         BYTE HB;
00026     } byte;
00027 } WORD_VAL;
00028 
00029 typedef union
00030 {
00031     DWORD Val;
00032     WORD w[2];
00033     BYTE v[4];
00034     struct
00035     {
00036         WORD LW;
00037         WORD HW;
00038     } word;
00039     struct
00040     {
00041         BYTE LB;
00042         BYTE HB;
00043         BYTE UB;
00044         BYTE MB;
00045     } byte;
00046     struct
00047     {
00048         WORD_VAL low;
00049         WORD_VAL high;
00050     }wordUnion;
00051 
00052 } DWORD_VAL;
00053 
00054 #endif /* TYPEDEF_H */