Loading...
Searching...
No Matches

LIS2DH12 register definitions. More...

Detailed Description

LIS2DH12 register definitions.

Author
Jan Mohr jan.m.nosp@m.ohr@.nosp@m.ml-pa.nosp@m..com

Definition in file lis2dh12_registers.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  LIS2DH12_CLICK_SRC_t
 CLICK_SRC definitions. More...
 
union  LIS2DH12_FIFO_SRC_REG_t
 FIFO_SRC_REG definitions. More...
 
union  LIS2DH12_CTRL_REG0_t
 CTRL_REG_0 definitions. More...
 
union  LIS2DH12_TEMP_CFG_REG_t
 TEMP_CFG_REG definitions. More...
 
union  LIS2DH12_CTRL_REG1_t
 CTRL_REG1 definitions. More...
 
union  LIS2DH12_CTRL_REG2_t
 CTRL_REG2 definitions. More...
 
union  LIS2DH12_CTRL_REG3_t
 CTRL_REG3 definitions. More...
 
union  LIS2DH12_CTRL_REG4_t
 CTRL_REG4 definitions. More...
 
union  LIS2DH12_CTRL_REG5_t
 CTRL_REG5 definitions. More...
 
union  LIS2DH12_CTRL_REG6_t
 CTRL_REG6 definitions. More...
 
union  LIS2DH12_REFERENCE_t
 REFERENCE definitions. More...
 
union  LIS2DH12_FIFO_CTRL_REG_t
 FIFO_CTRL_REG definitions. More...
 
union  LIS2DH12_INT1_CFG_t
 INT1_CFG definitions. More...
 
union  LIS2DH12_INT1_THS_t
 INT1_THS definitions. More...
 
union  LIS2DH12_INT1_DURATION_t
 INT1_DURATION definitions. More...
 
union  LIS2DH12_INT2_CFG_t
 INT2_CFG definitions. More...
 
union  LIS2DH12_INT2_THS_t
 INT2_THS definitions. More...
 
union  LIS2DH12_INT2_DURATION_t
 INT2_DURATION definitions. More...
 
union  LIS2DH12_CLICK_CFG_t
 CLICK_CFG definitions. More...
 
union  LIS2DH12_CLICK_THS_t
 CLICK_THS definitions. More...
 
union  LIS2DH12_TIME_LIMIT_t
 TIME_LIMIT definitions. More...
 
union  LIS2DH12_TIME_LATENCY_t
 TIME_LATENCY definitions. More...
 
union  LIS2DH12_TIME_WINDOW_t
 TIME_WINDOW definitions. More...
 
union  LIS2DH12_ACT_THS_t
 ACT_THS definitions. More...
 
union  LIS2DH12_ACT_DURATION_t
 ACT_DURATION definitions. More...
 

Definition of read Registers

#define LIS2DH12_INT_SRC_1(ret)   (((uint32_t)(ret) >> 0) & 0x7F)
 Extract interrupt flags for Event Slot 1.
 
#define LIS2DH12_INT_SRC_2(ret)   (((uint32_t)(ret) >> 8) & 0x7F)
 Extract interrupt flags for Event Slot 2.
 
#define LIS2DH12_INT_SRC_CLICK(ret)   (((uint32_t)(ret) >> 16) & 0x7F)
 Extract interrupt flags for Click Event.
 
enum  { LIS2DH12_STATUS_REG_AUX_TDA = 0x04 , LIS2DH12_STATUS_REG_AUX_TOR = 0x40 }
 STATUS_REG_AUX definitions. More...
 
enum  { LIS2DH12_TEMP_CFG_REG_DISABLE = 0x00 , LIS2DH12_TEMP_CFG_REG_ENABLE = 0xC0 }
 STATUS_REG_TEMP definitions. More...
 
enum  {
  LIS2DH12_STATUS_REG_XDA = 0x01 , LIS2DH12_STATUS_REG_YDA = 0x02 , LIS2DH12_STATUS_REG_ZDA = 0x04 , LIS2DH12_STATUS_REG_ZYXDA = 0x08 ,
  LIS2DH12_STATUS_REG_XOR = 0x10 , LIS2DH12_STATUS_REG_YOR = 0x20 , LIS2DH12_STATUS_REG_ZOR = 0x40 , LIS2DH12_STATUS_REG_ZYXOR = 0x80
}
 STATUS_REG definitions. More...
 
enum  {
  LIS2DH12_INT_SRC_XL = 0x01 , LIS2DH12_INT_SRC_XH = 0x02 , LIS2DH12_INT_SRC_YL = 0x04 , LIS2DH12_INT_SRC_YH = 0x08 ,
  LIS2DH12_INT_SRC_ZL = 0x10 , LIS2DH12_INT_SRC_ZH = 0x20 , LIS2DH12_INT_SRC_IA = 0x40
}
 INT1_SRC and INT2_SRC definitions. More...
 
enum  {
  LIS2DH12_INT_CFG_XLIE = 0x01 , LIS2DH12_INT_CFG_XHIE = 0x02 , LIS2DH12_INT_CFG_YLIE = 0x04 , LIS2DH12_INT_CFG_YHIE = 0x08 ,
  LIS2DH12_INT_CFG_ZLIE = 0x10 , LIS2DH12_INT_CFG_ZHIE = 0x20 , LIS2DH12_INT_CFG_6D = 0x40 , LIS2DH12_INT_CFG_AOI = 0x80
}
 Interrupt config register values. More...
 
enum  {
  LIS2DH12_INT_TYPE_I1_OVERRUN = 0x02 , LIS2DH12_INT_TYPE_I1_WTM = 0x04 , LIS2DH12_INT_TYPE_I1_ZYXDA = 0x10 , LIS2DH12_INT_TYPE_I1_IA2 = 0x20 ,
  LIS2DH12_INT_TYPE_I1_IA1 = 0x40 , LIS2DH12_INT_TYPE_I1_CLICK = 0x80 , LIS2DH12_INT_TYPE_INT_POLARITY = 0x02 , LIS2DH12_INT_TYPE_I2_ACT = 0x08 ,
  LIS2DH12_INT_TYPE_I2_BOOT = 0x10 , LIS2DH12_INT_TYPE_I2_IA2 = 0x20 , LIS2DH12_INT_TYPE_I2_IA1 = 0x40 , LIS2DH12_INT_TYPE_I2_CLICK = 0x80 ,
  LIS2DH12_INT_TYPE_IA2 = 0x20 , LIS2DH12_INT_TYPE_IA1 = 0x40 , LIS2DH12_INT_TYPE_CLICK = 0x80
}
 Interrupt type register values. More...
 
enum  { LIS2DH12_EVENT_1 = 0x1 , LIS2DH12_EVENT_2 = 0x2 , LIS2DH12_EVENT_CLICK = 0x3 }
 Event slots. More...
 

Definition of read/write Registers

#define LIS2DH12_CTRL_REG2_HP_IA1   (1 << 0)
 
#define LIS2DH12_CTRL_REG2_HP_IA2   (1 << 1)
 
#define LIS2DH12_CTRL_REG2_HPCLICK   (1 << 2)
 
#define LIS2DH12_CTRL_REG2_FDS   (1 << 3)
 
#define LIS2DH12_CLICK_THS_LIR   (0x80)
 

Macro Definition Documentation

◆ LIS2DH12_CLICK_THS_LIR

#define LIS2DH12_CLICK_THS_LIR   (0x80)

Definition at line 213 of file lis2dh12_registers.h.

◆ LIS2DH12_CTRL_REG2_FDS

#define LIS2DH12_CTRL_REG2_FDS   (1 << 3)

Definition at line 211 of file lis2dh12_registers.h.

◆ LIS2DH12_CTRL_REG2_HP_IA1

#define LIS2DH12_CTRL_REG2_HP_IA1   (1 << 0)

Definition at line 208 of file lis2dh12_registers.h.

◆ LIS2DH12_CTRL_REG2_HP_IA2

#define LIS2DH12_CTRL_REG2_HP_IA2   (1 << 1)

Definition at line 209 of file lis2dh12_registers.h.

◆ LIS2DH12_CTRL_REG2_HPCLICK

#define LIS2DH12_CTRL_REG2_HPCLICK   (1 << 2)

Definition at line 210 of file lis2dh12_registers.h.

◆ LIS2DH12_INT_SRC_1

#define LIS2DH12_INT_SRC_1 (   ret)    (((uint32_t)(ret) >> 0) & 0x7F)

Extract interrupt flags for Event Slot 1.

Definition at line 123 of file lis2dh12_registers.h.

◆ LIS2DH12_INT_SRC_2

#define LIS2DH12_INT_SRC_2 (   ret)    (((uint32_t)(ret) >> 8) & 0x7F)

Extract interrupt flags for Event Slot 2.

Definition at line 128 of file lis2dh12_registers.h.

◆ LIS2DH12_INT_SRC_CLICK

#define LIS2DH12_INT_SRC_CLICK (   ret)    (((uint32_t)(ret) >> 16) & 0x7F)

Extract interrupt flags for Click Event.

Definition at line 133 of file lis2dh12_registers.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

STATUS_REG_AUX definitions.

Enumerator
LIS2DH12_STATUS_REG_AUX_TDA 

Temperature new data available.

LIS2DH12_STATUS_REG_AUX_TOR 

Temperature data overrun.

Definition at line 31 of file lis2dh12_registers.h.

◆ anonymous enum

anonymous enum

STATUS_REG_TEMP definitions.

Enumerator
LIS2DH12_TEMP_CFG_REG_DISABLE 

Temperature sensor disable.

LIS2DH12_TEMP_CFG_REG_ENABLE 

Temperature sensor enable

Definition at line 39 of file lis2dh12_registers.h.

◆ anonymous enum

anonymous enum

STATUS_REG definitions.

Enumerator
LIS2DH12_STATUS_REG_XDA 

X-axis new data available.

LIS2DH12_STATUS_REG_YDA 

Y-axis new data available.

LIS2DH12_STATUS_REG_ZDA 

Z-axis new data available.

LIS2DH12_STATUS_REG_ZYXDA 

On X-, Y-, Z-axis new data available.

LIS2DH12_STATUS_REG_XOR 

X-axis data overrun.

LIS2DH12_STATUS_REG_YOR 

Y-axis data overrun.

LIS2DH12_STATUS_REG_ZOR 

Y-axis data overrun.

LIS2DH12_STATUS_REG_ZYXOR 

On X-, Y-, Z-axis data overrun.

Definition at line 47 of file lis2dh12_registers.h.

◆ anonymous enum

anonymous enum

INT1_SRC and INT2_SRC definitions.

Enumerator
LIS2DH12_INT_SRC_XL 

X low event.

LIS2DH12_INT_SRC_XH 

X high event.

LIS2DH12_INT_SRC_YL 

Y low event.

LIS2DH12_INT_SRC_YH 

Y high event.

LIS2DH12_INT_SRC_ZL 

Z low event.

LIS2DH12_INT_SRC_ZH 

Z high event.

LIS2DH12_INT_SRC_IA 

Interrupt 1 active, at least one interrupt \ has been generated.

Definition at line 61 of file lis2dh12_registers.h.

◆ anonymous enum

anonymous enum

Interrupt config register values.

Enumerator
LIS2DH12_INT_CFG_XLIE 

enable X low event

LIS2DH12_INT_CFG_XHIE 

enable X high event

LIS2DH12_INT_CFG_YLIE 

enable Y low event

LIS2DH12_INT_CFG_YHIE 

enable Y high event

LIS2DH12_INT_CFG_ZLIE 

enable Z low event

LIS2DH12_INT_CFG_ZHIE 

enable Z high event

LIS2DH12_INT_CFG_6D 

enable 6-direction detection

LIS2DH12_INT_CFG_AOI 

and/or combination interrupt events

Definition at line 75 of file lis2dh12_registers.h.

◆ anonymous enum

anonymous enum

Interrupt type register values.

Enumerator
LIS2DH12_INT_TYPE_I1_OVERRUN 

FIFO overrun interrupt on INT1.

LIS2DH12_INT_TYPE_I1_WTM 

FIFO watermark interrupt on INT1.

LIS2DH12_INT_TYPE_I1_ZYXDA 

ZYXDA interrupt on INT1.

LIS2DH12_INT_TYPE_I1_IA2 

IA2 interrupt on INT1.

LIS2DH12_INT_TYPE_I1_IA1 

IA1 interrupt on INT1.

LIS2DH12_INT_TYPE_I1_CLICK 

click interrupt on INT1

LIS2DH12_INT_TYPE_INT_POLARITY 

INT1 and INT2 pin polarity.

LIS2DH12_INT_TYPE_I2_ACT 

enable activity interrupt on INT2

LIS2DH12_INT_TYPE_I2_BOOT 

enable boot on INT2

LIS2DH12_INT_TYPE_I2_IA2 

IA2 on INT2.

LIS2DH12_INT_TYPE_I2_IA1 

IA1 on INT2.

LIS2DH12_INT_TYPE_I2_CLICK 

click interrupt on INT2

LIS2DH12_INT_TYPE_IA2 

Event 2.

LIS2DH12_INT_TYPE_IA1 

Event 1.

LIS2DH12_INT_TYPE_CLICK 

click interrupt

Definition at line 89 of file lis2dh12_registers.h.

◆ anonymous enum

anonymous enum

Event slots.

Enumerator
LIS2DH12_EVENT_1 

first event slot

LIS2DH12_EVENT_2 

second event slot

LIS2DH12_EVENT_CLICK 

click event

Definition at line 114 of file lis2dh12_registers.h.