Subversion Repositories Code-Repo

Rev

Blame | Last modification | View Log | RSS feed

#ifndef __imu_h
#define __imu_h

#define ACC_ADDRESS              0x30
#define LSM303_CTRL_REG1_A       0x20
#define LSM303_OUT_X_L_A         0x28
//#define LSM303_OUT_X_H_A         0X29
//#define LSM303_OUT_Y_L_A         0x2A
//#define LSM303_OUT_Y_H_A         0X2B
//#define LSM303_OUT_Z_L_A         0x2C
//#define LSM303_OUT_Z_H_A         0X2D

#define GYR_ADDRESS              0xD2
#define L3G4200D_CTRL_REG1       0x20
#define L3G4200D_OUT_X_L         0x28
//#define L3G4200D_OUT_X_H         0x29
//#define L3G4200D_OUT_Y_L         0x2A
//#define L3G4200D_OUT_Y_H         0x2B
//#define L3G4200D_OUT_Z_L         0x2C
//#define L3G4200D_OUT_Z_H         0x2D

void imu_init(void);
void imu_acc_init(void);
void imu_gyro_init(void);

void imu_read_acc(void);
void imu_read_gyro(void);

#endif