accel3 2.0.0.0
|
This file contains API for Accel3 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | accel3_s |
Click ctx object definition. More... | |
struct | accel3_cfg_t |
Click configuration structure definition. More... | |
struct | accel3_data_t |
Accel data object definition. More... | |
Macros | |
#define | ACCEL3_MAP_MIKROBUS(cfg, mikrobus) |
#define | ACCEL3_MASTER_I2C 0 |
#define | ACCEL3_MASTER_SPI 1 |
#define | ACCEL3_RETVAL uint8_t |
#define | ACCEL3_OK 0x00 |
#define | ACCEL3_INIT_ERROR 0xFF |
#define | ACCEL3_I2C_ADDRESS 0x18 |
#define | ACCEL3_REG_WHO_AM_I 0x0F |
#define | ACCEL3_REG_HP_FILTER_RESET 0x25 |
#define | ACCEL3_REG_REFERENCE 0x26 |
#define | ACCEL3_REG_STATUS 0x27 |
#define | ACCEL3_CTRL_REG1 0x20 |
#define | ACCEL3_CTRL_REG2 0x21 |
#define | ACCEL3_CTRL_REG3 0x22 |
#define | ACCEL3_CTRL_REG4 0x23 |
#define | ACCEL3_CTRL_REG5 0x24 |
#define | ACCEL3_OUT_X_L 0x28 |
#define | ACCEL3_OUT_X_H 0x29 |
#define | ACCEL3_OUT_Y_L 0x2A |
#define | ACCEL3_OUT_Y_H 0x2B |
#define | ACCEL3_OUT_Z_L 0x2C |
#define | ACCEL3_OUT_Z_H 0x2D |
#define | ACCEL3_ENABLE_AXIS 0x27 |
#define | ACCEL3_FULL_SCALE 0x00 |
#define | ACCEL3_DATA_MASK 0x80 |
#define | ACCEL3_DEVICE_IDENTIFIER 0x32 |
#define | ACCEL3_TRUE 0x00 |
#define | ACCEL3_FALSE 0x01 |
#define | ACCEL3_START_VALUE 0x00 |
Typedefs | |
typedef uint8_t | accel3_select_t |
Communication type. | |
typedef void(* | accel3_master_io_t) (struct accel3_s *, uint8_t, uint8_t *, uint8_t) |
Master Input/Output type. | |
typedef struct accel3_s | accel3_t |
Click ctx object definition. | |
Functions | |
void | accel3_cfg_setup (accel3_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL3_RETVAL | accel3_init (accel3_t *ctx, accel3_cfg_t *cfg) |
Initialization function. | |
void | accel3_default_cfg (accel3_t *ctx, accel3_cfg_t *cfg) |
Click Default Configuration function. | |
void | accel3_generic_write (accel3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel3_generic_read (accel3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | accel3_check_id (accel3_t *ctx) |
Check Accel 3 ID function. | |
void | accel3_read_data (accel3_t *ctx, accel3_data_t *accel3_data) |
Get accelerometer data function. | |
This file contains API for Accel3 Click driver.