Andrew Miller / Mbed 2 deprecated FRDM_Serial

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Sentral.h Source File

Sentral.h

00001 #ifndef __SENTRAL_H
00002 #define __SENTRAL_H
00003 
00004 #define SENTRAL_DI02
00005 
00006 typedef struct {
00007   unsigned long AXIS_X;
00008   unsigned long AXIS_Y;
00009   unsigned long AXIS_Z;
00010   unsigned long AXIS_W;
00011 } QuaternionData;
00012 
00013 #define SENTRAL_EEPROM_ADDRESS 0xa0
00014 #define SENTRAL_ADDRESS 0x50
00015 #define SENTRAL_ACC_ADDRESS 0x1a
00016 #define SENTRAL_Q_ADDRESS 0x00
00017 
00018 void Setup_Sentral_EEPROM();
00019 int SentralGetQData(QuaternionData* buff);
00020 
00021 #define SentralAddress 0x50
00022 
00023 
00024 #ifdef SENTRAL_DI02
00025 #define RETURN_SUCCESS 1
00026 #define RETURN_FAILURE 0
00027 #define ENABLE_EVENTS_REG 0x33
00028 #define MAG_RATE_REG 0x55
00029 #define ACCEL_RATE_REG 0x56
00030 #define GYRO_RATE_REG 0x57
00031 #define HOST_CONTROL_REG 0x34
00032 #define SENTRAL_STATUS_REG 0x37
00033 #define PASSTHROUGH_CONFIG_REG 0xa0
00034 #define RESET_REQ_REG 0x9b
00035 #define REVISION_ID_REG 0x91
00036 #define HOST_STATUS_REG 0x92
00037 #define ALGORITHM_CONTROL 0x54
00038 
00039 #define DEFAULT_I2C_SPEED_KHZ 100
00040 
00041 //M_BED PORTS
00042 //int ResetSentral(UInt8 NewByte);
00043 //int Setup_Sentral(void); 
00044 unsigned int SentralSetup(Serial &pc,I2C &master);
00045 
00046 //M_BED ROUTINES
00047 #define AddrSA0_hi     0x52
00048 int Sentral_Power(int val =1);
00049 int Set_SA0(int val =0);
00050 void Sentral_Reset();
00051 void SA0_init();
00052 int Sentral_pass_through(Serial &pc,I2C &master, int recursion =0);
00053 
00054 
00055 
00056 
00057 #endif
00058 
00059 #endif