tiltnshake 2.0.0.0
|
This file contains API for TILT-n-SHAKE Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | tiltnshake_t |
Click ctx object definition. More... | |
struct | tiltnshake_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | TILTNSHAKE_MAP_MIKROBUS(cfg, mikrobus) |
#define | TILTNSHAKE_OK 0 |
#define | TILTNSHAKE_ERROR -1 |
#define | TILTNSHAKE_MMA8491Q_I2C 0x55 |
#define | TILTNSHAKE_STATUS_REG 0x00 |
#define | TILTNSHAKE_DATA_READY 0x0F |
#define | TILTNSHAKE_OUT_X_MSB_REG 0x01 |
#define | TILTNSHAKE_OUT_X_LSB_REG 0x02 |
#define | TILTNSHAKE_OUT_Y_MSB_REG 0x03 |
#define | TILTNSHAKE_OUT_Y_LSB_REG 0x04 |
#define | TILTNSHAKE_OUT_Z_MSB 0x05 |
#define | TILTNSHAKE_OUT_Z_LSB 0x06 |
Functions | |
void | tiltnshake_cfg_setup (tiltnshake_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | tiltnshake_init (tiltnshake_t *ctx, tiltnshake_cfg_t *cfg) |
Initialization function. | |
void | tiltnshake_generic_write (tiltnshake_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | tiltnshake_generic_read (tiltnshake_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | tiltnshake_enable (tiltnshake_t *ctx) |
Function for enabling chip. | |
void | tiltnshake_disable (tiltnshake_t *ctx) |
Function for disabling chip. | |
void | tiltnshake_read_status_and_axis (tiltnshake_t *ctx, uint8_t *status, float *out_x, float *out_y, float *out_z) |
Function for read status and axis. | |
This file contains API for TILT-n-SHAKE Click driver.