#include "i2c.h"
#include "mcc_generated_files/pin_manager.h"

#define ADXL345_ADD 0xA6

#define IICstart()  I2C_start()
#define IICrestart()    I2C_restart()
#define IICstop()   I2C_stop()
#define IICack()    I2C_ack()
#define IICnack()    I2C_nack()
#define IICsend(x)  I2C_send(x)  
#define IICread()   I2C_read()

uint8_t ADXL_write_register (uint8_t reg_add, uint8_t data);
uint8_t ADXL_read_register (uint8_t reg_add, uint8_t *data);
uint8_t ADXL_init (void);
uint8_t ADXL_xyz (int16_t *x, int16_t *y, int16_t *z);