Internal addresses, registers, constants for the TSL4531x sensor. More...
Internal addresses, registers, constants for the TSL4531x sensor.
Internal addresses, registers, constants for the TSL4531x sensor.
Derived from the internals.h file for the tsl2561 driver.
Definition in file tsl4531x_internals.h.
Go to the source code of this file.
TSL4531x internal registers | |
#define | TSL4531X_CONTROL_REG (0x0) |
sets power mode | |
#define | TSL4531X_CONFIGURATION_REG (0x01) |
sets power mode | |
#define | TSL4531X_ALSDATA1_REG (0x04) |
contains DATALOW | |
#define | TSL4531X_ALSDATA2_REG (0x05) |
contains DATAHIGH | |
#define | TSL4531X_ID_REG (0x0A) |
contains part no above | |
TSL4531x power modes | |
#define | TSL4531X_MODE_POWER_DOWN (0x00) |
#define | TSL4531X_MODE_RESERVED (0x01) |
#define | TSL4531X_MODE_SINGLE_ADC_CYCLE (0x02) |
Runs a single ADC cycle then returns to power down. | |
#define | TSL4531X_MODE_NORMAL (0x03) |
#define | TSL4531X_PSAVESKIP_OFF (0) |
#define | TSL4531X_PSAVESKIP_ON (1) |
TSL4531x macros | |
#define | TSL4531X_COMMAND(addr) ((1 << 7) | (addr)) |
#define | TSL4531X_CONFIG(psaveskip, tcntrl) (((!!(psaveskip)) << 3) | (tcntrl)) |
#define | TSL4531X_CONTROL(mode) (mode) |
#define | TSL4531X_GET_PARTNO(id_reg) ((id_reg) >> 4) |
#define | MULTIPLY_DATA(data_raw, integration_time) ((data_raw) << (integration_time)) |
#define | TSL4531X_POWER_MODE(mode) ((!mode) * (0x03)) |
#define | TSL4531X_GET_INTEGRATION_TIME_USEC(int_time_setting, psaveskip) (uint32_t)1000 * (((0x04 >> int_time_setting) * 105) + ((!psaveskip) * (60 >> int_time_setting))) |
#define MULTIPLY_DATA | ( | data_raw, | |
integration_time | |||
) | ((data_raw) << (integration_time)) |
Definition at line 82 of file tsl4531x_internals.h.
#define TSL4531X_ALSDATA1_REG (0x04) |
contains DATALOW
Definition at line 38 of file tsl4531x_internals.h.
#define TSL4531X_ALSDATA2_REG (0x05) |
contains DATAHIGH
Definition at line 39 of file tsl4531x_internals.h.
#define TSL4531X_COMMAND | ( | addr | ) | ((1 << 7) | (addr)) |
Definition at line 65 of file tsl4531x_internals.h.
#define TSL4531X_CONFIG | ( | psaveskip, | |
tcntrl | |||
) | (((!!(psaveskip)) << 3) | (tcntrl)) |
Definition at line 68 of file tsl4531x_internals.h.
#define TSL4531X_CONFIGURATION_REG (0x01) |
sets power mode
Definition at line 37 of file tsl4531x_internals.h.
#define TSL4531X_CONTROL | ( | mode | ) | (mode) |
Definition at line 71 of file tsl4531x_internals.h.
#define TSL4531X_CONTROL_REG (0x0) |
sets power mode
Definition at line 36 of file tsl4531x_internals.h.
#define TSL4531X_GET_INTEGRATION_TIME_USEC | ( | int_time_setting, | |
psaveskip | |||
) | (uint32_t)1000 * (((0x04 >> int_time_setting) * 105) + ((!psaveskip) * (60 >> int_time_setting))) |
Definition at line 96 of file tsl4531x_internals.h.
#define TSL4531X_GET_PARTNO | ( | id_reg | ) | ((id_reg) >> 4) |
Definition at line 73 of file tsl4531x_internals.h.
#define TSL4531X_ID_REG (0x0A) |
contains part no above
Definition at line 40 of file tsl4531x_internals.h.
#define TSL4531X_MODE_NORMAL (0x03) |
Definition at line 51 of file tsl4531x_internals.h.
#define TSL4531X_MODE_POWER_DOWN (0x00) |
Definition at line 47 of file tsl4531x_internals.h.
#define TSL4531X_MODE_RESERVED (0x01) |
Definition at line 48 of file tsl4531x_internals.h.
#define TSL4531X_MODE_SINGLE_ADC_CYCLE (0x02) |
Runs a single ADC cycle then returns to power down.
Definition at line 50 of file tsl4531x_internals.h.
#define TSL4531X_POWER_MODE | ( | mode | ) | ((!mode) * (0x03)) |
Definition at line 85 of file tsl4531x_internals.h.
#define TSL4531X_PSAVESKIP_OFF (0) |
Definition at line 56 of file tsl4531x_internals.h.
#define TSL4531X_PSAVESKIP_ON (1) |
Definition at line 57 of file tsl4531x_internals.h.