accel28 2.1.0.0
Accel 28 Registers Settings

Settings for registers of Accel 28 Click driver. More...

Macros

#define ACCEL28_WHO_AM_I_VALUE   0x41
 Accel 28 description setting.
 
#define ACCEL28_CTRL1_X_AXIS_ENABLE   0x01
 Accel 28 CTRL1 register setting.
 
#define ACCEL28_CTRL1_Y_AXIS_ENABLE   0x02
 
#define ACCEL28_CTRL1_Z_AXIS_ENABLE   0x04
 
#define ACCEL28_CTRL1_BLOCK_DATA_UPATE_EN   0x08
 
#define ACCEL28_CTRL1_ODR_POWER_DOWN   0x00
 
#define ACCEL28_CTRL1_ODR_10HZ   0x10
 
#define ACCEL28_CTRL1_ODR_50HZ   0x20
 
#define ACCEL28_CTRL1_ODR_100HZ   0x30
 
#define ACCEL28_CTRL1_ODR_200HZ   0x40
 
#define ACCEL28_CTRL1_ODR_400HZ   0x50
 
#define ACCEL28_CTRL1_ODR_800HZ   0x60
 
#define ACCEL28_CTRL1_ODR_NA   0x70
 
#define ACCEL28_CTRL1_HR_MODE   0x80
 
#define ACCEL28_CTRL2_HP_ENABLE_INT2   0x01
 Accel 28 CTRL2 register setting.
 
#define ACCEL28_CTRL2_HP_ENABLE_INT1   0x02
 
#define ACCEL28_CTRL2_FDS_ENABLE   0x04
 
#define ACCEL28_CTRL2_HPM_NORMAL_MODE   0x00
 
#define ACCEL28_CTRL2_HPM_REF_SIGNAL_FILTERING   0x08
 
#define ACCEL28_CTRL2_HPM_FREQ_DEV_50   0x00
 
#define ACCEL28_CTRL2_HPM_FREQ_DEV_100   0x20
 
#define ACCEL28_CTRL2_HPM_FREQ_DEV_9   0x40
 
#define ACCEL28_CTRL2_HPM_FREQ_DEV_400   0x60
 
#define ACCEL28_CTRL3_INT1_DRDY_EN   0x01
 Accel 28 CTRL3 register setting.
 
#define ACCEL28_CTRL3_INT1_FTH   0x02
 
#define ACCEL28_CTRL3_INT1_OVR   0x04
 
#define ACCEL28_CTRL3_INT1_IG1   0x08
 
#define ACCEL28_CTRL3_INT1_IG2   0x10
 
#define ACCEL28_CTRL3_INT1_INACT_EN   0x20
 
#define ACCEL28_CTRL3_STOP_FTH   0x40
 
#define ACCEL28_CTRL3_FIFO_EN   0x80
 
#define ACCEL28_CTRL4_SPI_MODE_3_WIRE   0x01
 Accel 28 CTRL4 register setting.
 
#define ACCEL28_CTRL4_SPI_MODE_4_WIRE   0x00
 
#define ACCEL28_CTRL4_I2C_DISABLED   0x02
 
#define ACCEL28_CTRL4_I2C_ENABLED   0x00
 
#define ACCEL28_CTRL4_ADD_INC_ENABLED   0x04
 
#define ACCEL28_CTRL4_BW_SCALE_ODR   0x00
 
#define ACCEL28_CTRL4_BW_SCALE_BW   0x08
 
#define ACCEL28_CTRL4_FS_2G   0x00
 
#define ACCEL28_CTRL4_FS_4G   0x20
 
#define ACCEL28_CTRL4_FS_8G   0x30
 
#define ACCEL28_CTRL4_FS_MASK   0x30
 
#define ACCEL28_CTRL4_BW_400HZ   0x00
 
#define ACCEL28_CTRL4_BW_200HZ   0x40
 
#define ACCEL28_CTRL4_BW_100HZ   0x80
 
#define ACCEL28_CTRL4_BW_50HZ   0xC0
 
#define ACCEL28_CTRL5_INT_PUSH_PULL   0x00
 Accel 28 CTRL5 register setting.
 
#define ACCEL28_CTRL5_INT_OPEN_DRAIN   0x01
 
#define ACCEL28_CTRL5_INT_ACTIVE_HIGH   0x00
 
#define ACCEL28_CTRL5_INT_ACTIVE_LOW   0x02
 
#define ACCEL28_CTRL5_NORMAL_MODE   0x00
 
#define ACCEL28_CTRL5_POSITIVE_SELF_TEST   0x04
 
#define ACCEL28_CTRL5_NEGATIVE_SELF_TEST   0x08
 
#define ACCEL28_CTRL5_DEC_UDATE_OFF   0x00
 
#define ACCEL28_CTRL5_DEC_UDATE_2_SAMPLES   0x10
 
#define ACCEL28_CTRL5_DEC_UDATE_4_SAMPLES   0x20
 
#define ACCEL28_CTRL5_DEC_UDATE_8_SAMPLES   0x30
 
#define ACCEL28_CTRL5_SW_RESET   0x40
 
#define ACCEL28_CTRL5_DEBUG_MODE   0x80
 
#define ACCEL28_CTRL6_INT2_DRDY   0x01
 Accel 28 CTRL6 register setting.
 
#define ACCEL28_CTRL6_INT2_FTH   0x02
 
#define ACCEL28_CTRL6_INT2_EMPTY   0x04
 
#define ACCEL28_CTRL6_INT2_IG1   0x08
 
#define ACCEL28_CTRL6_INT2_IG2   0x10
 
#define ACCEL28_CTRL6_INT2_BOOT   0x20
 
#define ACCEL28_CTRL6_BOOT   0x80
 
#define ACCEL28_STATUS_X_DATA_AVL   0x01
 Accel 28 STATUS register setting.
 
#define ACCEL28_STATUS_Y_DATA_AVL   0x02
 
#define ACCEL28_STATUS_Z_DATA_AVL   0x04
 
#define ACCEL28_STATUS_ZYX_DATA_AVL   0x08
 
#define ACCEL28_STATUS_X_DATA_OVERRUN   0x10
 
#define ACCEL28_STATUS_Y_DATA_OVERRUN   0x20
 
#define ACCEL28_STATUS_Z_DATA_OVERRUN   0x40
 
#define ACCEL28_STATUS_ZYX_DATA_OVERRUN   0x80
 
#define ACCEL28_2G_DATA_CONV   0.061f
 Accel 28 conversion multiplier setting.
 
#define ACCEL28_4G_DATA_CONV   0.122f
 
#define ACCEL28_8G_DATA_CONV   0.244f
 
#define ACCEL28_PIN_STATE_HIGH   0x01
 Accel 28 pin state setting.
 
#define ACCEL28_PIN_STATE_LOW   0x00
 
#define ACCEL28_DEVICE_ADDRESS_0   0x1E
 Accel 28 device address setting.
 
#define ACCEL28_DEVICE_ADDRESS_1   0x1D
 
#define ACCEL28_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define ACCEL28_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 

Detailed Description

Settings for registers of Accel 28 Click driver.

Macro Definition Documentation

◆ ACCEL28_2G_DATA_CONV

#define ACCEL28_2G_DATA_CONV   0.061f

Accel 28 conversion multiplier setting.

Specified setting for data conversion multiplier of Accel 28 Click driver.

◆ ACCEL28_4G_DATA_CONV

#define ACCEL28_4G_DATA_CONV   0.122f

◆ ACCEL28_8G_DATA_CONV

#define ACCEL28_8G_DATA_CONV   0.244f

◆ ACCEL28_CTRL1_BLOCK_DATA_UPATE_EN

#define ACCEL28_CTRL1_BLOCK_DATA_UPATE_EN   0x08

◆ ACCEL28_CTRL1_HR_MODE

#define ACCEL28_CTRL1_HR_MODE   0x80

◆ ACCEL28_CTRL1_ODR_100HZ

#define ACCEL28_CTRL1_ODR_100HZ   0x30

◆ ACCEL28_CTRL1_ODR_10HZ

#define ACCEL28_CTRL1_ODR_10HZ   0x10

◆ ACCEL28_CTRL1_ODR_200HZ

#define ACCEL28_CTRL1_ODR_200HZ   0x40

◆ ACCEL28_CTRL1_ODR_400HZ

#define ACCEL28_CTRL1_ODR_400HZ   0x50

◆ ACCEL28_CTRL1_ODR_50HZ

#define ACCEL28_CTRL1_ODR_50HZ   0x20

◆ ACCEL28_CTRL1_ODR_800HZ

#define ACCEL28_CTRL1_ODR_800HZ   0x60

◆ ACCEL28_CTRL1_ODR_NA

#define ACCEL28_CTRL1_ODR_NA   0x70

◆ ACCEL28_CTRL1_ODR_POWER_DOWN

#define ACCEL28_CTRL1_ODR_POWER_DOWN   0x00

◆ ACCEL28_CTRL1_X_AXIS_ENABLE

#define ACCEL28_CTRL1_X_AXIS_ENABLE   0x01

Accel 28 CTRL1 register setting.

Specified CTRL1 register setting for description of Accel 28 Click driver.

◆ ACCEL28_CTRL1_Y_AXIS_ENABLE

#define ACCEL28_CTRL1_Y_AXIS_ENABLE   0x02

◆ ACCEL28_CTRL1_Z_AXIS_ENABLE

#define ACCEL28_CTRL1_Z_AXIS_ENABLE   0x04

◆ ACCEL28_CTRL2_FDS_ENABLE

#define ACCEL28_CTRL2_FDS_ENABLE   0x04

◆ ACCEL28_CTRL2_HP_ENABLE_INT1

#define ACCEL28_CTRL2_HP_ENABLE_INT1   0x02

◆ ACCEL28_CTRL2_HP_ENABLE_INT2

#define ACCEL28_CTRL2_HP_ENABLE_INT2   0x01

Accel 28 CTRL2 register setting.

Specified CTRL2 register setting for description of Accel 28 Click driver.

◆ ACCEL28_CTRL2_HPM_FREQ_DEV_100

#define ACCEL28_CTRL2_HPM_FREQ_DEV_100   0x20

◆ ACCEL28_CTRL2_HPM_FREQ_DEV_400

#define ACCEL28_CTRL2_HPM_FREQ_DEV_400   0x60

◆ ACCEL28_CTRL2_HPM_FREQ_DEV_50

#define ACCEL28_CTRL2_HPM_FREQ_DEV_50   0x00

◆ ACCEL28_CTRL2_HPM_FREQ_DEV_9

#define ACCEL28_CTRL2_HPM_FREQ_DEV_9   0x40

◆ ACCEL28_CTRL2_HPM_NORMAL_MODE

#define ACCEL28_CTRL2_HPM_NORMAL_MODE   0x00

◆ ACCEL28_CTRL2_HPM_REF_SIGNAL_FILTERING

#define ACCEL28_CTRL2_HPM_REF_SIGNAL_FILTERING   0x08

◆ ACCEL28_CTRL3_FIFO_EN

#define ACCEL28_CTRL3_FIFO_EN   0x80

◆ ACCEL28_CTRL3_INT1_DRDY_EN

#define ACCEL28_CTRL3_INT1_DRDY_EN   0x01

Accel 28 CTRL3 register setting.

Specified CTRL3 register setting for description of Accel 28 Click driver.

◆ ACCEL28_CTRL3_INT1_FTH

#define ACCEL28_CTRL3_INT1_FTH   0x02

◆ ACCEL28_CTRL3_INT1_IG1

#define ACCEL28_CTRL3_INT1_IG1   0x08

◆ ACCEL28_CTRL3_INT1_IG2

#define ACCEL28_CTRL3_INT1_IG2   0x10

◆ ACCEL28_CTRL3_INT1_INACT_EN

#define ACCEL28_CTRL3_INT1_INACT_EN   0x20

◆ ACCEL28_CTRL3_INT1_OVR

#define ACCEL28_CTRL3_INT1_OVR   0x04

◆ ACCEL28_CTRL3_STOP_FTH

#define ACCEL28_CTRL3_STOP_FTH   0x40

◆ ACCEL28_CTRL4_ADD_INC_ENABLED

#define ACCEL28_CTRL4_ADD_INC_ENABLED   0x04

◆ ACCEL28_CTRL4_BW_100HZ

#define ACCEL28_CTRL4_BW_100HZ   0x80

◆ ACCEL28_CTRL4_BW_200HZ

#define ACCEL28_CTRL4_BW_200HZ   0x40

◆ ACCEL28_CTRL4_BW_400HZ

#define ACCEL28_CTRL4_BW_400HZ   0x00

◆ ACCEL28_CTRL4_BW_50HZ

#define ACCEL28_CTRL4_BW_50HZ   0xC0

◆ ACCEL28_CTRL4_BW_SCALE_BW

#define ACCEL28_CTRL4_BW_SCALE_BW   0x08

◆ ACCEL28_CTRL4_BW_SCALE_ODR

#define ACCEL28_CTRL4_BW_SCALE_ODR   0x00

◆ ACCEL28_CTRL4_FS_2G

#define ACCEL28_CTRL4_FS_2G   0x00

◆ ACCEL28_CTRL4_FS_4G

#define ACCEL28_CTRL4_FS_4G   0x20

◆ ACCEL28_CTRL4_FS_8G

#define ACCEL28_CTRL4_FS_8G   0x30

◆ ACCEL28_CTRL4_FS_MASK

#define ACCEL28_CTRL4_FS_MASK   0x30

◆ ACCEL28_CTRL4_I2C_DISABLED

#define ACCEL28_CTRL4_I2C_DISABLED   0x02

◆ ACCEL28_CTRL4_I2C_ENABLED

#define ACCEL28_CTRL4_I2C_ENABLED   0x00

◆ ACCEL28_CTRL4_SPI_MODE_3_WIRE

#define ACCEL28_CTRL4_SPI_MODE_3_WIRE   0x01

Accel 28 CTRL4 register setting.

Specified CTRL4 register setting for description of Accel 28 Click driver.

◆ ACCEL28_CTRL4_SPI_MODE_4_WIRE

#define ACCEL28_CTRL4_SPI_MODE_4_WIRE   0x00

◆ ACCEL28_CTRL5_DEBUG_MODE

#define ACCEL28_CTRL5_DEBUG_MODE   0x80

◆ ACCEL28_CTRL5_DEC_UDATE_2_SAMPLES

#define ACCEL28_CTRL5_DEC_UDATE_2_SAMPLES   0x10

◆ ACCEL28_CTRL5_DEC_UDATE_4_SAMPLES

#define ACCEL28_CTRL5_DEC_UDATE_4_SAMPLES   0x20

◆ ACCEL28_CTRL5_DEC_UDATE_8_SAMPLES

#define ACCEL28_CTRL5_DEC_UDATE_8_SAMPLES   0x30

◆ ACCEL28_CTRL5_DEC_UDATE_OFF

#define ACCEL28_CTRL5_DEC_UDATE_OFF   0x00

◆ ACCEL28_CTRL5_INT_ACTIVE_HIGH

#define ACCEL28_CTRL5_INT_ACTIVE_HIGH   0x00

◆ ACCEL28_CTRL5_INT_ACTIVE_LOW

#define ACCEL28_CTRL5_INT_ACTIVE_LOW   0x02

◆ ACCEL28_CTRL5_INT_OPEN_DRAIN

#define ACCEL28_CTRL5_INT_OPEN_DRAIN   0x01

◆ ACCEL28_CTRL5_INT_PUSH_PULL

#define ACCEL28_CTRL5_INT_PUSH_PULL   0x00

Accel 28 CTRL5 register setting.

Specified CTRL5 register setting for description of Accel 28 Click driver.

◆ ACCEL28_CTRL5_NEGATIVE_SELF_TEST

#define ACCEL28_CTRL5_NEGATIVE_SELF_TEST   0x08

◆ ACCEL28_CTRL5_NORMAL_MODE

#define ACCEL28_CTRL5_NORMAL_MODE   0x00

◆ ACCEL28_CTRL5_POSITIVE_SELF_TEST

#define ACCEL28_CTRL5_POSITIVE_SELF_TEST   0x04

◆ ACCEL28_CTRL5_SW_RESET

#define ACCEL28_CTRL5_SW_RESET   0x40

◆ ACCEL28_CTRL6_BOOT

#define ACCEL28_CTRL6_BOOT   0x80

◆ ACCEL28_CTRL6_INT2_BOOT

#define ACCEL28_CTRL6_INT2_BOOT   0x20

◆ ACCEL28_CTRL6_INT2_DRDY

#define ACCEL28_CTRL6_INT2_DRDY   0x01

Accel 28 CTRL6 register setting.

Specified CTRL6 register setting for description of Accel 28 Click driver.

◆ ACCEL28_CTRL6_INT2_EMPTY

#define ACCEL28_CTRL6_INT2_EMPTY   0x04

◆ ACCEL28_CTRL6_INT2_FTH

#define ACCEL28_CTRL6_INT2_FTH   0x02

◆ ACCEL28_CTRL6_INT2_IG1

#define ACCEL28_CTRL6_INT2_IG1   0x08

◆ ACCEL28_CTRL6_INT2_IG2

#define ACCEL28_CTRL6_INT2_IG2   0x10

◆ ACCEL28_DEVICE_ADDRESS_0

#define ACCEL28_DEVICE_ADDRESS_0   0x1E

Accel 28 device address setting.

Specified setting for device slave address selection of Accel 28 Click driver.

◆ ACCEL28_DEVICE_ADDRESS_1

#define ACCEL28_DEVICE_ADDRESS_1   0x1D

◆ ACCEL28_PIN_STATE_HIGH

#define ACCEL28_PIN_STATE_HIGH   0x01

Accel 28 pin state setting.

Specified setting for pin state of Accel 28 Click driver.

◆ ACCEL28_PIN_STATE_LOW

#define ACCEL28_PIN_STATE_LOW   0x00

◆ ACCEL28_SET_DATA_SAMPLE_EDGE

#define ACCEL28_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE

Data sample selection.

This macro sets data samples for SPI modules.

Note
Available only on Microchip PIC family devices. This macro will set data sampling for all SPI modules on MCU. Can be overwritten with accel28_init which will set SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.

◆ ACCEL28_SET_DATA_SAMPLE_MIDDLE

#define ACCEL28_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE

◆ ACCEL28_STATUS_X_DATA_AVL

#define ACCEL28_STATUS_X_DATA_AVL   0x01

Accel 28 STATUS register setting.

Specified STATUS register setting for description of Accel 28 Click driver.

◆ ACCEL28_STATUS_X_DATA_OVERRUN

#define ACCEL28_STATUS_X_DATA_OVERRUN   0x10

◆ ACCEL28_STATUS_Y_DATA_AVL

#define ACCEL28_STATUS_Y_DATA_AVL   0x02

◆ ACCEL28_STATUS_Y_DATA_OVERRUN

#define ACCEL28_STATUS_Y_DATA_OVERRUN   0x20

◆ ACCEL28_STATUS_Z_DATA_AVL

#define ACCEL28_STATUS_Z_DATA_AVL   0x04

◆ ACCEL28_STATUS_Z_DATA_OVERRUN

#define ACCEL28_STATUS_Z_DATA_OVERRUN   0x40

◆ ACCEL28_STATUS_ZYX_DATA_AVL

#define ACCEL28_STATUS_ZYX_DATA_AVL   0x08

◆ ACCEL28_STATUS_ZYX_DATA_OVERRUN

#define ACCEL28_STATUS_ZYX_DATA_OVERRUN   0x80

◆ ACCEL28_WHO_AM_I_VALUE

#define ACCEL28_WHO_AM_I_VALUE   0x41

Accel 28 description setting.

Specified setting for description of Accel 28 Click driver.