SHT30-DIS-B Library
Dependents: M1DK_Skywire_Demo M1DK_Skywire_Demo1
Fork of LPS331 by
typedef.h@1:f70e671b008f, 2014-10-10 (annotated)
- Committer:
- yasuyuki
- Date:
- Fri Oct 10 04:37:48 2014 +0000
- Revision:
- 1:f70e671b008f
- Parent:
- 0:ef4f624dc3ec
H last
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yasuyuki | 0:ef4f624dc3ec | 1 | //********************** |
yasuyuki | 0:ef4f624dc3ec | 2 | // typedef for mbed |
yasuyuki | 0:ef4f624dc3ec | 3 | // |
yasuyuki | 0:ef4f624dc3ec | 4 | // Condition: |
yasuyuki | 0:ef4f624dc3ec | 5 | // |
yasuyuki | 0:ef4f624dc3ec | 6 | // (C)Copyright 2014 All rights reserved by Y.Onodera |
yasuyuki | 0:ef4f624dc3ec | 7 | // http://einstlab.web.fc2.com |
yasuyuki | 0:ef4f624dc3ec | 8 | //********************** |
yasuyuki | 0:ef4f624dc3ec | 9 | #ifndef TYPEDEF_H |
yasuyuki | 0:ef4f624dc3ec | 10 | #define TYPEDEF_H |
yasuyuki | 0:ef4f624dc3ec | 11 | |
yasuyuki | 0:ef4f624dc3ec | 12 | typedef unsigned char BYTE; /* 8-bit unsigned */ |
yasuyuki | 0:ef4f624dc3ec | 13 | typedef unsigned short int WORD; /* 16-bit unsigned */ |
yasuyuki | 0:ef4f624dc3ec | 14 | typedef unsigned int DWORD; /* 32-bit unsigned */ |
yasuyuki | 0:ef4f624dc3ec | 15 | typedef unsigned long long QWORD; /* 64-bit unsigned */ |
yasuyuki | 0:ef4f624dc3ec | 16 | |
yasuyuki | 0:ef4f624dc3ec | 17 | |
yasuyuki | 0:ef4f624dc3ec | 18 | typedef union |
yasuyuki | 0:ef4f624dc3ec | 19 | { |
yasuyuki | 0:ef4f624dc3ec | 20 | WORD Val; |
yasuyuki | 0:ef4f624dc3ec | 21 | BYTE v[2]; |
yasuyuki | 1:f70e671b008f | 22 | short S; |
yasuyuki | 0:ef4f624dc3ec | 23 | struct |
yasuyuki | 0:ef4f624dc3ec | 24 | { |
yasuyuki | 0:ef4f624dc3ec | 25 | BYTE LB; |
yasuyuki | 0:ef4f624dc3ec | 26 | BYTE HB; |
yasuyuki | 0:ef4f624dc3ec | 27 | } byte; |
yasuyuki | 0:ef4f624dc3ec | 28 | } WORD_VAL; |
yasuyuki | 0:ef4f624dc3ec | 29 | |
yasuyuki | 0:ef4f624dc3ec | 30 | typedef union |
yasuyuki | 0:ef4f624dc3ec | 31 | { |
yasuyuki | 0:ef4f624dc3ec | 32 | DWORD Val; |
yasuyuki | 0:ef4f624dc3ec | 33 | WORD w[2]; |
yasuyuki | 0:ef4f624dc3ec | 34 | BYTE v[4]; |
yasuyuki | 0:ef4f624dc3ec | 35 | struct |
yasuyuki | 0:ef4f624dc3ec | 36 | { |
yasuyuki | 0:ef4f624dc3ec | 37 | WORD LW; |
yasuyuki | 0:ef4f624dc3ec | 38 | WORD HW; |
yasuyuki | 0:ef4f624dc3ec | 39 | } word; |
yasuyuki | 0:ef4f624dc3ec | 40 | struct |
yasuyuki | 0:ef4f624dc3ec | 41 | { |
yasuyuki | 0:ef4f624dc3ec | 42 | BYTE LB; |
yasuyuki | 0:ef4f624dc3ec | 43 | BYTE HB; |
yasuyuki | 0:ef4f624dc3ec | 44 | BYTE UB; |
yasuyuki | 0:ef4f624dc3ec | 45 | BYTE MB; |
yasuyuki | 0:ef4f624dc3ec | 46 | } byte; |
yasuyuki | 0:ef4f624dc3ec | 47 | struct |
yasuyuki | 0:ef4f624dc3ec | 48 | { |
yasuyuki | 0:ef4f624dc3ec | 49 | WORD_VAL low; |
yasuyuki | 0:ef4f624dc3ec | 50 | WORD_VAL high; |
yasuyuki | 0:ef4f624dc3ec | 51 | }wordUnion; |
yasuyuki | 0:ef4f624dc3ec | 52 | |
yasuyuki | 0:ef4f624dc3ec | 53 | } DWORD_VAL; |
yasuyuki | 0:ef4f624dc3ec | 54 | |
yasuyuki | 0:ef4f624dc3ec | 55 | #endif /* TYPEDEF_H */ |