|
Nordic Thingy:52
|
39 #ifndef DRV_CCS811_BITFIELDS_H__
40 #define DRV_CCS811_BITFIELDS_H__
47 #define DRV_CCS811_STATUS_ERR_Pos (0)
48 #define DRV_CCS811_STATUS_ERR_Msk (0x1 << DRV_CCS811_STATUS_ERR_Pos)
49 #define DRV_CCS811_STATUS_ERR_None (0)
50 #define DRV_CCS811_STATUS_ERR_Error (1)
54 #define DRV_CCS811_STATUS_DATA_READY_Pos (3)
55 #define DRV_CCS811_STATUS_DATA_READY_Msk (0x1 << DRV_CCS811_STATUS_DATA_READY_Pos)
56 #define DRV_CCS811_STATUS_DATA_READY_None (0)
57 #define DRV_CCS811_STATUS_DATA_READY_Ready (1)
61 #define DRV_CCS811_STATUS_APP_VALID_Pos (4)
62 #define DRV_CCS811_STATUS_APP_VALID_Msk (0x1 << DRV_CCS811_STATUS_APP_VALID_Pos)
63 #define DRV_CCS811_STATUS_APP_VALID_No (0)
64 #define DRV_CCS811_STATUS_APP_VALID_Yes (1)
68 #define DRV_CCS811_STATUS_FW_MODE_Pos (7)
69 #define DRV_CCS811_STATUS_FW_MODE_Msk (0x1 << DRV_CCS811_STATUS_FW_MODE_Pos)
70 #define DRV_CCS811_STATUS_FW_MODE_Appl (1)
71 #define DRV_CCS811_STATUS_FW_MODE_Boot (0)
79 #define DRV_CCS811_MEAS_MODE_THRESH_Pos (2)
80 #define DRV_CCS811_MEAS_MODE_THRESH_Msk (0x1 << DRV_CCS811_MEAS_MODE_THRESH_Pos)
81 #define DRV_CCS811_MEAS_MODE_THRESH_Normal (0)
82 #define DRV_CCS811_MEAS_MODE_THRESH_Activated (1)
86 #define DRV_CCS811_MEAS_MODE_INTERRUPT_Pos (3)
87 #define DRV_CCS811_MEAS_MODE_INTERRUPT_Msk (0x1 << DRV_CCS811_MEAS_MODE_INTERRUPT_Pos)
88 #define DRV_CCS811_MEAS_MODE_INTERRUPT_Disable (0)
89 #define DRV_CCS811_MEAS_MODE_INTERRUPT_Enable (1)
93 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_Pos (4)
94 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_Msk (0x7 << DRV_CCS811_MEAS_MODE_DRIVE_MODE_Pos)
95 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_Idle (0)
96 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_ConstPwr (1)
97 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_PulseHeat (2)
98 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_LowPwrPulseHeat (3)
99 #define DRV_CCS811_MEAS_MODE_DRIVE_MODE_FastConstPwr (4)
107 #define DRV_CCS811_RAW_DATA_RAWADC_Pos (0)
108 #define DRV_CCS811_RAW_DATA_RAWADC_Msk (0x3ff << DRV_CCS811_RAW_DATA_RAWADC_Pos)
112 #define DRV_CCS811_RAW_DATA_CURRSEL_Pos (10)
113 #define DRV_CCS811_RAW_DATA_CURRSEL_Msk (0x3f << DRV_CCS811_RAW_DATA_CURRSEL_Pos)
121 #define DRV_CCS811_HW_VERSION_VARIANT_Pos (0)
122 #define DRV_CCS811_HW_VERSION_VARIANT_Msk (0xf << DRV_CCS811_HW_VERSION_VARIANT_Pos)
126 #define DRV_CCS811_HW_VERSION_MAJOR_Pos (4)
127 #define DRV_CCS811_HW_VERSION_MAJOR_Msk (0xf << DRV_CCS811_HW_VERSION_MAJOR_Pos)
135 #define DRV_CCS811_FW_BOOT_VERSION_TRIVIAL_Pos (0)
136 #define DRV_CCS811_FW_BOOT_VERSION_TRIVIAL_Msk (0xff << DRV_CCS811_FW_BOOT_VERSION_TRIVIAL_Pos)
140 #define DRV_CCS811_FW_BOOT_VERSION_MINOR_Pos (8)
141 #define DRV_CCS811_FW_BOOT_VERSION_MINOR_Msk (0xf << DRV_CCS811_FW_BOOT_VERSION_MINOR_Pos)
145 #define DRV_CCS811_FW_BOOT_VERSION_MAJOR_Pos (12)
146 #define DRV_CCS811_FW_BOOT_VERSION_MAJOR_Msk (0xf << DRV_CCS811_FW_BOOT_VERSION_MAJOR_Pos)
154 #define DRV_CCS811_FW_APP_VERSION_TRIVIAL_Pos (0)
155 #define DRV_CCS811_FW_APP_VERSION_TRIVIAL_Msk (0xff << DRV_CCS811_FW_APP_VERSION_TRIVIAL_Pos)
159 #define DRV_CCS811_FW_APP_VERSION_MINOR_Pos (8)
160 #define DRV_CCS811_FW_APP_VERSION_MINOR_Msk (0xf << DRV_CCS811_FW_APP_VERSION_MINOR_Pos)
164 #define DRV_CCS811_FW_APP_VERSION_MAJOR_Pos (12)
165 #define DRV_CCS811_FW_APP_VERSION_MAJOR_Msk (0xf << DRV_CCS811_FW_APP_VERSION_MAJOR_Pos)
173 #define DRV_CCS811_ERR_ID_ERROR_CODE_Pos (0)
174 #define DRV_CCS811_ERR_ID_ERROR_CODE_Msk (0x3 << DRV_CCS811_ERR_ID_ERROR_CODE_Pos)
175 #define DRV_CCS811_ERR_ID_ERROR_CODE_None (0)
176 #define DRV_CCS811_ERR_ID_ERROR_CODE_SmbMsgInvalid (1)
177 #define DRV_CCS811_ERR_ID_ERROR_CODE_SmbReadInvalid (2)
178 #define DRV_CCS811_ERR_ID_ERROR_CODE_MeasModeInvalid (3)
180 #endif // DRV_CCS811_BITFIELDS_H__