accel2 2.0.0.0
|
This file contains API for Accel 2 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 | accel2_s |
Click ctx object definition. More... | |
struct | accel2_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | ACCEL2_MAP_MIKROBUS(cfg, mikrobus) |
#define | ACCEL2_MASTER_I2C 0 |
#define | ACCEL2_MASTER_SPI 1 |
#define | ACCEL2_RETVAL uint8_t |
#define | ACCEL2_OK 0x00 |
#define | ACCEL2_INIT_ERROR 0xFF |
#define | ACCEL2_INFO1 0x0D |
#define | ACCEL2_INFO2 0x0E |
#define | ACCEL2_WHO_AM_I 0x0F |
#define | ACCEL2_CTRL_REG3 0x23 |
#define | ACCEL2_CTRL_REG4 0x20 |
#define | ACCEL2_CTRL_REG5 0x24 |
#define | ACCEL2_CTRL_REG6 0x25 |
#define | ACCEL2_STATUS 0x27 |
#define | ACCEL2_OUT_T 0x0C |
#define | ACCEL2_OFF_X 0x10 |
#define | ACCEL2_OFF_Y 0x11 |
#define | ACCEL2_OFF_Z 0x12 |
#define | ACCEL2_CS_X 0x13 |
#define | ACCEL2_CS_Y 0x14 |
#define | ACCEL2_CS_Z 0x15 |
#define | ACCEL2_LC_L 0x16 |
#define | ACCEL2_LC_H 0x17 |
#define | ACCEL2_STAT 0x18 |
#define | ACCEL2_VFC_1 0x1B |
#define | ACCEL2_VFC_2 0x1C |
#define | ACCEL2_VFC_3 0x1D |
#define | ACCEL2_VFC_4 0x1E |
#define | ACCEL2_THRS3 0x1F |
#define | ACCEL2_OUT_X_L 0x28 |
#define | ACCEL2_OUT_X_H 0x29 |
#define | ACCEL2_OUT_Y_L 0x2A |
#define | ACCEL2_OUT_Y_H 0x2B |
#define | ACCEL2_OUT_Z_L 0x2C |
#define | ACCEL2_OUT_Z_H 0x2D |
#define | ACCEL2_FIFO_CTRL 0x2E |
#define | ACCEL2_FIFO_SRC 0x2F |
#define | ACCEL2_CTRL_REG1 0x21 |
#define | ACCEL2_ST1_1 0x40 |
#define | ACCEL2_ST2_1 0x41 |
#define | ACCEL2_ST3_1 0x42 |
#define | ACCEL2_ST4_1 0x43 |
#define | ACCEL2_ST5_1 0x44 |
#define | ACCEL2_ST6_1 0x45 |
#define | ACCEL2_ST7_1 0x46 |
#define | ACCEL2_ST8_1 0x47 |
#define | ACCEL2_ST9_1 0x48 |
#define | ACCEL2_ST10_1 0x49 |
#define | ACCEL2_ST11_1 0x4A |
#define | ACCEL2_ST12_1 0x4B |
#define | ACCEL2_ST13_1 0x4C |
#define | ACCEL2_ST14_1 0x4D |
#define | ACCEL2_ST15_1 0x4E |
#define | ACCEL2_ST16_1 0x4F |
#define | ACCEL2_TIM4_1 0x50 |
#define | ACCEL2_TIM3_1 0x51 |
#define | ACCEL2_TIM2_1_L 0x52 |
#define | ACCEL2_TIM2_1_H 0x53 |
#define | ACCEL2_TIM1_1_L 0x54 |
#define | ACCEL2_TIM1_1_H 0x55 |
#define | ACCEL2_THRS2_1 0x56 |
#define | ACCEL2_THRS1_1 0x57 |
#define | ACCEL2_MASK1_B 0x59 |
#define | ACCEL2_MASK1_A 0x5A |
#define | ACCEL2_SETT1 0x5B |
#define | ACCEL2_PR1 0x5C |
#define | ACCEL2_I2C_ADDRESS = 0x1D |
Typedefs | |
typedef uint8_t | accel2_select_t |
Communication type. | |
typedef void(* | accel2_master_io_t) (struct accel2_s *, uint8_t, uint8_t *, uint8_t) |
Master Input/Output type. | |
typedef struct accel2_s | accel2_t |
Click ctx object definition. | |
Functions | |
void | accel2_cfg_setup (accel2_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL2_RETVAL | accel2_init (accel2_t *ctx, accel2_cfg_t *cfg) |
Initialization function. | |
void | accel2_generic_write (accel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel2_generic_read (accel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | accel2_setting (accel2_t *ctx) |
Initializes function. | |
uint8_t | accel2_check_id (accel2_t *ctx) |
Check Accel 2 ID. | |
int16_t | accel2_read_xaxis (accel2_t *ctx) |
Function read X axis. | |
int16_t | accel2_read_yaxis (accel2_t *ctx) |
Function read Y axis. | |
int16_t | accel2_read_zaxis (accel2_t *ctx) |
Function read Z axis. | |
This file contains API for Accel 2 Click driver.