Register definitions for OPT3001 devices. More...
Register definitions for OPT3001 devices.
Definition in file opt3001_regs.h.
Go to the source code of this file.
| OPT3001 registers | |
| #define | OPT3001_REGS_RESULT 0x00 | 
| Result register. | |
| #define | OPT3001_REGS_CONFIG 0x01 | 
| Configuration register. | |
| #define | OPT3001_REGS_LOW_LIMIT 0x02 | 
| Low Limit register. | |
| #define | OPT3001_REGS_HIGH_LIMIT 0x03 | 
| High Limit register. | |
| #define | OPT3001_REGS_MANUFACTURER_ID 0x7E | 
| Manufacturer ID register. | |
| #define | OPT3001_REGS_DEVICE_ID 0x7F | 
| Device ID register. | |
| #define | OPT3001_DID_VALUE (0x3001) | 
| Device ID value. | |
| #define | OPT3001_CONFIG_RESET (0xC810) | 
| Reset value. | |
| #define | OPT3001_CONFIG_RN_FSR (0xC000) | 
| Automatic full-scale setting mode. | |
| #define | OPT3001_REGS_CONFIG_CT_MASK (0x0800) | 
| Conversion time mask. | |
| #define | OPT3001_REGS_CONFIG_CT(x) | 
| Conversion time field. | |
| #define | OPT3001_CONFIG_M_SHUTDOWN (0x0) | 
| Shutdown mode. | |
| #define | OPT3001_CONFIG_M_SINGLE (0x1) | 
| Single-shot mode. | |
| #define | OPT3001_CONFIG_M_CONTINUOUS (0x2) | 
| Continuous mode (also 0x3) | |
| #define | OPT3001_CONFIG_MOC_SHIFT (9U) | 
| Mode of conversion shift. | |
| #define | OPT3001_CONFIG_MOC_MASK (0x0600) | 
| Mode of conversion mask. | |
| #define | OPT3001_REGS_CONFIG_MOC(x) | 
| Mode of conversion field. | |
| #define | OPT3001_REGS_CONFIG_OVF (1 << 8) | 
| Overflow flag field. | |
| #define | OPT3001_REGS_CONFIG_CRF (1 << 7) | 
| Conversion ready field. | |
| #define | OPT3001_REGS_CONFIG_FH (1 << 6) | 
| Flag high field. | |
| #define | OPT3001_REGS_CONFIG_FL (1 << 5) | 
| Flag low field. | |
| #define | OPT3001_REGS_CONFIG_L (1 << 4) | 
| Latch field. | |
| #define | OPT3001_REGS_CONFIG_POL (1 << 3) | 
| Polarity field. | |
| #define | OPT3001_REGS_CONFIG_ME (1 << 2) | 
| Mask exponent field. | |
| #define | OPT3001_REGS_CONFIG_FC_MASK (0x0003) | 
| Fault count field mask. | |
| #define | OPT3001_REGS_LOW_LIMIT_EOC_ENABLE (0xC000) | 
| End-of-conversion enable. | |
| #define | OPT3001_REGS_REG_EXPONENT(x) | 
| Exponent. | |
| #define | OPT3001_REGS_REG_MANTISSA(x) | 
| Mantissa. | |
| #define | OPT3001_REGS_INT_TIME_SHORT 100000 | 
| Integration time of 100ms. | |
| #define | OPT3001_REGS_INT_TIME_LONG 800000 | 
| Integration time of 800ms. | |
| #define | OPT3001_CONVERSION_TIME_OFFSET 4000 | 
| Conversion time offset. | |
| #define | OPT3001_CONVERSION_TIME_COMBINED | 
| Combination of the conversion times. | |
| #define OPT3001_CONFIG_M_CONTINUOUS (0x2) | 
Continuous mode (also 0x3)
Definition at line 48 of file opt3001_regs.h.
| #define OPT3001_CONFIG_M_SHUTDOWN (0x0) | 
Shutdown mode.
Definition at line 46 of file opt3001_regs.h.
| #define OPT3001_CONFIG_M_SINGLE (0x1) | 
Single-shot mode.
Definition at line 47 of file opt3001_regs.h.
| #define OPT3001_CONFIG_MOC_MASK (0x0600) | 
Mode of conversion mask.
Definition at line 50 of file opt3001_regs.h.
| #define OPT3001_CONFIG_MOC_SHIFT (9U) | 
Mode of conversion shift.
Definition at line 49 of file opt3001_regs.h.
| #define OPT3001_CONFIG_RESET (0xC810) | 
Reset value.
Definition at line 38 of file opt3001_regs.h.
| #define OPT3001_CONFIG_RN_FSR (0xC000) | 
Automatic full-scale setting mode.
Definition at line 40 of file opt3001_regs.h.
| #define OPT3001_CONVERSION_TIME_COMBINED | 
Combination of the conversion times.
Definition at line 80 of file opt3001_regs.h.
| #define OPT3001_CONVERSION_TIME_OFFSET 4000 | 
Conversion time offset.
Definition at line 78 of file opt3001_regs.h.
| #define OPT3001_DID_VALUE (0x3001) | 
Device ID value.
Definition at line 36 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG 0x01 | 
Configuration register.
Definition at line 30 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_CRF (1 << 7) | 
Conversion ready field.
Definition at line 56 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_CT | ( | x | ) | 
Conversion time field.
Definition at line 43 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_CT_MASK (0x0800) | 
Conversion time mask.
Definition at line 42 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_FC_MASK (0x0003) | 
Fault count field mask.
Definition at line 63 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_FH (1 << 6) | 
Flag high field.
Definition at line 57 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_FL (1 << 5) | 
Flag low field.
Definition at line 58 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_L (1 << 4) | 
Latch field.
Definition at line 59 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_ME (1 << 2) | 
Mask exponent field.
Definition at line 61 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_MOC | ( | x | ) | 
Mode of conversion field.
Definition at line 51 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_OVF (1 << 8) | 
Overflow flag field.
Definition at line 55 of file opt3001_regs.h.
| #define OPT3001_REGS_CONFIG_POL (1 << 3) | 
Polarity field.
Definition at line 60 of file opt3001_regs.h.
| #define OPT3001_REGS_DEVICE_ID 0x7F | 
Device ID register.
Definition at line 34 of file opt3001_regs.h.
| #define OPT3001_REGS_HIGH_LIMIT 0x03 | 
High Limit register.
Definition at line 32 of file opt3001_regs.h.
| #define OPT3001_REGS_INT_TIME_LONG 800000 | 
Integration time of 800ms.
Definition at line 76 of file opt3001_regs.h.
| #define OPT3001_REGS_INT_TIME_SHORT 100000 | 
Integration time of 100ms.
Definition at line 75 of file opt3001_regs.h.
| #define OPT3001_REGS_LOW_LIMIT 0x02 | 
Low Limit register.
Definition at line 31 of file opt3001_regs.h.
| #define OPT3001_REGS_LOW_LIMIT_EOC_ENABLE (0xC000) | 
End-of-conversion enable.
Definition at line 65 of file opt3001_regs.h.
| #define OPT3001_REGS_MANUFACTURER_ID 0x7E | 
Manufacturer ID register.
Definition at line 33 of file opt3001_regs.h.
| #define OPT3001_REGS_REG_EXPONENT | ( | x | ) | 
| #define OPT3001_REGS_REG_MANTISSA | ( | x | ) | 
| #define OPT3001_REGS_RESULT 0x00 | 
Result register.
Definition at line 29 of file opt3001_regs.h.