#ifndef ACCELEROMETER_H_
#define ACCELEROMETER_H_

#endif /*ACCELEROMETER_H_*/


//added by Eric and Elysia
#define FF_MT_SRC                      0x16
/////////////////////////
#define ACCELEROMETER_I2C_ADDRESS      0x1D
#define WHO_AM_I                       0x0D
#define OUT_X_MSB                      0x01
#define XYZ_DATA_CFG                   0x0E
#define CTRL_REG1                      0x2A//System control
#define FF_MT_CFG                      0x15// WAS 0x10 Config Freefall/motion detection --SHOULD THIS BE 0x15? TROY
#define CTRL_REG4                      0x2D//INterrupt enable
#define CTRL_REG5                      0x2E//INterrupt enable 2
#define FF_MT_THS                      0x17
#define GSCALE                            2 // Sets full-scale range to +/-2, 4, or 8g. Used to calc real g values.

#define CR_STANDBY                     0x01

typedef unsigned char byte;

// function definitions
void accelerometer_write(unsigned char reg_addr, unsigned short data);
unsigned char accelerometer_read(unsigned char reg_addr);
void init_accelerometer();
void MMA8452Standby();
void MMA8452Active();
