#include "stm32l4xx.h"
#include "I2C.h"
#include "systick.h"


#ifndef stepkaj_LIS331DLH_h
#define stepkaj_LIS331DLH_h

#define LIS331DLH_ADDRESS	(uint8_t) 0x32


#define LIS331DLH_REG_WHO_AM_I 				(uint8_t) 0x0F
#define LIS331DLH_REG_CTRL_REG1 			(uint8_t) 0x20
#define LIS331DLH_REG_CTRL_REG2 			(uint8_t) 0x21
#define LIS331DLH_REG_CTRL_REG3 			(uint8_t) 0x22
#define LIS331DLH_REG_CTRL_REG4 			(uint8_t) 0x23
#define LIS331DLH_REG_CTRL_REG5 			(uint8_t) 0x24
#define LIS331DLH_REG_HP_FILTER_RESET (uint8_t) 0x25
#define LIS331DLH_REG_REFERENCE 			(uint8_t) 0x26
#define LIS331DLH_REG_STATUS_REG 			(uint8_t) 0x27
#define LIS331DLH_REG_OUT_X_L 				(uint8_t) 0x28
#define LIS331DLH_REG_OUT_X_H 				(uint8_t) 0x29
#define LIS331DLH_REG_OUT_Y_L 				(uint8_t) 0x2A
#define LIS331DLH_REG_OUT_Y_H 				(uint8_t) 0x2B
#define LIS331DLH_REG_OUT_Z_L 				(uint8_t) 0x2C
#define LIS331DLH_REG_OUT_Z_H 				(uint8_t) 0x2D
#define LIS331DLH_REG_INT1_CFG 				(uint8_t) 0x30
#define LIS331DLH_REG_INT1_SOURCE 		(uint8_t) 0x31
#define LIS331DLH_REG_INT1_THS 				(uint8_t) 0x32
#define LIS331DLH_REG_INT1_DURATION 	(uint8_t) 0x33
#define LIS331DLH_REG_INT2_CFG 				(uint8_t) 0x34
#define LIS331DLH_REG_INT2_SOURCE 		(uint8_t) 0x35
#define LIS331DLH_REG_INT2_THS 				(uint8_t) 0x36
#define LIS331DLH_REG_INT2_DURATION 	(uint8_t) 0x37


	int16_t LIS331DLH_Init(void);
	int16_t LIS3DH_ReadXYZ(int16_t* X, int16_t* Y, int16_t* Z);

#endif
