inclinometer2 2.0.0.0
|
This file contains API for Inclinometer 2 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 | inclinometer2_s |
Inclinometer 2 Click context object. More... | |
struct | inclinometer2_cfg_t |
Inclinometer 2 Click configuration object. More... | |
Typedefs | |
typedef err_t(* | inclinometer2_master_io_t) (struct inclinometer2_s *, uint8_t, uint8_t *, uint8_t) |
typedef struct inclinometer2_s | inclinometer2_t |
Inclinometer 2 Click context object. | |
Enumerations | |
enum | inclinometer2_drv_t { INCLINOMETER2_DRV_SEL_SPI , INCLINOMETER2_DRV_SEL_I2C } |
Inclinometer 2 Click driver selector. More... | |
enum | inclinometer2_fsr_t { INCLINOMETER2_FSR_0p5G = 0x00 , INCLINOMETER2_FSR_3G , INCLINOMETER2_FSR_1G , INCLINOMETER2_FSR_2G , INCLINOMETER2_FSR_BIT_MASK = 0x0C } |
Inclinometer 2 Click accel full-scale range selection. More... | |
enum | inclinometer2_odr_t { INCLINOMETER2_ODR_POWER_DOWN = 0x00 , INCLINOMETER2_ODR_12p5HZ , INCLINOMETER2_ODR_26HZ , INCLINOMETER2_ODR_52HZ , INCLINOMETER2_ODR_104HZ , INCLINOMETER2_ODR_208HZ , INCLINOMETER2_ODR_416HZ , INCLINOMETER2_ODR_833HZ , INCLINOMETER2_ODR_BIT_MASK = 0xF0 } |
Inclinometer 2 Click output data rate. More... | |
enum | inclinometer2_return_value_t { INCLINOMETER2_OK = 0 , INCLINOMETER2_ERROR = -1 } |
Inclinometer 2 Click return value data. More... | |
Functions | |
void | inclinometer2_cfg_setup (inclinometer2_cfg_t *cfg) |
Inclinometer 2 configuration object setup function. | |
void | inclinometer2_drv_interface_selection (inclinometer2_cfg_t *cfg, inclinometer2_drv_t drv_sel) |
Inclinometer 2 driver interface setup function. | |
err_t | inclinometer2_init (inclinometer2_t *ctx, inclinometer2_cfg_t *cfg) |
Inclinometer 2 initialization function. | |
err_t | inclinometer2_default_cfg (inclinometer2_t *ctx) |
Inclinometer 2 default configuration function. | |
err_t | inclinometer2_generic_write (inclinometer2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Inclinometer 2 data writing function. | |
err_t | inclinometer2_generic_read (inclinometer2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Inclinometer 2 data reading function. | |
err_t | inclinometer2_write_register (inclinometer2_t *ctx, uint8_t reg, uint8_t data_in) |
Inclinometer 2 write register function. | |
err_t | inclinometer2_read_register (inclinometer2_t *ctx, uint8_t reg, uint8_t *data_out) |
Inclinometer 2 read register function. | |
err_t | inclinometer2_check_communication (inclinometer2_t *ctx) |
Inclinometer 2 check communication function. | |
uint8_t | inclinometer2_get_int_pin (inclinometer2_t *ctx) |
Inclinometer 2 get int pin function. | |
err_t | inclinometer2_set_fsr_and_odr (inclinometer2_t *ctx, inclinometer2_fsr_t fsr, inclinometer2_odr_t odr) |
Inclinometer 2 set fsr and odr function. | |
err_t | inclinometer2_get_accel (inclinometer2_t *ctx, float *x_axis, float *y_axis) |
Inclinometer 2 get accel function. | |
err_t | inclinometer2_get_temperature (inclinometer2_t *ctx, float *temperature) |
Inclinometer 2 get temperature function. | |
This file contains API for Inclinometer 2 Click Driver.
typedef err_t(* inclinometer2_master_io_t) (struct inclinometer2_s *, uint8_t, uint8_t *, uint8_t) |
Driver serial interface.
typedef struct inclinometer2_s inclinometer2_t |
Inclinometer 2 Click context object.
Context object definition of Inclinometer 2 Click driver.
enum inclinometer2_drv_t |
enum inclinometer2_fsr_t |
enum inclinometer2_odr_t |
Inclinometer 2 Click output data rate.
Predefined enum values for driver output data rate.