accel17 2.0.0.0
|
This file contains API for Accel 17 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 | accel17_t |
Accel 17 Click context object. More... | |
struct | accel17_cfg_t |
Accel 17 Click configuration object. More... | |
struct | accel17_axes_t |
Accel 17 Click axes data. More... | |
Macros | |
#define | ACCEL17_REG_ACCEL_CONFIG 0x00 |
Accel 17 description register. | |
#define | ACCEL17_REG_ACCEL_X_MSB 0x01 |
#define | ACCEL17_REG_ACCEL_X_LSB 0x02 |
#define | ACCEL17_REG_ACCEL_Y_MSB 0x03 |
#define | ACCEL17_REG_ACCEL_Y_LSB 0x04 |
#define | ACCEL17_TOEN_MASK 0x08 |
Accel 17 description setting. | |
#define | ACCEL17_TOEN_DISABLE 0x00 |
#define | ACCEL17_TOEN_ENABLE 0x08 |
#define | ACCEL17_BGTST_MASK 0x04 |
#define | ACCEL17_BGTST_NORMAL 0x00 |
#define | ACCEL17_BGTST_BANDGAP 0x04 |
#define | ACCEL17_ST_MASK 0x02 |
#define | ACCEL17_ST_OFF 0x00 |
#define | ACCEL17_ST_ON 0x02 |
#define | ACCEL17_PD_MASK 0x01 |
#define | ACCEL17_PD_ON 0x00 |
#define | ACCEL17_PD_DOWN 0x01 |
#define | ACCEL17_OFFSET 2048 |
Accel 17 calculation macros. | |
#define | ACCEL17_SENSITIVITY 512.0 |
#define | ACCEL17_DEGREE_RES 90 |
#define | ACCEL17_SET_DEV_ADDR 0x10 |
Accel 17 device address setting. | |
#define | ACCEL17_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | accel17_return_value_t { ACCEL17_OK = 0 , ACCEL17_ERROR = -1 } |
Accel 17 Click return value data. More... | |
Functions | |
void | accel17_cfg_setup (accel17_cfg_t *cfg) |
Accel 17 configuration object setup function. | |
err_t | accel17_init (accel17_t *ctx, accel17_cfg_t *cfg) |
Accel 17 initialization function. | |
err_t | accel17_default_cfg (accel17_t *ctx) |
Accel 17 default configuration function. | |
err_t | accel17_generic_write (accel17_t *ctx, uint8_t reg, uint8_t tx_data) |
Accel 17 I2C writing function. | |
err_t | accel17_generic_read (accel17_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Accel 17 I2C reading function. | |
err_t | accel17_get_axes_data (accel17_t *ctx, accel17_axes_t *axes) |
Accel data reading. | |
This file contains API for Accel 17 Click Driver.