Interface definition for the MMA7660 accelerometer driver. More...
Interface definition for the MMA7660 accelerometer driver.
Definition in file mma7660.h.
Go to the source code of this file.
Data Structures | |
struct | mma7660_params_t |
Parameters for an MMA7660 device. More... | |
struct | mma7660_t |
Device descriptor for an MMA7660 device. More... | |
struct | mma7660_data_t |
Data type for the result data. More... | |
Enumerations | |
enum | { MMA7660_OK , MMA7660_I2C_ERR , MMA7660_I2C_READ_ERR , MMA7660_I2C_WRITE_ERR , MMA7660_READ_ERR } |
Return codes. More... | |
Functions | |
int | mma7660_init (mma7660_t *dev, const mma7660_params_t *params) |
Initialize an MMA7660 device. | |
int | mma7660_set_mode (const mma7660_t *dev, uint8_t active, uint8_t autowake, uint8_t autosleep, uint8_t prescale) |
Set the mode register. | |
int | mma7660_read_tilt (const mma7660_t *dev, uint8_t *res) |
Read the tilt register. | |
int | mma7660_write_sleep_count (const mma7660_t *dev, uint8_t sleep) |
Write the sleep count register. | |
int | mma7660_config_interrupts (const mma7660_t *dev, uint8_t isource_flags) |
Configure the interrupt sources. | |
int | mma7660_config_samplerate (const mma7660_t *dev, uint8_t amsr, uint8_t awsr, uint8_t filt) |
Configure the sample rate. | |
int | mma7660_config_pdet (const mma7660_t *dev, uint8_t pdth, uint8_t enabled_axes) |
Configure the tap detection. | |
int | mma7660_config_pd (const mma7660_t *dev, uint8_t pd) |
Configure the tap detection debounce count. | |
int | mma7660_read (const mma7660_t *dev, mma7660_data_t *data) |
Read the acceleration counts converted to mG. | |
int | mma7660_read_counts (const mma7660_t *dev, int8_t *x, int8_t *y, int8_t *z) |
Read the acceleration counts (unconverted) | |