smartdof5  2.1.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions
smartdof5.h File Reference

This file contains API for Smart DOF 5 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  smartdof5_s
 Smart DOF 5 Click context object. More...
 
struct  smartdof5_cfg_t
 Smart DOF 5 Click configuration object. More...
 
struct  smartdof5_axes_t
 Smart DOF 5 Click axes data structure. More...
 
struct  smartdof5_data_t
 Smart DOF 5 Click data structure. More...
 

Macros

#define SMARTDOF5_REG_FUNC_CFG_ACCESS   0x01
 Smart DOF 5 user memory register list. More...
 
#define SMARTDOF5_REG_PIN_CTRL   0x02
 
#define SMARTDOF5_REG_FIFO_CTRL1   0x07
 
#define SMARTDOF5_REG_FIFO_CTRL2   0x08
 
#define SMARTDOF5_REG_FIFO_CTRL3   0x09
 
#define SMARTDOF5_REG_FIFO_CTRL4   0x0A
 
#define SMARTDOF5_REG_COUNTER_BDR_1   0x0B
 
#define SMARTDOF5_REG_COUNTER_BDR_2   0x0C
 
#define SMARTDOF5_REG_INT1_CTRL   0x0D
 
#define SMARTDOF5_REG_INT2_CTRL   0x0E
 
#define SMARTDOF5_REG_WHO_AM_I   0x0F
 
#define SMARTDOF5_REG_CTRL1_XL   0x10
 
#define SMARTDOF5_REG_CTRL2_G   0x11
 
#define SMARTDOF5_REG_CTRL3_C   0x12
 
#define SMARTDOF5_REG_CTRL4_C   0x13
 
#define SMARTDOF5_REG_CTRL5_C   0x14
 
#define SMARTDOF5_REG_CTRL6_C   0x15
 
#define SMARTDOF5_REG_CTRL7_G   0x16
 
#define SMARTDOF5_REG_CTRL8_XL   0x17
 
#define SMARTDOF5_REG_CTRL9_XL   0x18
 
#define SMARTDOF5_REG_CTRL10_C   0x19
 
#define SMARTDOF5_REG_ALL_INT_SRC   0x1A
 
#define SMARTDOF5_REG_WAKE_UP_SRC   0x1B
 
#define SMARTDOF5_REG_D6D_SRC   0x1D
 
#define SMARTDOF5_REG_STATUS   0x1E
 
#define SMARTDOF5_REG_OUT_TEMP_L   0x20
 
#define SMARTDOF5_REG_OUT_TEMP_H   0x21
 
#define SMARTDOF5_REG_OUTX_L_G   0x22
 
#define SMARTDOF5_REG_OUTX_H_G   0x23
 
#define SMARTDOF5_REG_OUTY_L_G   0x24
 
#define SMARTDOF5_REG_OUTY_H_G   0x25
 
#define SMARTDOF5_REG_OUTZ_L_G   0x26
 
#define SMARTDOF5_REG_OUTZ_H_G   0x27
 
#define SMARTDOF5_REG_OUTX_L_A   0x28
 
#define SMARTDOF5_REG_OUTX_H_A   0x29
 
#define SMARTDOF5_REG_OUTY_L_A   0x2A
 
#define SMARTDOF5_REG_OUTY_H_A   0x2B
 
#define SMARTDOF5_REG_OUTZ_L_A   0x2C
 
#define SMARTDOF5_REG_OUTZ_H_A   0x2D
 
#define SMARTDOF5_REG_EMB_FUNC_STATUS_MAINPAGE   0x35
 
#define SMARTDOF5_REG_FSM_STATUS_A_MAINPAGE   0x36
 
#define SMARTDOF5_REG_FSM_STATUS_B_MAINPAGE   0x37
 
#define SMARTDOF5_REG_MLC_STATUS_MAINPAGE   0x38
 
#define SMARTDOF5_REG_STATUS_MASTER_MAINPAGE   0x39
 
#define SMARTDOF5_REG_FIFO_STATUS1   0x3A
 
#define SMARTDOF5_REG_FIFO_STATUS2   0x3B
 
#define SMARTDOF5_REG_TIMESTAMP0   0x40
 
#define SMARTDOF5_REG_TIMESTAMP1   0x41
 
#define SMARTDOF5_REG_TIMESTAMP2   0x42
 
#define SMARTDOF5_REG_TIMESTAMP3   0x43
 
#define SMARTDOF5_REG_INT_CFG0   0x56
 
#define SMARTDOF5_REG_INT_CFG1   0x58
 
#define SMARTDOF5_REG_THS_6D   0x59
 
#define SMARTDOF5_REG_WAKE_UP_THS   0x5B
 
#define SMARTDOF5_REG_WAKE_UP_DUR   0x5C
 
#define SMARTDOF5_REG_FREE_FALL   0x5D
 
#define SMARTDOF5_REG_MD1_CFG   0x5E
 
#define SMARTDOF5_REG_MD2_CFG   0x5F
 
#define SMARTDOF5_REG_I3C_BUS_AVB   0x62
 
#define SMARTDOF5_REG_INTERNAL_FREQ_FINE   0x63
 
#define SMARTDOF5_REG_X_OFS_USR   0x73
 
#define SMARTDOF5_REG_Y_OFS_USR   0x74
 
#define SMARTDOF5_REG_Z_OFS_USR   0x75
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_TAG   0x78
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_X_L   0x79
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_X_H   0x7A
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_Y_L   0x7B
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_Y_H   0x7C
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_Z_L   0x7D
 
#define SMARTDOF5_REG_FIFO_DATA_OUT_Z_H   0x7E
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_1   0x02
 Smart DOF 5 sensor hub register list. More...
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_2   0x03
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_3   0x04
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_4   0x05
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_5   0x06
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_6   0x07
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_7   0x08
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_8   0x09
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_9   0x0A
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_10   0x0B
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_11   0x0C
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_12   0x0D
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_13   0x0E
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_14   0x0F
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_15   0x10
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_16   0x11
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_17   0x12
 
#define SMARTDOF5_REG_SHUB_SENSOR_HUB_18   0x13
 
#define SMARTDOF5_REG_SHUB_MASTER_CONFIG   0x14
 
#define SMARTDOF5_REG_SHUB_SLV0_ADD   0x15
 
#define SMARTDOF5_REG_SHUB_SLV0_SUBADD   0x16
 
#define SMARTDOF5_REG_SHUB_SLV0_CONFIG   0x17
 
#define SMARTDOF5_REG_SHUB_SLV1_ADD   0x18
 
#define SMARTDOF5_REG_SHUB_SLV1_SUBADD   0x19
 
#define SMARTDOF5_REG_SHUB_SLV1_CONFIG   0x1A
 
#define SMARTDOF5_REG_SHUB_SLV2_ADD   0x1B
 
#define SMARTDOF5_REG_SHUB_SLV2_SUBADD   0x1C
 
#define SMARTDOF5_REG_SHUB_SLV2_CONFIG   0x1D
 
#define SMARTDOF5_REG_SHUB_SLV3_ADD   0x1E
 
#define SMARTDOF5_REG_SHUB_SLV3_SUBADD   0x1F
 
#define SMARTDOF5_REG_SHUB_SLV3_CONFIG   0x20
 
#define SMARTDOF5_REG_SHUB_DATAWRITE_SLV0   0x21
 
#define SMARTDOF5_REG_SHUB_STATUS_MASTER   0x22
 
#define SMARTDOF5_REG_EMBF_PAGE_SEL   0x02
 Smart DOF 5 embedded functions register list. More...
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_EN_B   0x05
 
#define SMARTDOF5_REG_EMBF_PAGE_ADDRESS   0x08
 
#define SMARTDOF5_REG_EMBF_PAGE_VALUE   0x09
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_INT1   0x0A
 
#define SMARTDOF5_REG_EMBF_FSM_INT1_A   0x0B
 
#define SMARTDOF5_REG_EMBF_FSM_INT1_B   0x0C
 
#define SMARTDOF5_REG_EMBF_MLC_INT1   0x0D
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_INT2   0x0E
 
#define SMARTDOF5_REG_EMBF_FSM_INT2_A   0x0F
 
#define SMARTDOF5_REG_EMBF_FSM_INT2_B   0x10
 
#define SMARTDOF5_REG_EMBF_MLC_INT2   0x11
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_STATUS   0x12
 
#define SMARTDOF5_REG_EMBF_FSM_STATUS_A   0x13
 
#define SMARTDOF5_REG_EMBF_FSM_STATUS_B   0x14
 
#define SMARTDOF5_REG_EMBF_MLC_STATUS   0x15
 
#define SMARTDOF5_REG_EMBF_PAGE_RW   0x17
 
#define SMARTDOF5_REG_EMBF_FSM_ENABLE_A   0x46
 
#define SMARTDOF5_REG_EMBF_FSM_ENABLE_B   0x47
 
#define SMARTDOF5_REG_EMBF_FSM_LONG_COUNTER_L   0x48
 
#define SMARTDOF5_REG_EMBF_FSM_LONG_COUNTER_H   0x49
 
#define SMARTDOF5_REG_EMBF_FSM_LONG_COUNTER_CLEAR   0x4A
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS1   0x4C
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS2   0x4D
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS3   0x4E
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS4   0x4F
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS5   0x50
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS6   0x51
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS7   0x52
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS8   0x53
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS9   0x54
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS10   0x55
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS11   0x56
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS12   0x57
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS13   0x58
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS14   0x59
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS15   0x5A
 
#define SMARTDOF5_REG_EMBF_FSM_OUTS16   0x5B
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_ODR_CFG_B   0x5F
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_ODR_CFG_C   0x60
 
#define SMARTDOF5_REG_EMBF_EMB_FUNC_INIT_B   0x67
 
#define SMARTDOF5_REG_EMBF_MLC0_SRC   0x70
 
#define SMARTDOF5_REG_EMBF_MLC1_SRC   0x71
 
#define SMARTDOF5_REG_EMBF_MLC2_SRC   0x72
 
#define SMARTDOF5_REG_EMBF_MLC3_SRC   0x73
 
#define SMARTDOF5_REG_EMBF_MLC4_SRC   0x74
 
#define SMARTDOF5_REG_EMBF_MLC5_SRC   0x75
 
#define SMARTDOF5_REG_EMBF_MLC6_SRC   0x76
 
#define SMARTDOF5_REG_EMBF_MLC7_SRC   0x77
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SENSITIVITY_L   0xBA
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SENSITIVITY_H   0xBB
 
#define SMARTDOF5_REG_EMBF_P0_MAG_OFFX_L   0xC0
 
#define SMARTDOF5_REG_EMBF_P0_MAG_OFFX_H   0xC1
 
#define SMARTDOF5_REG_EMBF_P0_MAG_OFFY_L   0xC2
 
#define SMARTDOF5_REG_EMBF_P0_MAG_OFFY_H   0xC3
 
#define SMARTDOF5_REG_EMBF_P0_MAG_OFFZ_L   0xC4
 
#define SMARTDOF5_REG_EMBF_P0_MAG_OFFZ_H   0xC5
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_XX_L   0xC6
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_XX_H   0xC7
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_XY_L   0xC8
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_XY_H   0xC9
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_XZ_L   0xCA
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_XZ_H   0xCB
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_YY_L   0xCC
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_YY_H   0xCD
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_YZ_L   0xCE
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_YZ_H   0xCF
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_ZZ_L   0xD0
 
#define SMARTDOF5_REG_EMBF_P0_MAG_SI_ZZ_H   0xD1
 
#define SMARTDOF5_REG_EMBF_P0_MAG_CFG_A   0xD4
 
#define SMARTDOF5_REG_EMBF_P0_MAG_CFG_B   0xD5
 
#define SMARTDOF5_REG_EMBF_P1_FSM_LC_TIMEOUT_L   0x7A
 
#define SMARTDOF5_REG_EMBF_P1_FSM_LC_TIMEOUT_H   0x7B
 
#define SMARTDOF5_REG_EMBF_P1_FSM_PROGRAMS   0x7C
 
#define SMARTDOF5_REG_EMBF_P1_FSM_START_ADD_L   0x7E
 
#define SMARTDOF5_REG_EMBF_P1_FSM_START_ADD_H   0x7F
 
#define SMARTDOF5_REG_EMBF_P1_MLC_MAG_SENSITIVITY_L   0xE8
 
#define SMARTDOF5_REG_EMBF_P1_MLC_MAG_SENSITIVITY_H   0xE9
 
#define SMARTDOF5_FUNC_CFG_ACCESS_MASK   0xC0
 Smart DOF 5 FUNC_CFG_ACCESS register setting. More...
 
#define SMARTDOF5_INT1_CTRL_DEN_DRDY   0x80
 Smart DOF 5 WHO_AM_I register setting. More...
 
#define SMARTDOF5_INT1_CTRL_CNT_BDR   0x40
 
#define SMARTDOF5_INT1_CTRL_FIFO_FULL   0x20
 
#define SMARTDOF5_INT1_CTRL_FIFO_OVR   0x10
 
#define SMARTDOF5_INT1_CTRL_FIFO_TH   0x08
 
#define SMARTDOF5_INT1_CTRL_BOOT   0x04
 
#define SMARTDOF5_INT1_CTRL_DRDY_G   0x02
 
#define SMARTDOF5_INT1_CTRL_DRDY_XL   0x01
 
#define SMARTDOF5_WHO_AM_I   0x6B
 Smart DOF 5 WHO_AM_I register setting. More...
 
#define SMARTDOF5_CTRL1_XL_ODR_MASK   0xF0
 Smart DOF 5 CTRL1_XL register setting. More...
 
#define SMARTDOF5_CTRL1_XL_FS_MASK   0x0C
 
#define SMARTDOF5_CTRL1_XL_LPF2_EN_MASK   0x02
 
#define SMARTDOF5_CTRL2_G_ODR_MASK   0xF0
 Smart DOF 5 CTRL2_G register setting. More...
 
#define SMARTDOF5_CTRL2_G_FS_MASK   0x0C
 
#define SMARTDOF5_CTRL2_G_FS_125_MASK   0x02
 
#define SMARTDOF5_CTRL2_G_FS_4000_MASK   0x01
 
#define SMARTDOF5_CTRL3_C_BOOT   0x80
 Smart DOF 5 CTRL3_C register setting. More...
 
#define SMARTDOF5_CTRL3_C_BDU   0x40
 
#define SMARTDOF5_CTRL3_C_H_LACTIVE   0x20
 
#define SMARTDOF5_CTRL3_C_PP_OD   0x10
 
#define SMARTDOF5_CTRL3_C_SIM   0x08
 
#define SMARTDOF5_CTRL3_C_IF_INC   0x04
 
#define SMARTDOF5_CTRL3_C_SW_RESET   0x01
 
#define SMARTDOF5_CTRL9_XL_DEN_X   0x80
 Smart DOF 5 CTRL9_XL register setting. More...
 
#define SMARTDOF5_CTRL9_XL_DEN_Y   0x40
 
#define SMARTDOF5_CTRL9_XL_DEN_Z   0x20
 
#define SMARTDOF5_CTRL9_XL_DEN_XL_G   0x10
 
#define SMARTDOF5_CTRL9_XL_DEN_XL_EN   0x08
 
#define SMARTDOF5_CTRL9_XL_DEN_LH   0x04
 
#define SMARTDOF5_CTRL9_XL_I3C_DISABLE   0x02
 
#define SMARTDOF5_STATUS_TDA   0x04
 Smart DOF 5 STATUS register setting. More...
 
#define SMARTDOF5_STATUS_GDA   0x02
 
#define SMARTDOF5_STATUS_XLDA   0x01
 
#define SMARTDOF5_MEM_BANK_USER   0
 Smart DOF 5 memory bank setting. More...
 
#define SMARTDOF5_MEM_BANK_SENSOR_HUB   1
 
#define SMARTDOF5_MEM_BANK_EMBEDDED_FUNC   2
 
#define SMARTDOF5_ACCEL_ODR_OFF   0
 Smart DOF 5 accel output data rate setting. More...
 
#define SMARTDOF5_ACCEL_ODR_12_5_HZ   1
 
#define SMARTDOF5_ACCEL_ODR_26_HZ   2
 
#define SMARTDOF5_ACCEL_ODR_52_HZ   3
 
#define SMARTDOF5_ACCEL_ODR_104_HZ   4
 
#define SMARTDOF5_ACCEL_ODR_208_HZ   5
 
#define SMARTDOF5_ACCEL_ODR_417_HZ   6
 
#define SMARTDOF5_ACCEL_ODR_833_HZ   7
 
#define SMARTDOF5_ACCEL_ODR_1667_HZ   8
 
#define SMARTDOF5_ACCEL_ODR_3333_HZ   9
 
#define SMARTDOF5_ACCEL_ODR_6667_HZ   10
 
#define SMARTDOF5_ACCEL_ODR_1_6_HZ   11
 
#define SMARTDOF5_ACCEL_FS_2G   0
 Smart DOF 5 accel full scale setting. More...
 
#define SMARTDOF5_ACCEL_FS_16G   1
 
#define SMARTDOF5_ACCEL_FS_4G   2
 
#define SMARTDOF5_ACCEL_FS_8G   3
 
#define SMARTDOF5_GYRO_ODR_OFF   0
 Smart DOF 5 gyro output data rate setting. More...
 
#define SMARTDOF5_GYRO_ODR_12_5_HZ   1
 
#define SMARTDOF5_GYRO_ODR_26_HZ   2
 
#define SMARTDOF5_GYRO_ODR_52_HZ   3
 
#define SMARTDOF5_GYRO_ODR_104_HZ   4
 
#define SMARTDOF5_GYRO_ODR_208_HZ   5
 
#define SMARTDOF5_GYRO_ODR_417_HZ   6
 
#define SMARTDOF5_GYRO_ODR_833_HZ   7
 
#define SMARTDOF5_GYRO_ODR_1667_HZ   8
 
#define SMARTDOF5_GYRO_ODR_3333_HZ   9
 
#define SMARTDOF5_GYRO_ODR_6667_HZ   10
 
#define SMARTDOF5_GYRO_FS_250DPS   0
 Smart DOF 5 gyro full scale setting. More...
 
#define SMARTDOF5_GYRO_FS_500DPS   1
 
#define SMARTDOF5_GYRO_FS_1000DPS   2
 
#define SMARTDOF5_GYRO_FS_2000DPS   3
 
#define SMARTDOF5_GYRO_FS_4000DPS   4
 
#define SMARTDOF5_GYRO_FS_125DPS   5
 
#define SMARTDOF5_ACCEL_SENS_G_PER_LSB   0.000061
 Smart DOF 5 sensitivity setting. More...
 
#define SMARTDOF5_GYRO_SENS_DPS_PER_LSB   0.004375
 
#define SMARTDOF5_TEMP_SENS_LSB_PER_C   256.0
 
#define SMARTDOF5_TEMP_OFFSET   25.0
 
#define SMARTDOF5_DEVICE_ADDRESS_0   0x6A
 Smart DOF 5 device address setting. More...
 
#define SMARTDOF5_DEVICE_ADDRESS_1   0x6B
 
#define SMARTDOF5_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection. More...
 
#define SMARTDOF5_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define SMARTDOF5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Typedefs

typedef err_t(* smartdof5_master_io_t) (struct smartdof5_s *, uint8_t, uint8_t *, uint8_t)
 
typedef struct smartdof5_s smartdof5_t
 Smart DOF 5 Click context object. More...
 

Enumerations

enum  smartdof5_drv_t { SMARTDOF5_DRV_SEL_SPI, SMARTDOF5_DRV_SEL_I2C }
 Smart DOF 5 Click driver selector. More...
 
enum  smartdof5_return_value_t { SMARTDOF5_OK = 0, SMARTDOF5_ERROR = -1 }
 Smart DOF 5 Click return value data. More...
 

Functions

void smartdof5_cfg_setup (smartdof5_cfg_t *cfg)
 Smart DOF 5 configuration object setup function. More...
 
void smartdof5_drv_interface_sel (smartdof5_cfg_t *cfg, smartdof5_drv_t drv_sel)
 Smart DOF 5 driver interface setup function. More...
 
err_t smartdof5_init (smartdof5_t *ctx, smartdof5_cfg_t *cfg)
 Smart DOF 5 initialization function. More...
 
err_t smartdof5_default_cfg (smartdof5_t *ctx)
 Smart DOF 5 default configuration function. More...
 
err_t smartdof5_write_reg (smartdof5_t *ctx, uint8_t reg, uint8_t data_in)
 Smart DOF 5 write reg function. More...
 
err_t smartdof5_write_regs (smartdof5_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Smart DOF 5 write regs function. More...
 
err_t smartdof5_read_reg (smartdof5_t *ctx, uint8_t reg, uint8_t *data_out)
 Smart DOF 5 read reg function. More...
 
err_t smartdof5_read_regs (smartdof5_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Smart DOF 5 read regs function. More...
 
uint8_t smartdof5_get_int_pin (smartdof5_t *ctx)
 Smart DOF 5 get int pin function. More...
 
err_t smartdof5_check_communication (smartdof5_t *ctx)
 Smart DOF 5 check communication function. More...
 
err_t smartdof5_set_mem_bank (smartdof5_t *ctx, uint8_t mem_bank)
 Smart DOF 5 set mem bank function. More...
 
err_t smartdof5_sw_reset (smartdof5_t *ctx)
 Smart DOF 5 sw reset function. More...
 
err_t smartdof5_set_accel_odr (smartdof5_t *ctx, uint8_t odr)
 Smart DOF 5 set accel odr function. More...
 
err_t smartdof5_set_gyro_odr (smartdof5_t *ctx, uint8_t odr)
 Smart DOF 5 set gyro odr function. More...
 
err_t smartdof5_set_accel_fsr (smartdof5_t *ctx, uint8_t fsr)
 Smart DOF 5 set accel fsr function. More...
 
err_t smartdof5_set_gyro_fsr (smartdof5_t *ctx, uint8_t fsr)
 Smart DOF 5 set gyro fsr function. More...
 
err_t smartdof5_get_accel_drdy (smartdof5_t *ctx, uint8_t *drdy)
 Smart DOF 5 get accel drdy function. More...
 
err_t smartdof5_get_gyro_drdy (smartdof5_t *ctx, uint8_t *drdy)
 Smart DOF 5 get gyro drdy function. More...
 
err_t smartdof5_get_temp_drdy (smartdof5_t *ctx, uint8_t *drdy)
 Smart DOF 5 get temp drdy function. More...
 
err_t smartdof5_get_accel (smartdof5_t *ctx, smartdof5_axes_t *accel)
 Smart DOF 5 get accel function. More...
 
err_t smartdof5_get_gyro (smartdof5_t *ctx, smartdof5_axes_t *gyro)
 Smart DOF 5 get gyro function. More...
 
err_t smartdof5_get_temp (smartdof5_t *ctx, float *temp)
 Smart DOF 5 get temp function. More...
 
err_t smartdof5_get_data (smartdof5_t *ctx, smartdof5_data_t *data_out)
 Smart DOF 5 get data function. More...
 

Detailed Description

This file contains API for Smart DOF 5 Click Driver.

Typedef Documentation

◆ smartdof5_master_io_t

typedef err_t( * smartdof5_master_io_t) (struct smartdof5_s *, uint8_t, uint8_t *, uint8_t)

Driver serial interface.

◆ smartdof5_t

typedef struct smartdof5_s smartdof5_t

Smart DOF 5 Click context object.

Context object definition of Smart DOF 5 Click driver.

Enumeration Type Documentation

◆ smartdof5_drv_t

Smart DOF 5 Click driver selector.

Selects target driver interface of Smart DOF 5 Click driver.

Enumerator
SMARTDOF5_DRV_SEL_SPI 

SPI driver descriptor.

SMARTDOF5_DRV_SEL_I2C 

I2C driver descriptor.

◆ smartdof5_return_value_t

Smart DOF 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
SMARTDOF5_OK 
SMARTDOF5_ERROR