31 #include <mraa/gpio.h> 33 #include "mma7660_regs.h" 52 mraa_gpio_context gpio;
81 uint8_t reg, uint8_t byte);
104 int *x,
int *y,
int *z);
116 float *ax,
float *ay,
float *az);
128 MMA7660_REG_T axis,
int *val);
217 void (*isr)(
void *),
void *arg);
247 MMA7660_AUTOSLEEP_T sr);
upm_result_t mma7660_set_interrupt_bits(const mma7660_context dev, uint8_t ibits)
Definition: mma7660.c:329
upm_result_t mma7660_install_isr(const mma7660_context dev, int pin, void(*isr)(void *), void *arg)
Definition: mma7660.c:293
upm_result_t mma7660_write_byte(const mma7660_context dev, uint8_t reg, uint8_t byte)
Definition: mma7660.c:85
upm_result_t mma7660_read_byte(const mma7660_context dev, uint8_t reg, uint8_t *byte)
Definition: mma7660.c:99
upm_result_t mma7660_tilt_tap(const mma7660_context dev, bool *tap)
Definition: mma7660.c:261
upm_result_t mma7660_set_mode_standby(const mma7660_context dev)
Definition: mma7660.c:163
upm_result_t mma7660_get_verified_axis(const mma7660_context dev, MMA7660_REG_T axis, int *val)
Definition: mma7660.c:180
upm_result_t mma7660_set_sample_rate(const mma7660_context dev, MMA7660_AUTOSLEEP_T sr)
Definition: mma7660.c:337
upm_result_t mma7660_set_mode_active(const mma7660_context dev)
Definition: mma7660.c:147
mma7660_context mma7660_init(int bus, uint8_t address)
Definition: mma7660.c:29
upm_result_t mma7660_get_acceleration(const mma7660_context dev, float *ax, float *ay, float *az)
Definition: mma7660.c:345
struct _mma7660_context * mma7660_context
upm_result_t mma7660_get_raw_values(const mma7660_context dev, int *x, int *y, int *z)
Definition: mma7660.c:122
upm_result_t mma7660_tilt_back_front(const mma7660_context dev, uint8_t *bits)
Definition: mma7660.c:232
upm_result_t mma7660_tilt_shake(const mma7660_context dev, bool *shake)
Definition: mma7660.c:277
void mma7660_uninstall_isr(const mma7660_context dev)
Definition: mma7660.c:316
upm_result_t mma7660_get_verified_tilt(const mma7660_context dev, uint8_t *val)
Definition: mma7660.c:213
upm_result_t mma7660_tilt_landscape_portrait(const mma7660_context dev, uint8_t *bits)
Definition: mma7660.c:246
void mma7660_close(mma7660_context dev)
Definition: mma7660.c:70