smartsens2 2.0.0.0
Smart Sens 2 Registers Settings

Settings for registers of Smart Sens 2 Click driver. More...

Macros

#define SMARTSENS2_SENSOR_ID_CUSTOM_START   160
 Smart Sens 2 virtual sensor IDs.
 
#define SMARTSENS2_SENSOR_ID_CUSTOM_END   191
 
#define SMARTSENS2_SENSOR_ID_MAX   200
 
#define SMARTSENS2_SENSOR_ID_TBD   SMARTSENS2_SENSOR_ID_MAX - 1
 
#define SMARTSENS2_SENSOR_ID_ACC_PASS   1 /* Accelerometer passthrough */
 
#define SMARTSENS2_SENSOR_ID_ACC_RAW   3 /* Accelerometer uncalibrated */
 
#define SMARTSENS2_SENSOR_ID_ACC   4 /* Accelerometer corrected */
 
#define SMARTSENS2_SENSOR_ID_ACC_BIAS   5 /* Accelerometer offset */
 
#define SMARTSENS2_SENSOR_ID_ACC_WU   6 /* Accelerometer corrected wake up */
 
#define SMARTSENS2_SENSOR_ID_ACC_RAW_WU   7 /* Accelerometer uncalibrated wake up */
 
#define SMARTSENS2_SENSOR_ID_GYRO_PASS   10 /* Gyroscope passthrough */
 
#define SMARTSENS2_SENSOR_ID_GYRO_RAW   12 /* Gyroscope uncalibrated */
 
#define SMARTSENS2_SENSOR_ID_GYRO   13 /* Gyroscope corrected */
 
#define SMARTSENS2_SENSOR_ID_GYRO_BIAS   14 /* Gyroscope offset */
 
#define SMARTSENS2_SENSOR_ID_GYRO_WU   15 /* Gyroscope wake up */
 
#define SMARTSENS2_SENSOR_ID_GYRO_RAW_WU   16 /* Gyroscope uncalibrated wake up */
 
#define SMARTSENS2_SENSOR_ID_MAG_PASS   19 /* Magnetometer passthrough */
 
#define SMARTSENS2_SENSOR_ID_MAG_RAW   21 /* Magnetometer uncalibrated */
 
#define SMARTSENS2_SENSOR_ID_MAG   22 /* Magnetometer corrected */
 
#define SMARTSENS2_SENSOR_ID_MAG_BIAS   23 /* Magnetometer offset */
 
#define SMARTSENS2_SENSOR_ID_MAG_WU   24 /* Magnetometer wake up */
 
#define SMARTSENS2_SENSOR_ID_MAG_RAW_WU   25 /* Magnetometer uncalibrated wake up */
 
#define SMARTSENS2_SENSOR_ID_GRA   28 /* Gravity vector */
 
#define SMARTSENS2_SENSOR_ID_GRA_WU   29 /* Gravity vector wake up */
 
#define SMARTSENS2_SENSOR_ID_LACC   31 /* Linear acceleration */
 
#define SMARTSENS2_SENSOR_ID_LACC_WU   32 /* Linear acceleration wake up */
 
#define SMARTSENS2_SENSOR_ID_RV   34 /* Rotation vector */
 
#define SMARTSENS2_SENSOR_ID_RV_WU   35 /* Rotation vector wake up */
 
#define SMARTSENS2_SENSOR_ID_GAMERV   37 /* Game rotation vector */
 
#define SMARTSENS2_SENSOR_ID_GAMERV_WU   38 /* Game rotation vector wake up */
 
#define SMARTSENS2_SENSOR_ID_GEORV   40 /* Geo-magnetic rotation vector */
 
#define SMARTSENS2_SENSOR_ID_GEORV_WU   41 /* Geo-magnetic rotation vector wake up */
 
#define SMARTSENS2_SENSOR_ID_ORI   43 /* Orientation */
 
#define SMARTSENS2_SENSOR_ID_ORI_WU   44 /* Orientation wake up */
 
#define SMARTSENS2_SENSOR_ID_TILT_DETECTOR   48 /* Tilt detector */
 
#define SMARTSENS2_SENSOR_ID_STD   50 /* Step detector */
 
#define SMARTSENS2_SENSOR_ID_STC   52 /* Step counter */
 
#define SMARTSENS2_SENSOR_ID_STC_WU   53 /* Step counter wake up */
 
#define SMARTSENS2_SENSOR_ID_SIG   55 /* Significant motion */
 
#define SMARTSENS2_SENSOR_ID_WAKE_GESTURE   57 /* Wake gesture */
 
#define SMARTSENS2_SENSOR_ID_GLANCE_GESTURE   59 /* Glance gesture */
 
#define SMARTSENS2_SENSOR_ID_PICKUP_GESTURE   61 /* Pickup gesture */
 
#define SMARTSENS2_SENSOR_ID_AR   63 /* Activity recognition */
 
#define SMARTSENS2_SENSOR_ID_WRIST_TILT_GESTURE   67 /* Wrist tilt gesture */
 
#define SMARTSENS2_SENSOR_ID_DEVICE_ORI   69 /* Device orientation */
 
#define SMARTSENS2_SENSOR_ID_DEVICE_ORI_WU   70 /* Device orientation wake up */
 
#define SMARTSENS2_SENSOR_ID_STATIONARY_DET   75 /* Stationary detect */
 
#define SMARTSENS2_SENSOR_ID_MOTION_DET   77 /* Motion detect */
 
#define SMARTSENS2_SENSOR_ID_ACC_BIAS_WU   91 /* Accelerometer offset wake up */
 
#define SMARTSENS2_SENSOR_ID_GYRO_BIAS_WU   92 /* Gyroscope offset wake up */
 
#define SMARTSENS2_SENSOR_ID_MAG_BIAS_WU   93 /* Magnetometer offset wake up */
 
#define SMARTSENS2_SENSOR_ID_STD_WU   94 /* Step detector wake up */
 
#define SMARTSENS2_SENSOR_ID_TEMP   128 /* Temperature */
 
#define SMARTSENS2_SENSOR_ID_BARO   129 /* Barometer */
 
#define SMARTSENS2_SENSOR_ID_HUM   130 /* Humidity */
 
#define SMARTSENS2_SENSOR_ID_GAS   131 /* Gas */
 
#define SMARTSENS2_SENSOR_ID_TEMP_WU   132 /* Temperature wake up */
 
#define SMARTSENS2_SENSOR_ID_BARO_WU   133 /* Barometer wake up */
 
#define SMARTSENS2_SENSOR_ID_HUM_WU   134 /* Humidity wake up */
 
#define SMARTSENS2_SENSOR_ID_GAS_WU   135 /* Gas wake up */
 
#define SMARTSENS2_SENSOR_ID_STC_HW   136 /* Hardware Step counter */
 
#define SMARTSENS2_SENSOR_ID_STD_HW   137 /* Hardware Step detector */
 
#define SMARTSENS2_SENSOR_ID_SIG_HW   138 /* Hardware Significant motion */
 
#define SMARTSENS2_SENSOR_ID_STC_HW_WU   139 /* Hardware Step counter wake up */
 
#define SMARTSENS2_SENSOR_ID_STD_HW_WU   140 /* Hardware Step detector wake up */
 
#define SMARTSENS2_SENSOR_ID_SIG_HW_WU   141 /* Hardware Significant motion wake up */
 
#define SMARTSENS2_SENSOR_ID_ANY_MOTION   142 /* Any motion */
 
#define SMARTSENS2_SENSOR_ID_ANY_MOTION_WU   143 /* Any motion wake up */
 
#define SMARTSENS2_SENSOR_ID_EXCAMERA   144 /* External camera trigger */
 
#define SMARTSENS2_SENSOR_ID_GPS   145 /* GPS */
 
#define SMARTSENS2_SENSOR_ID_LIGHT   146 /* Light */
 
#define SMARTSENS2_SENSOR_ID_PROX   147 /* Proximity */
 
#define SMARTSENS2_SENSOR_ID_LIGHT_WU   148 /* Light wake up */
 
#define SMARTSENS2_SENSOR_ID_PROX_WU   149 /* Proximity wake up */
 
#define SMARTSENS2_IS_SYS_ID(sid)   ( ( sid ) >= 224 )
 
#define SMARTSENS2_SYS_ID_PADDING   0
 
#define SMARTSENS2_SYS_ID_TS_SMALL_DELTA   251
 
#define SMARTSENS2_SYS_ID_TS_LARGE_DELTA   252
 
#define SMARTSENS2_SYS_ID_TS_FULL   253
 
#define SMARTSENS2_SYS_ID_META_EVENT   254
 
#define SMARTSENS2_SYS_ID_TS_SMALL_DELTA_WU   245
 
#define SMARTSENS2_SYS_ID_TS_LARGE_DELTA_WU   246
 
#define SMARTSENS2_SYS_ID_TS_FULL_WU   247
 
#define SMARTSENS2_SYS_ID_META_EVENT_WU   248
 
#define SMARTSENS2_SYS_ID_FILLER   255
 
#define SMARTSENS2_SYS_ID_DEBUG_MSG   250
 
#define SMARTSENS2_SYS_ID_SMARTSENS2_LOG_UPDATE_SUB   243
 
#define SMARTSENS2_SYS_ID_SMARTSENS2_LOG_DOSTEP   244
 
#define SMARTSENS2_N_VIRTUAL_SENSOR_MAX   256 /* Maximum no of available virtual sensor */
 
#define SMARTSENS2_SPECIAL_SENSOR_ID_OFFSET   245 /* Special & debug virtual sensor id starts at 245 */
 
#define SMARTSENS2_META_EVENT_FLUSH_COMPLETE   1
 Smart Sens 2 meta event definitions.
 
#define SMARTSENS2_META_EVENT_SAMPLE_RATE_CHANGED   2
 
#define SMARTSENS2_META_EVENT_POWER_MODE_CHANGED   3
 
#define SMARTSENS2_META_EVENT_ALGORITHM_EVENTS   5
 
#define SMARTSENS2_META_EVENT_SENSOR_STATUS   6
 
#define SMARTSENS2_META_EVENT_BSX_DO_STEPS_MAIN   7
 
#define SMARTSENS2_META_EVENT_BSX_DO_STEPS_CALIB   8
 
#define SMARTSENS2_META_EVENT_BSX_GET_OUTPUT_SIGNAL   9
 
#define SMARTSENS2_META_EVENT_RESERVED1   10
 
#define SMARTSENS2_META_EVENT_SENSOR_ERROR   11
 
#define SMARTSENS2_META_EVENT_FIFO_OVERFLOW   12
 
#define SMARTSENS2_META_EVENT_DYNAMIC_RANGE_CHANGED   13
 
#define SMARTSENS2_META_EVENT_FIFO_WATERMARK   14
 
#define SMARTSENS2_META_EVENT_RESERVED2   15
 
#define SMARTSENS2_META_EVENT_INITIALIZED   16
 
#define SMARTSENS2_META_TRANSFER_CAUSE   17
 
#define SMARTSENS2_META_EVENT_SENSOR_FRAMEWORK   18
 
#define SMARTSENS2_META_EVENT_RESET   19
 
#define SMARTSENS2_META_EVENT_SPACER   20
 
#define SMARTSENS2_CHIP_ID_VALUE   0x70
 Smart Sens 2 IDs.
 
#define SMARTSENS2_FUSER2_PRODUCT_ID_VALUE   0x89
 
#define SMARTSENS2_BOOTSTATUS_FLASH_DETECTED   0x01
 Boot status.
 
#define SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_DONE   0x02
 
#define SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_ERROR   0x04
 
#define SMARTSENS2_BOOTSTATUS_NO_FLASH   0x08
 
#define SMARTSENS2_BOOTSTATUS_HOST_INTERFACE_READY   0x10
 
#define SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_DONE   0x20
 
#define SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_ERROR   0x40
 
#define SMARTSENS2_BOOTSTATUS_HOST_FW_IDLE   0x80
 
#define SMARTSENS2_HOSTSTATUS_POWER_STATE   0x01
 Host status.
 
#define SMARTSENS2_HOSTSTATUS_HOST_PROTOCOL   0x02
 
#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_0   0x10
 
#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_1   0x20
 
#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_2   0x40
 
#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_3   0x80
 
#define SMARTSENS2_IST_MASK_ASSERTED   0x1
 Interrupt status.
 
#define SMARTSENS2_IST_MASK_FIFO_W   0x6
 
#define SMARTSENS2_IST_MASK_FIFO_NW   0x18
 
#define SMARTSENS2_IST_MASK_STATUS   0x20
 
#define SMARTSENS2_IST_MASK_DEBUG   0x40
 
#define SMARTSENS2_IST_MASK_RESET_FAULT   0x80
 
#define SMARTSENS2_IST_FIFO_W_DRDY   0x2
 
#define SMARTSENS2_IST_FIFO_W_LTCY   0x4
 
#define SMARTSENS2_IST_FIFO_W_WM   0x6
 
#define SMARTSENS2_IST_FIFO_NW_DRDY   0x8
 
#define SMARTSENS2_IST_FIFO_NW_LTCY   0x10
 
#define SMARTSENS2_IST_FIFO_NW_WM   0x18
 
#define SMARTSENS2_IS_INT_FIFO_W(status)   ( status & SMARTSENS2_IST_MASK_FIFO_W )
 
#define SMARTSENS2_IS_INT_FIFO_NW(status)   ( status & SMARTSENS2_IST_MASK_FIFO_NW )
 
#define SMARTSENS2_IS_INT_STATUS(status)   ( status & SMARTSENS2_IST_MASK_STATUS )
 
#define SMARTSENS2_IS_INT_ASYNC_STATUS(status)   ( status & SMARTSENS2_IST_MASK_DEBUG )
 
#define SMARTSENS2_IS_INT_RESET(status)   ( status & SMARTSENS2_IST_MASK_RESET_FAULT )
 
#define SMARTSENS2_IST_MASK_FIFO   ( SMARTSENS2_IST_MASK_FIFO_W | SMARTSENS2_IST_MASK_FIFO_NW )
 
#define SMARTSENS2_IS_INT_FIFO(status)   ( status & SMARTSENS2_IST_MASK_FIFO )
 
#define SMARTSENS2_ICTL_DISABLE_FIFO_W   0x01
 Interrupt control.
 
#define SMARTSENS2_ICTL_DISABLE_FIFO_NW   0x02
 
#define SMARTSENS2_ICTL_DISABLE_STATUS_FIFO   0x04
 
#define SMARTSENS2_ICTL_DISABLE_DEBUG   0x08
 
#define SMARTSENS2_ICTL_DISABLE_FAULT   0x10
 
#define SMARTSENS2_ICTL_ACTIVE_LOW   0x20
 
#define SMARTSENS2_ICTL_EDGE   0x40
 
#define SMARTSENS2_ICTL_OPEN_DRAIN   0x80
 
#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_0   0x01
 Host interface control.
 
#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_1   0x02
 
#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_2   0x04
 
#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_3   0x08
 
#define SMARTSENS2_HIF_CTRL_AP_SUSPENDED   0x10
 
#define SMARTSENS2_HIF_CTRL_TIMESTAMP_EV_CTRL   0x40
 
#define SMARTSENS2_HIF_CTRL_ASYNC_STATUS_CHANNEL   0x80
 
#define SMARTSENS2_LE2U16(x)   ( ( uint16_t )( ( x )[ 0 ] | ( x )[ 1 ] << 8 ) )
 Converter macros.
 
#define SMARTSENS2_LE2S16(x)   ( ( int16_t )SMARTSENS2_LE2U16( x ) )
 
#define SMARTSENS2_LE2U24(x)
 
#define SMARTSENS2_LE2U32(x)
 
#define SMARTSENS2_LE2S32(x)   ( ( int32_t )SMARTSENS2_LE2U32( x ) )
 
#define SMARTSENS2_LE2U40(x)   ( SMARTSENS2_LE2U32( x ) | ( uint32_t )( x )[ 4 ] << 32 )
 
#define SMARTSENS2_TIMESTAMP_TO_SEC(x)   ( ( uint32_t ) ( x * ( 15625.0 / UINT32_C( 1000000000 ) ) ) )
 
#define SMARTSENS2_SLAVE_ADDRESS_1   0x29
 Smart Sens 2 device address setting.
 
#define SMARTSENS2_SLAVE_ADDRESS_0   0x28
 
#define SMARTSENS2_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define SMARTSENS2_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 

Detailed Description

Settings for registers of Smart Sens 2 Click driver.

Macro Definition Documentation

◆ SMARTSENS2_BOOTSTATUS_FLASH_DETECTED

#define SMARTSENS2_BOOTSTATUS_FLASH_DETECTED   0x01

Boot status.

Boot status masks of the Smart Sens 2.

◆ SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_DONE

#define SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_DONE   0x02

◆ SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_ERROR

#define SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_ERROR   0x04

◆ SMARTSENS2_BOOTSTATUS_HOST_FW_IDLE

#define SMARTSENS2_BOOTSTATUS_HOST_FW_IDLE   0x80

◆ SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_DONE

#define SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_DONE   0x20

◆ SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_ERROR

#define SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_ERROR   0x40

◆ SMARTSENS2_BOOTSTATUS_HOST_INTERFACE_READY

#define SMARTSENS2_BOOTSTATUS_HOST_INTERFACE_READY   0x10

◆ SMARTSENS2_BOOTSTATUS_NO_FLASH

#define SMARTSENS2_BOOTSTATUS_NO_FLASH   0x08

◆ SMARTSENS2_CHIP_ID_VALUE

#define SMARTSENS2_CHIP_ID_VALUE   0x70

Smart Sens 2 IDs.

Chip and product IDs of the Smart Sens 2.

◆ SMARTSENS2_FUSER2_PRODUCT_ID_VALUE

#define SMARTSENS2_FUSER2_PRODUCT_ID_VALUE   0x89

◆ SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_0

#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_0   0x01

Host interface control.

Host interface control bits of the Smart Sens 2.

◆ SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_1

#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_1   0x02

◆ SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_2

#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_2   0x04

◆ SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_3

#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_3   0x08

◆ SMARTSENS2_HIF_CTRL_AP_SUSPENDED

#define SMARTSENS2_HIF_CTRL_AP_SUSPENDED   0x10

◆ SMARTSENS2_HIF_CTRL_ASYNC_STATUS_CHANNEL

#define SMARTSENS2_HIF_CTRL_ASYNC_STATUS_CHANNEL   0x80

◆ SMARTSENS2_HIF_CTRL_TIMESTAMP_EV_CTRL

#define SMARTSENS2_HIF_CTRL_TIMESTAMP_EV_CTRL   0x40

◆ SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_0

#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_0   0x10

◆ SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_1

#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_1   0x20

◆ SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_2

#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_2   0x40

◆ SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_3

#define SMARTSENS2_HOSTSTATUS_HOST_CHANNEL_3   0x80

◆ SMARTSENS2_HOSTSTATUS_HOST_PROTOCOL

#define SMARTSENS2_HOSTSTATUS_HOST_PROTOCOL   0x02

◆ SMARTSENS2_HOSTSTATUS_POWER_STATE

#define SMARTSENS2_HOSTSTATUS_POWER_STATE   0x01

Host status.

Host status masks of the Smart Sens 2.

◆ SMARTSENS2_ICTL_ACTIVE_LOW

#define SMARTSENS2_ICTL_ACTIVE_LOW   0x20

◆ SMARTSENS2_ICTL_DISABLE_DEBUG

#define SMARTSENS2_ICTL_DISABLE_DEBUG   0x08

◆ SMARTSENS2_ICTL_DISABLE_FAULT

#define SMARTSENS2_ICTL_DISABLE_FAULT   0x10

◆ SMARTSENS2_ICTL_DISABLE_FIFO_NW

#define SMARTSENS2_ICTL_DISABLE_FIFO_NW   0x02

◆ SMARTSENS2_ICTL_DISABLE_FIFO_W

#define SMARTSENS2_ICTL_DISABLE_FIFO_W   0x01

Interrupt control.

Interrupt control bits of the Smart Sens 2.

◆ SMARTSENS2_ICTL_DISABLE_STATUS_FIFO

#define SMARTSENS2_ICTL_DISABLE_STATUS_FIFO   0x04

◆ SMARTSENS2_ICTL_EDGE

#define SMARTSENS2_ICTL_EDGE   0x40

◆ SMARTSENS2_ICTL_OPEN_DRAIN

#define SMARTSENS2_ICTL_OPEN_DRAIN   0x80

◆ SMARTSENS2_IS_INT_ASYNC_STATUS

#define SMARTSENS2_IS_INT_ASYNC_STATUS ( status)    ( status & SMARTSENS2_IST_MASK_DEBUG )

◆ SMARTSENS2_IS_INT_FIFO

#define SMARTSENS2_IS_INT_FIFO ( status)    ( status & SMARTSENS2_IST_MASK_FIFO )

◆ SMARTSENS2_IS_INT_FIFO_NW

#define SMARTSENS2_IS_INT_FIFO_NW ( status)    ( status & SMARTSENS2_IST_MASK_FIFO_NW )

◆ SMARTSENS2_IS_INT_FIFO_W

#define SMARTSENS2_IS_INT_FIFO_W ( status)    ( status & SMARTSENS2_IST_MASK_FIFO_W )

◆ SMARTSENS2_IS_INT_RESET

#define SMARTSENS2_IS_INT_RESET ( status)    ( status & SMARTSENS2_IST_MASK_RESET_FAULT )

◆ SMARTSENS2_IS_INT_STATUS

#define SMARTSENS2_IS_INT_STATUS ( status)    ( status & SMARTSENS2_IST_MASK_STATUS )

◆ SMARTSENS2_IS_SYS_ID

#define SMARTSENS2_IS_SYS_ID ( sid)    ( ( sid ) >= 224 )

◆ SMARTSENS2_IST_FIFO_NW_DRDY

#define SMARTSENS2_IST_FIFO_NW_DRDY   0x8

◆ SMARTSENS2_IST_FIFO_NW_LTCY

#define SMARTSENS2_IST_FIFO_NW_LTCY   0x10

◆ SMARTSENS2_IST_FIFO_NW_WM

#define SMARTSENS2_IST_FIFO_NW_WM   0x18

◆ SMARTSENS2_IST_FIFO_W_DRDY

#define SMARTSENS2_IST_FIFO_W_DRDY   0x2

◆ SMARTSENS2_IST_FIFO_W_LTCY

#define SMARTSENS2_IST_FIFO_W_LTCY   0x4

◆ SMARTSENS2_IST_FIFO_W_WM

#define SMARTSENS2_IST_FIFO_W_WM   0x6

◆ SMARTSENS2_IST_MASK_ASSERTED

#define SMARTSENS2_IST_MASK_ASSERTED   0x1

Interrupt status.

Interrupt status masks of the Smart Sens 2.

◆ SMARTSENS2_IST_MASK_DEBUG

#define SMARTSENS2_IST_MASK_DEBUG   0x40

◆ SMARTSENS2_IST_MASK_FIFO

#define SMARTSENS2_IST_MASK_FIFO   ( SMARTSENS2_IST_MASK_FIFO_W | SMARTSENS2_IST_MASK_FIFO_NW )

◆ SMARTSENS2_IST_MASK_FIFO_NW

#define SMARTSENS2_IST_MASK_FIFO_NW   0x18

◆ SMARTSENS2_IST_MASK_FIFO_W

#define SMARTSENS2_IST_MASK_FIFO_W   0x6

◆ SMARTSENS2_IST_MASK_RESET_FAULT

#define SMARTSENS2_IST_MASK_RESET_FAULT   0x80

◆ SMARTSENS2_IST_MASK_STATUS

#define SMARTSENS2_IST_MASK_STATUS   0x20

◆ SMARTSENS2_LE2S16

#define SMARTSENS2_LE2S16 ( x)    ( ( int16_t )SMARTSENS2_LE2U16( x ) )

◆ SMARTSENS2_LE2S32

#define SMARTSENS2_LE2S32 ( x)    ( ( int32_t )SMARTSENS2_LE2U32( x ) )

◆ SMARTSENS2_LE2U16

#define SMARTSENS2_LE2U16 ( x)    ( ( uint16_t )( ( x )[ 0 ] | ( x )[ 1 ] << 8 ) )

Converter macros.

Macros for converting arrays to whole value.

◆ SMARTSENS2_LE2U24

#define SMARTSENS2_LE2U24 ( x)
Value:
( ( uint32_t )( ( x )[ 0 ] | \
( uint32_t )( x )[ 1 ] << 8 | \
( uint32_t )( x )[ 2 ] << 16 ) )

◆ SMARTSENS2_LE2U32

#define SMARTSENS2_LE2U32 ( x)
Value:
( ( uint32_t )( ( x )[ 0 ] | \
( uint32_t )( x )[ 1 ] << 8 | \
( uint32_t )( x )[ 2 ] << 16 | \
( uint32_t )( x )[ 3 ] << 24 ) )

◆ SMARTSENS2_LE2U40

#define SMARTSENS2_LE2U40 ( x)    ( SMARTSENS2_LE2U32( x ) | ( uint32_t )( x )[ 4 ] << 32 )

◆ SMARTSENS2_META_EVENT_ALGORITHM_EVENTS

#define SMARTSENS2_META_EVENT_ALGORITHM_EVENTS   5

◆ SMARTSENS2_META_EVENT_BSX_DO_STEPS_CALIB

#define SMARTSENS2_META_EVENT_BSX_DO_STEPS_CALIB   8

◆ SMARTSENS2_META_EVENT_BSX_DO_STEPS_MAIN

#define SMARTSENS2_META_EVENT_BSX_DO_STEPS_MAIN   7

◆ SMARTSENS2_META_EVENT_BSX_GET_OUTPUT_SIGNAL

#define SMARTSENS2_META_EVENT_BSX_GET_OUTPUT_SIGNAL   9

◆ SMARTSENS2_META_EVENT_DYNAMIC_RANGE_CHANGED

#define SMARTSENS2_META_EVENT_DYNAMIC_RANGE_CHANGED   13

◆ SMARTSENS2_META_EVENT_FIFO_OVERFLOW

#define SMARTSENS2_META_EVENT_FIFO_OVERFLOW   12

◆ SMARTSENS2_META_EVENT_FIFO_WATERMARK

#define SMARTSENS2_META_EVENT_FIFO_WATERMARK   14

◆ SMARTSENS2_META_EVENT_FLUSH_COMPLETE

#define SMARTSENS2_META_EVENT_FLUSH_COMPLETE   1

Smart Sens 2 meta event definitions.

Definitions of the meta event of the Smart Sens 2 firmware image.

◆ SMARTSENS2_META_EVENT_INITIALIZED

#define SMARTSENS2_META_EVENT_INITIALIZED   16

◆ SMARTSENS2_META_EVENT_POWER_MODE_CHANGED

#define SMARTSENS2_META_EVENT_POWER_MODE_CHANGED   3

◆ SMARTSENS2_META_EVENT_RESERVED1

#define SMARTSENS2_META_EVENT_RESERVED1   10

◆ SMARTSENS2_META_EVENT_RESERVED2

#define SMARTSENS2_META_EVENT_RESERVED2   15

◆ SMARTSENS2_META_EVENT_RESET

#define SMARTSENS2_META_EVENT_RESET   19

◆ SMARTSENS2_META_EVENT_SAMPLE_RATE_CHANGED

#define SMARTSENS2_META_EVENT_SAMPLE_RATE_CHANGED   2

◆ SMARTSENS2_META_EVENT_SENSOR_ERROR

#define SMARTSENS2_META_EVENT_SENSOR_ERROR   11

◆ SMARTSENS2_META_EVENT_SENSOR_FRAMEWORK

#define SMARTSENS2_META_EVENT_SENSOR_FRAMEWORK   18

◆ SMARTSENS2_META_EVENT_SENSOR_STATUS

#define SMARTSENS2_META_EVENT_SENSOR_STATUS   6

◆ SMARTSENS2_META_EVENT_SPACER

#define SMARTSENS2_META_EVENT_SPACER   20

◆ SMARTSENS2_META_TRANSFER_CAUSE

#define SMARTSENS2_META_TRANSFER_CAUSE   17

◆ SMARTSENS2_N_VIRTUAL_SENSOR_MAX

#define SMARTSENS2_N_VIRTUAL_SENSOR_MAX   256 /* Maximum no of available virtual sensor */

◆ SMARTSENS2_SENSOR_ID_ACC

#define SMARTSENS2_SENSOR_ID_ACC   4 /* Accelerometer corrected */

◆ SMARTSENS2_SENSOR_ID_ACC_BIAS

#define SMARTSENS2_SENSOR_ID_ACC_BIAS   5 /* Accelerometer offset */

◆ SMARTSENS2_SENSOR_ID_ACC_BIAS_WU

#define SMARTSENS2_SENSOR_ID_ACC_BIAS_WU   91 /* Accelerometer offset wake up */

◆ SMARTSENS2_SENSOR_ID_ACC_PASS

#define SMARTSENS2_SENSOR_ID_ACC_PASS   1 /* Accelerometer passthrough */

◆ SMARTSENS2_SENSOR_ID_ACC_RAW

#define SMARTSENS2_SENSOR_ID_ACC_RAW   3 /* Accelerometer uncalibrated */

◆ SMARTSENS2_SENSOR_ID_ACC_RAW_WU

#define SMARTSENS2_SENSOR_ID_ACC_RAW_WU   7 /* Accelerometer uncalibrated wake up */

◆ SMARTSENS2_SENSOR_ID_ACC_WU

#define SMARTSENS2_SENSOR_ID_ACC_WU   6 /* Accelerometer corrected wake up */

◆ SMARTSENS2_SENSOR_ID_ANY_MOTION

#define SMARTSENS2_SENSOR_ID_ANY_MOTION   142 /* Any motion */

◆ SMARTSENS2_SENSOR_ID_ANY_MOTION_WU

#define SMARTSENS2_SENSOR_ID_ANY_MOTION_WU   143 /* Any motion wake up */

◆ SMARTSENS2_SENSOR_ID_AR

#define SMARTSENS2_SENSOR_ID_AR   63 /* Activity recognition */

◆ SMARTSENS2_SENSOR_ID_BARO

#define SMARTSENS2_SENSOR_ID_BARO   129 /* Barometer */

◆ SMARTSENS2_SENSOR_ID_BARO_WU

#define SMARTSENS2_SENSOR_ID_BARO_WU   133 /* Barometer wake up */

◆ SMARTSENS2_SENSOR_ID_CUSTOM_END

#define SMARTSENS2_SENSOR_ID_CUSTOM_END   191

◆ SMARTSENS2_SENSOR_ID_CUSTOM_START

#define SMARTSENS2_SENSOR_ID_CUSTOM_START   160

Smart Sens 2 virtual sensor IDs.

IDs of the virtual sensors of Smart Sens 2 firmware image.

◆ SMARTSENS2_SENSOR_ID_DEVICE_ORI

#define SMARTSENS2_SENSOR_ID_DEVICE_ORI   69 /* Device orientation */

◆ SMARTSENS2_SENSOR_ID_DEVICE_ORI_WU

#define SMARTSENS2_SENSOR_ID_DEVICE_ORI_WU   70 /* Device orientation wake up */

◆ SMARTSENS2_SENSOR_ID_EXCAMERA

#define SMARTSENS2_SENSOR_ID_EXCAMERA   144 /* External camera trigger */

◆ SMARTSENS2_SENSOR_ID_GAMERV

#define SMARTSENS2_SENSOR_ID_GAMERV   37 /* Game rotation vector */

◆ SMARTSENS2_SENSOR_ID_GAMERV_WU

#define SMARTSENS2_SENSOR_ID_GAMERV_WU   38 /* Game rotation vector wake up */

◆ SMARTSENS2_SENSOR_ID_GAS

#define SMARTSENS2_SENSOR_ID_GAS   131 /* Gas */

◆ SMARTSENS2_SENSOR_ID_GAS_WU

#define SMARTSENS2_SENSOR_ID_GAS_WU   135 /* Gas wake up */

◆ SMARTSENS2_SENSOR_ID_GEORV

#define SMARTSENS2_SENSOR_ID_GEORV   40 /* Geo-magnetic rotation vector */

◆ SMARTSENS2_SENSOR_ID_GEORV_WU

#define SMARTSENS2_SENSOR_ID_GEORV_WU   41 /* Geo-magnetic rotation vector wake up */

◆ SMARTSENS2_SENSOR_ID_GLANCE_GESTURE

#define SMARTSENS2_SENSOR_ID_GLANCE_GESTURE   59 /* Glance gesture */

◆ SMARTSENS2_SENSOR_ID_GPS

#define SMARTSENS2_SENSOR_ID_GPS   145 /* GPS */

◆ SMARTSENS2_SENSOR_ID_GRA

#define SMARTSENS2_SENSOR_ID_GRA   28 /* Gravity vector */

◆ SMARTSENS2_SENSOR_ID_GRA_WU

#define SMARTSENS2_SENSOR_ID_GRA_WU   29 /* Gravity vector wake up */

◆ SMARTSENS2_SENSOR_ID_GYRO

#define SMARTSENS2_SENSOR_ID_GYRO   13 /* Gyroscope corrected */

◆ SMARTSENS2_SENSOR_ID_GYRO_BIAS

#define SMARTSENS2_SENSOR_ID_GYRO_BIAS   14 /* Gyroscope offset */

◆ SMARTSENS2_SENSOR_ID_GYRO_BIAS_WU

#define SMARTSENS2_SENSOR_ID_GYRO_BIAS_WU   92 /* Gyroscope offset wake up */

◆ SMARTSENS2_SENSOR_ID_GYRO_PASS

#define SMARTSENS2_SENSOR_ID_GYRO_PASS   10 /* Gyroscope passthrough */

◆ SMARTSENS2_SENSOR_ID_GYRO_RAW

#define SMARTSENS2_SENSOR_ID_GYRO_RAW   12 /* Gyroscope uncalibrated */

◆ SMARTSENS2_SENSOR_ID_GYRO_RAW_WU

#define SMARTSENS2_SENSOR_ID_GYRO_RAW_WU   16 /* Gyroscope uncalibrated wake up */

◆ SMARTSENS2_SENSOR_ID_GYRO_WU

#define SMARTSENS2_SENSOR_ID_GYRO_WU   15 /* Gyroscope wake up */

◆ SMARTSENS2_SENSOR_ID_HUM

#define SMARTSENS2_SENSOR_ID_HUM   130 /* Humidity */

◆ SMARTSENS2_SENSOR_ID_HUM_WU

#define SMARTSENS2_SENSOR_ID_HUM_WU   134 /* Humidity wake up */

◆ SMARTSENS2_SENSOR_ID_LACC

#define SMARTSENS2_SENSOR_ID_LACC   31 /* Linear acceleration */

◆ SMARTSENS2_SENSOR_ID_LACC_WU

#define SMARTSENS2_SENSOR_ID_LACC_WU   32 /* Linear acceleration wake up */

◆ SMARTSENS2_SENSOR_ID_LIGHT

#define SMARTSENS2_SENSOR_ID_LIGHT   146 /* Light */

◆ SMARTSENS2_SENSOR_ID_LIGHT_WU

#define SMARTSENS2_SENSOR_ID_LIGHT_WU   148 /* Light wake up */

◆ SMARTSENS2_SENSOR_ID_MAG

#define SMARTSENS2_SENSOR_ID_MAG   22 /* Magnetometer corrected */

◆ SMARTSENS2_SENSOR_ID_MAG_BIAS

#define SMARTSENS2_SENSOR_ID_MAG_BIAS   23 /* Magnetometer offset */

◆ SMARTSENS2_SENSOR_ID_MAG_BIAS_WU

#define SMARTSENS2_SENSOR_ID_MAG_BIAS_WU   93 /* Magnetometer offset wake up */

◆ SMARTSENS2_SENSOR_ID_MAG_PASS

#define SMARTSENS2_SENSOR_ID_MAG_PASS   19 /* Magnetometer passthrough */

◆ SMARTSENS2_SENSOR_ID_MAG_RAW

#define SMARTSENS2_SENSOR_ID_MAG_RAW   21 /* Magnetometer uncalibrated */

◆ SMARTSENS2_SENSOR_ID_MAG_RAW_WU

#define SMARTSENS2_SENSOR_ID_MAG_RAW_WU   25 /* Magnetometer uncalibrated wake up */

◆ SMARTSENS2_SENSOR_ID_MAG_WU

#define SMARTSENS2_SENSOR_ID_MAG_WU   24 /* Magnetometer wake up */

◆ SMARTSENS2_SENSOR_ID_MAX

#define SMARTSENS2_SENSOR_ID_MAX   200

◆ SMARTSENS2_SENSOR_ID_MOTION_DET

#define SMARTSENS2_SENSOR_ID_MOTION_DET   77 /* Motion detect */

◆ SMARTSENS2_SENSOR_ID_ORI

#define SMARTSENS2_SENSOR_ID_ORI   43 /* Orientation */

◆ SMARTSENS2_SENSOR_ID_ORI_WU

#define SMARTSENS2_SENSOR_ID_ORI_WU   44 /* Orientation wake up */

◆ SMARTSENS2_SENSOR_ID_PICKUP_GESTURE

#define SMARTSENS2_SENSOR_ID_PICKUP_GESTURE   61 /* Pickup gesture */

◆ SMARTSENS2_SENSOR_ID_PROX

#define SMARTSENS2_SENSOR_ID_PROX   147 /* Proximity */

◆ SMARTSENS2_SENSOR_ID_PROX_WU

#define SMARTSENS2_SENSOR_ID_PROX_WU   149 /* Proximity wake up */

◆ SMARTSENS2_SENSOR_ID_RV

#define SMARTSENS2_SENSOR_ID_RV   34 /* Rotation vector */

◆ SMARTSENS2_SENSOR_ID_RV_WU

#define SMARTSENS2_SENSOR_ID_RV_WU   35 /* Rotation vector wake up */

◆ SMARTSENS2_SENSOR_ID_SIG

#define SMARTSENS2_SENSOR_ID_SIG   55 /* Significant motion */

◆ SMARTSENS2_SENSOR_ID_SIG_HW

#define SMARTSENS2_SENSOR_ID_SIG_HW   138 /* Hardware Significant motion */

◆ SMARTSENS2_SENSOR_ID_SIG_HW_WU

#define SMARTSENS2_SENSOR_ID_SIG_HW_WU   141 /* Hardware Significant motion wake up */

◆ SMARTSENS2_SENSOR_ID_STATIONARY_DET

#define SMARTSENS2_SENSOR_ID_STATIONARY_DET   75 /* Stationary detect */

◆ SMARTSENS2_SENSOR_ID_STC

#define SMARTSENS2_SENSOR_ID_STC   52 /* Step counter */

◆ SMARTSENS2_SENSOR_ID_STC_HW

#define SMARTSENS2_SENSOR_ID_STC_HW   136 /* Hardware Step counter */

◆ SMARTSENS2_SENSOR_ID_STC_HW_WU

#define SMARTSENS2_SENSOR_ID_STC_HW_WU   139 /* Hardware Step counter wake up */

◆ SMARTSENS2_SENSOR_ID_STC_WU

#define SMARTSENS2_SENSOR_ID_STC_WU   53 /* Step counter wake up */

◆ SMARTSENS2_SENSOR_ID_STD

#define SMARTSENS2_SENSOR_ID_STD   50 /* Step detector */

◆ SMARTSENS2_SENSOR_ID_STD_HW

#define SMARTSENS2_SENSOR_ID_STD_HW   137 /* Hardware Step detector */

◆ SMARTSENS2_SENSOR_ID_STD_HW_WU

#define SMARTSENS2_SENSOR_ID_STD_HW_WU   140 /* Hardware Step detector wake up */

◆ SMARTSENS2_SENSOR_ID_STD_WU

#define SMARTSENS2_SENSOR_ID_STD_WU   94 /* Step detector wake up */

◆ SMARTSENS2_SENSOR_ID_TBD

#define SMARTSENS2_SENSOR_ID_TBD   SMARTSENS2_SENSOR_ID_MAX - 1

◆ SMARTSENS2_SENSOR_ID_TEMP

#define SMARTSENS2_SENSOR_ID_TEMP   128 /* Temperature */

◆ SMARTSENS2_SENSOR_ID_TEMP_WU

#define SMARTSENS2_SENSOR_ID_TEMP_WU   132 /* Temperature wake up */

◆ SMARTSENS2_SENSOR_ID_TILT_DETECTOR

#define SMARTSENS2_SENSOR_ID_TILT_DETECTOR   48 /* Tilt detector */

◆ SMARTSENS2_SENSOR_ID_WAKE_GESTURE

#define SMARTSENS2_SENSOR_ID_WAKE_GESTURE   57 /* Wake gesture */

◆ SMARTSENS2_SENSOR_ID_WRIST_TILT_GESTURE

#define SMARTSENS2_SENSOR_ID_WRIST_TILT_GESTURE   67 /* Wrist tilt gesture */

◆ SMARTSENS2_SET_DATA_SAMPLE_EDGE

#define SMARTSENS2_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 smartsens2_init which will set SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.

◆ SMARTSENS2_SET_DATA_SAMPLE_MIDDLE

#define SMARTSENS2_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE

◆ SMARTSENS2_SLAVE_ADDRESS_0

#define SMARTSENS2_SLAVE_ADDRESS_0   0x28

◆ SMARTSENS2_SLAVE_ADDRESS_1

#define SMARTSENS2_SLAVE_ADDRESS_1   0x29

Smart Sens 2 device address setting.

Specified setting for device slave address selection of Smart Sens 2 Click driver.

◆ SMARTSENS2_SPECIAL_SENSOR_ID_OFFSET

#define SMARTSENS2_SPECIAL_SENSOR_ID_OFFSET   245 /* Special & debug virtual sensor id starts at 245 */

◆ SMARTSENS2_SYS_ID_DEBUG_MSG

#define SMARTSENS2_SYS_ID_DEBUG_MSG   250

◆ SMARTSENS2_SYS_ID_FILLER

#define SMARTSENS2_SYS_ID_FILLER   255

◆ SMARTSENS2_SYS_ID_META_EVENT

#define SMARTSENS2_SYS_ID_META_EVENT   254

◆ SMARTSENS2_SYS_ID_META_EVENT_WU

#define SMARTSENS2_SYS_ID_META_EVENT_WU   248

◆ SMARTSENS2_SYS_ID_PADDING

#define SMARTSENS2_SYS_ID_PADDING   0

◆ SMARTSENS2_SYS_ID_SMARTSENS2_LOG_DOSTEP

#define SMARTSENS2_SYS_ID_SMARTSENS2_LOG_DOSTEP   244

◆ SMARTSENS2_SYS_ID_SMARTSENS2_LOG_UPDATE_SUB

#define SMARTSENS2_SYS_ID_SMARTSENS2_LOG_UPDATE_SUB   243

◆ SMARTSENS2_SYS_ID_TS_FULL

#define SMARTSENS2_SYS_ID_TS_FULL   253

◆ SMARTSENS2_SYS_ID_TS_FULL_WU

#define SMARTSENS2_SYS_ID_TS_FULL_WU   247

◆ SMARTSENS2_SYS_ID_TS_LARGE_DELTA

#define SMARTSENS2_SYS_ID_TS_LARGE_DELTA   252

◆ SMARTSENS2_SYS_ID_TS_LARGE_DELTA_WU

#define SMARTSENS2_SYS_ID_TS_LARGE_DELTA_WU   246

◆ SMARTSENS2_SYS_ID_TS_SMALL_DELTA

#define SMARTSENS2_SYS_ID_TS_SMALL_DELTA   251

◆ SMARTSENS2_SYS_ID_TS_SMALL_DELTA_WU

#define SMARTSENS2_SYS_ID_TS_SMALL_DELTA_WU   245

◆ SMARTSENS2_TIMESTAMP_TO_SEC

#define SMARTSENS2_TIMESTAMP_TO_SEC ( x)    ( ( uint32_t ) ( x * ( 15625.0 / UINT32_C( 1000000000 ) ) ) )