smartsens2 2.0.0.0
|
Settings for registers of Smart Sens 2 Click driver. More...
Settings for registers of Smart Sens 2 Click driver.
#define SMARTSENS2_BOOTSTATUS_FLASH_DETECTED 0x01 |
Boot status.
Boot status masks of the Smart Sens 2.
#define SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_DONE 0x02 |
#define SMARTSENS2_BOOTSTATUS_FLASH_VERIFY_ERROR 0x04 |
#define SMARTSENS2_BOOTSTATUS_HOST_FW_IDLE 0x80 |
#define SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_DONE 0x20 |
#define SMARTSENS2_BOOTSTATUS_HOST_FW_VERIFY_ERROR 0x40 |
#define SMARTSENS2_BOOTSTATUS_HOST_INTERFACE_READY 0x10 |
#define SMARTSENS2_BOOTSTATUS_NO_FLASH 0x08 |
#define SMARTSENS2_CHIP_ID_VALUE 0x70 |
Smart Sens 2 IDs.
Chip and product IDs of the Smart Sens 2.
#define SMARTSENS2_FUSER2_PRODUCT_ID_VALUE 0x89 |
#define SMARTSENS2_HIF_CTRL_ABORT_TRANSFER_CHANNEL_0 0x01 |
Host interface control.
Host interface control bits of the Smart Sens 2.
#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_ASYNC_STATUS_CHANNEL 0x80 |
#define SMARTSENS2_HIF_CTRL_TIMESTAMP_EV_CTRL 0x40 |
#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_HOSTSTATUS_HOST_PROTOCOL 0x02 |
#define SMARTSENS2_HOSTSTATUS_POWER_STATE 0x01 |
Host status.
Host status masks of the Smart Sens 2.
#define SMARTSENS2_ICTL_ACTIVE_LOW 0x20 |
#define SMARTSENS2_ICTL_DISABLE_DEBUG 0x08 |
#define SMARTSENS2_ICTL_DISABLE_FAULT 0x10 |
#define SMARTSENS2_ICTL_DISABLE_FIFO_NW 0x02 |
#define SMARTSENS2_ICTL_DISABLE_FIFO_W 0x01 |
Interrupt control.
Interrupt control bits of the Smart Sens 2.
#define SMARTSENS2_ICTL_DISABLE_STATUS_FIFO 0x04 |
#define SMARTSENS2_ICTL_EDGE 0x40 |
#define SMARTSENS2_ICTL_OPEN_DRAIN 0x80 |
#define SMARTSENS2_IS_INT_ASYNC_STATUS | ( | status | ) | ( status & SMARTSENS2_IST_MASK_DEBUG ) |
#define SMARTSENS2_IS_INT_FIFO | ( | status | ) | ( status & SMARTSENS2_IST_MASK_FIFO ) |
#define SMARTSENS2_IS_INT_FIFO_NW | ( | status | ) | ( status & SMARTSENS2_IST_MASK_FIFO_NW ) |
#define SMARTSENS2_IS_INT_FIFO_W | ( | status | ) | ( status & SMARTSENS2_IST_MASK_FIFO_W ) |
#define SMARTSENS2_IS_INT_RESET | ( | status | ) | ( status & SMARTSENS2_IST_MASK_RESET_FAULT ) |
#define SMARTSENS2_IS_INT_STATUS | ( | status | ) | ( status & SMARTSENS2_IST_MASK_STATUS ) |
#define SMARTSENS2_IS_SYS_ID | ( | sid | ) | ( ( sid ) >= 224 ) |
#define SMARTSENS2_IST_FIFO_NW_DRDY 0x8 |
#define SMARTSENS2_IST_FIFO_NW_LTCY 0x10 |
#define SMARTSENS2_IST_FIFO_NW_WM 0x18 |
#define SMARTSENS2_IST_FIFO_W_DRDY 0x2 |
#define SMARTSENS2_IST_FIFO_W_LTCY 0x4 |
#define SMARTSENS2_IST_FIFO_W_WM 0x6 |
#define SMARTSENS2_IST_MASK_ASSERTED 0x1 |
Interrupt status.
Interrupt status masks of the Smart Sens 2.
#define SMARTSENS2_IST_MASK_DEBUG 0x40 |
#define SMARTSENS2_IST_MASK_FIFO ( SMARTSENS2_IST_MASK_FIFO_W | SMARTSENS2_IST_MASK_FIFO_NW ) |
#define SMARTSENS2_IST_MASK_FIFO_NW 0x18 |
#define SMARTSENS2_IST_MASK_FIFO_W 0x6 |
#define SMARTSENS2_IST_MASK_RESET_FAULT 0x80 |
#define SMARTSENS2_IST_MASK_STATUS 0x20 |
#define SMARTSENS2_LE2S16 | ( | x | ) | ( ( int16_t )SMARTSENS2_LE2U16( x ) ) |
#define SMARTSENS2_LE2S32 | ( | x | ) | ( ( int32_t )SMARTSENS2_LE2U32( x ) ) |
#define SMARTSENS2_LE2U16 | ( | x | ) | ( ( uint16_t )( ( x )[ 0 ] | ( x )[ 1 ] << 8 ) ) |
Converter macros.
Macros for converting arrays to whole value.
#define SMARTSENS2_LE2U24 | ( | x | ) |
#define SMARTSENS2_LE2U32 | ( | x | ) |
#define SMARTSENS2_LE2U40 | ( | x | ) | ( SMARTSENS2_LE2U32( x ) | ( uint32_t )( x )[ 4 ] << 32 ) |
#define SMARTSENS2_META_EVENT_ALGORITHM_EVENTS 5 |
#define SMARTSENS2_META_EVENT_BSX_DO_STEPS_CALIB 8 |
#define SMARTSENS2_META_EVENT_BSX_DO_STEPS_MAIN 7 |
#define SMARTSENS2_META_EVENT_BSX_GET_OUTPUT_SIGNAL 9 |
#define SMARTSENS2_META_EVENT_DYNAMIC_RANGE_CHANGED 13 |
#define SMARTSENS2_META_EVENT_FIFO_OVERFLOW 12 |
#define SMARTSENS2_META_EVENT_FIFO_WATERMARK 14 |
#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.
#define SMARTSENS2_META_EVENT_INITIALIZED 16 |
#define SMARTSENS2_META_EVENT_POWER_MODE_CHANGED 3 |
#define SMARTSENS2_META_EVENT_RESERVED1 10 |
#define SMARTSENS2_META_EVENT_RESERVED2 15 |
#define SMARTSENS2_META_EVENT_RESET 19 |
#define SMARTSENS2_META_EVENT_SAMPLE_RATE_CHANGED 2 |
#define SMARTSENS2_META_EVENT_SENSOR_ERROR 11 |
#define SMARTSENS2_META_EVENT_SENSOR_FRAMEWORK 18 |
#define SMARTSENS2_META_EVENT_SENSOR_STATUS 6 |
#define SMARTSENS2_META_EVENT_SPACER 20 |
#define SMARTSENS2_META_TRANSFER_CAUSE 17 |
#define SMARTSENS2_N_VIRTUAL_SENSOR_MAX 256 /* Maximum no of available virtual sensor */ |
#define SMARTSENS2_SENSOR_ID_ACC 4 /* Accelerometer corrected */ |
#define SMARTSENS2_SENSOR_ID_ACC_BIAS 5 /* Accelerometer offset */ |
#define SMARTSENS2_SENSOR_ID_ACC_BIAS_WU 91 /* Accelerometer offset wake up */ |
#define SMARTSENS2_SENSOR_ID_ACC_PASS 1 /* Accelerometer passthrough */ |
#define SMARTSENS2_SENSOR_ID_ACC_RAW 3 /* Accelerometer uncalibrated */ |
#define SMARTSENS2_SENSOR_ID_ACC_RAW_WU 7 /* Accelerometer uncalibrated wake up */ |
#define SMARTSENS2_SENSOR_ID_ACC_WU 6 /* Accelerometer corrected 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_AR 63 /* Activity recognition */ |
#define SMARTSENS2_SENSOR_ID_BARO 129 /* Barometer */ |
#define SMARTSENS2_SENSOR_ID_BARO_WU 133 /* Barometer wake up */ |
#define SMARTSENS2_SENSOR_ID_CUSTOM_END 191 |
#define SMARTSENS2_SENSOR_ID_CUSTOM_START 160 |
Smart Sens 2 virtual sensor IDs.
IDs of the virtual sensors of Smart Sens 2 firmware image.
#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_EXCAMERA 144 /* External camera trigger */ |
#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_GAS 131 /* Gas */ |
#define SMARTSENS2_SENSOR_ID_GAS_WU 135 /* Gas 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_GLANCE_GESTURE 59 /* Glance gesture */ |
#define SMARTSENS2_SENSOR_ID_GPS 145 /* GPS */ |
#define SMARTSENS2_SENSOR_ID_GRA 28 /* Gravity vector */ |
#define SMARTSENS2_SENSOR_ID_GRA_WU 29 /* Gravity vector wake up */ |
#define SMARTSENS2_SENSOR_ID_GYRO 13 /* Gyroscope corrected */ |
#define SMARTSENS2_SENSOR_ID_GYRO_BIAS 14 /* Gyroscope offset */ |
#define SMARTSENS2_SENSOR_ID_GYRO_BIAS_WU 92 /* Gyroscope offset 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_RAW_WU 16 /* Gyroscope uncalibrated wake up */ |
#define SMARTSENS2_SENSOR_ID_GYRO_WU 15 /* Gyroscope wake up */ |
#define SMARTSENS2_SENSOR_ID_HUM 130 /* Humidity */ |
#define SMARTSENS2_SENSOR_ID_HUM_WU 134 /* Humidity 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_LIGHT 146 /* Light */ |
#define SMARTSENS2_SENSOR_ID_LIGHT_WU 148 /* Light wake up */ |
#define SMARTSENS2_SENSOR_ID_MAG 22 /* Magnetometer corrected */ |
#define SMARTSENS2_SENSOR_ID_MAG_BIAS 23 /* Magnetometer offset */ |
#define SMARTSENS2_SENSOR_ID_MAG_BIAS_WU 93 /* Magnetometer offset 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_RAW_WU 25 /* Magnetometer uncalibrated wake up */ |
#define SMARTSENS2_SENSOR_ID_MAG_WU 24 /* Magnetometer wake up */ |
#define SMARTSENS2_SENSOR_ID_MAX 200 |
#define SMARTSENS2_SENSOR_ID_MOTION_DET 77 /* Motion detect */ |
#define SMARTSENS2_SENSOR_ID_ORI 43 /* Orientation */ |
#define SMARTSENS2_SENSOR_ID_ORI_WU 44 /* Orientation wake up */ |
#define SMARTSENS2_SENSOR_ID_PICKUP_GESTURE 61 /* Pickup gesture */ |
#define SMARTSENS2_SENSOR_ID_PROX 147 /* Proximity */ |
#define SMARTSENS2_SENSOR_ID_PROX_WU 149 /* Proximity 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_SIG 55 /* Significant motion */ |
#define SMARTSENS2_SENSOR_ID_SIG_HW 138 /* Hardware Significant motion */ |
#define SMARTSENS2_SENSOR_ID_SIG_HW_WU 141 /* Hardware Significant motion wake up */ |
#define SMARTSENS2_SENSOR_ID_STATIONARY_DET 75 /* Stationary detect */ |
#define SMARTSENS2_SENSOR_ID_STC 52 /* Step counter */ |
#define SMARTSENS2_SENSOR_ID_STC_HW 136 /* Hardware Step counter */ |
#define SMARTSENS2_SENSOR_ID_STC_HW_WU 139 /* Hardware Step counter wake up */ |
#define SMARTSENS2_SENSOR_ID_STC_WU 53 /* Step counter wake up */ |
#define SMARTSENS2_SENSOR_ID_STD 50 /* Step detector */ |
#define SMARTSENS2_SENSOR_ID_STD_HW 137 /* Hardware Step detector */ |
#define SMARTSENS2_SENSOR_ID_STD_HW_WU 140 /* Hardware Step detector wake up */ |
#define SMARTSENS2_SENSOR_ID_STD_WU 94 /* Step detector wake up */ |
#define SMARTSENS2_SENSOR_ID_TBD SMARTSENS2_SENSOR_ID_MAX - 1 |
#define SMARTSENS2_SENSOR_ID_TEMP 128 /* Temperature */ |
#define SMARTSENS2_SENSOR_ID_TEMP_WU 132 /* Temperature wake up */ |
#define SMARTSENS2_SENSOR_ID_TILT_DETECTOR 48 /* Tilt detector */ |
#define SMARTSENS2_SENSOR_ID_WAKE_GESTURE 57 /* Wake gesture */ |
#define SMARTSENS2_SENSOR_ID_WRIST_TILT_GESTURE 67 /* Wrist tilt gesture */ |
#define SMARTSENS2_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection.
This macro sets data samples for SPI modules.
#define SMARTSENS2_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define SMARTSENS2_SLAVE_ADDRESS_0 0x28 |
#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.
#define SMARTSENS2_SPECIAL_SENSOR_ID_OFFSET 245 /* Special & debug virtual sensor id starts at 245 */ |
#define SMARTSENS2_SYS_ID_DEBUG_MSG 250 |
#define SMARTSENS2_SYS_ID_FILLER 255 |
#define SMARTSENS2_SYS_ID_META_EVENT 254 |
#define SMARTSENS2_SYS_ID_META_EVENT_WU 248 |
#define SMARTSENS2_SYS_ID_PADDING 0 |
#define SMARTSENS2_SYS_ID_SMARTSENS2_LOG_DOSTEP 244 |
#define SMARTSENS2_SYS_ID_SMARTSENS2_LOG_UPDATE_SUB 243 |
#define SMARTSENS2_SYS_ID_TS_FULL 253 |
#define SMARTSENS2_SYS_ID_TS_FULL_WU 247 |
#define SMARTSENS2_SYS_ID_TS_LARGE_DELTA 252 |
#define SMARTSENS2_SYS_ID_TS_LARGE_DELTA_WU 246 |
#define SMARTSENS2_SYS_ID_TS_SMALL_DELTA 251 |
#define SMARTSENS2_SYS_ID_TS_SMALL_DELTA_WU 245 |
#define SMARTSENS2_TIMESTAMP_TO_SEC | ( | x | ) | ( ( uint32_t ) ( x * ( 15625.0 / UINT32_C( 1000000000 ) ) ) ) |