MPU6050のサンプルプログラム2

Dependencies:   ConfigFile SDFileSystem mbed

Fork of LAURUS_program by LAURUS

LPS25H/typedef.h

Committer:
ojan
Date:
2015-05-30
Revision:
3:5358a691a100
Parent:
0:bc6f14fc60c7

File content as of revision 3:5358a691a100:

//**********************
// typedef for mbed
//
// Condition:
//
// (C)Copyright 2014 All rights reserved by Y.Onodera
// http://einstlab.web.fc2.com
//**********************
#ifndef TYPEDEF_H
#define TYPEDEF_H

namespace LPS_Typedef {

    typedef unsigned char       BYTE;                           /* 8-bit unsigned  */
    typedef unsigned short int  WORD;                           /* 16-bit unsigned */
    typedef unsigned int        DWORD;                          /* 32-bit unsigned */
    typedef unsigned long long  QWORD;                          /* 64-bit unsigned */
    
    
    typedef union
    {
        WORD Val;
        BYTE v[2];
        short S;
        struct
        {
            BYTE LB;
            BYTE HB;
        } byte;
    } WORD_VAL;
    
    typedef union
    {
        DWORD Val;
        WORD w[2];
        BYTE v[4];
        struct
        {
            WORD LW;
            WORD HW;
        } word;
        struct
        {
            BYTE LB;
            BYTE HB;
            BYTE UB;
            BYTE MB;
        } byte;
        struct
        {
            WORD_VAL low;
            WORD_VAL high;
        }wordUnion;
    
    } DWORD_VAL;

}

#endif /* TYPEDEF_H */