accel20 2.0.0.0
|
This file contains API for Accel 20 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | accel20_s |
Accel 20 Click context object. More... | |
struct | accel20_cfg_t |
Accel 20 Click configuration object. More... | |
struct | accel20_axis_t |
Accel 20 axis data structure. More... | |
Typedefs | |
typedef err_t(* | accel20_master_io_t) (struct accel20_s *, uint8_t, uint8_t *, uint8_t) |
Accel 20 Click driver interface. | |
typedef struct accel20_s | accel20_t |
Accel 20 Click context object. | |
Enumerations | |
enum | accel20_drv_t { ACCEL20_DRV_SEL_SPI , ACCEL20_DRV_SEL_I2C } |
Accel 20 Click driver selector. More... | |
enum | accel20_return_value_t { ACCEL20_OK = 0 , ACCEL20_ERROR = -1 } |
Accel 20 Click return value data. More... | |
Functions | |
void | accel20_cfg_setup (accel20_cfg_t *cfg) |
Accel 20 configuration object setup function. | |
void | accel20_drv_interface_selection (accel20_cfg_t *cfg, accel20_drv_t drv_sel) |
Accel 20 driver interface setup function. | |
err_t | accel20_init (accel20_t *ctx, accel20_cfg_t *cfg) |
Accel 20 initialization function. | |
err_t | accel20_default_cfg (accel20_t *ctx) |
Accel 20 default configuration function. | |
err_t | accel20_generic_write (accel20_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Accel 20 data writing function. | |
err_t | accel20_generic_read (accel20_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Accel 20 data reading function. | |
err_t | accel20_soft_reset (accel20_t *ctx) |
Accel 20 soft reset function. | |
err_t | accel20_check_id (accel20_t *ctx) |
Accel 20 check ID function. | |
uint8_t | accel20_data_ready (accel20_t *ctx) |
Accel 20 check data ready function. | |
err_t | accel20_set_operating_mode (accel20_t *ctx, uint8_t op_mode) |
Accel 20 set operating mode function. | |
err_t | accel20_enable_int_1_pin (accel20_t *ctx) |
Accel 20 enable INT 1 pin function. | |
err_t | accel20_enable_int_2_pin (accel20_t *ctx) |
Accel 20 enable INT 2 pin function. | |
err_t | accel20_set_accel_range (accel20_t *ctx, uint8_t range) |
Accel 20 set accel range function. | |
err_t | accel20_set_output_data_rate (accel20_t *ctx, uint8_t odr) |
Accel 20 set output data rate function. | |
err_t | accel20_get_axis_data (accel20_t *ctx, accel20_axis_t *axis) |
Accel 20 get accelerometer axis function. | |
err_t | accel20_set_trigger (accel20_t *ctx, uint8_t en_trg) |
Accel 20 set trigger function. | |
uint8_t | accel20_get_int_1 (accel20_t *ctx) |
Accel 20 get Interrupt 1 function. | |
uint8_t | accel20_get_int_2 (accel20_t *ctx) |
Accel 20 get Interrupt 2 function. | |
This file contains API for Accel 20 Click Driver.
typedef err_t(* accel20_master_io_t) (struct accel20_s *, uint8_t, uint8_t *, uint8_t) |
Accel 20 Click driver interface.
Definition of driver interface of Accel 20 Click driver. Driver serial interface.
Accel 20 Click context object.
Context object definition of Accel 20 Click driver.
enum accel20_drv_t |