X-Git-Url: https://git.karo-electronics.de/?p=oswald.git;a=blobdiff_plain;f=metawatch%2Fmw_acc.h;fp=metawatch%2Fmw_acc.h;h=2acf7c7b9e7b2498b2d08c3cf3d3f99e5709b062;hp=59cee9337364fd100ea464de316fd8a475e0c577;hb=133faed023f55592a87ee1b8dbc74bc4a8917006;hpb=a9be019ac653badc27a55c94b8d50122eadf8c5f diff --git a/metawatch/mw_acc.h b/metawatch/mw_acc.h index 59cee93..2acf7c7 100644 --- a/metawatch/mw_acc.h +++ b/metawatch/mw_acc.h @@ -99,11 +99,22 @@ #define TFUM (1 << 0) /* INT_SRC_REG2 */ -#define INT_TAP_SINGLE (0x04) -#define INT_TAP_DOUBLE (0x08) +#define INT_TPS 0x01 +#define INT_WUFS 0x02 +#define INT_TAP_SINGLE 0x04 +#define INT_TAP_DOUBLE 0x08 +#define INT_DRDY 0x10 -/* for readability */ -#define ONE_BYTE ( 1 ) -#endif +void mw_acc_init_i2c(void); +void mw_acc_disable_i2c(void); +void mw_acc_i2c_read(const uint8_t RegisterAddress, uint8_t *pData, const uint8_t Length); +void mw_acc_i2c_write(uint8_t RegisterAddress, uint8_t *pData, uint8_t Length); + +void mw_acc_init(void); +void mw_acc_enable(void); +void mw_acc_disable(void); +void mw_acc_read(int16_t *x, int16_t *y, int16_t *z); +void mw_acc_handle_irq(void); +#endif