ESPHome  2024.11.1
Data Structures | Enumerations | Functions | Variables
esphome::ltr_als_ps Namespace Reference

Data Structures

union  AlsControlRegister
 
union  AlsPsStatusRegister
 
union  InterruptPersistRegister
 
union  InterruptRegister
 
class  LTRAlsPsComponent
 
class  LTRPsHighTrigger
 
class  LTRPsLowTrigger
 
union  MeasurementRateRegister
 
union  PartIdRegister
 
union  PsControlRegister
 
union  PsData1Register
 
union  PsLedRegister
 
union  PsMeasurementRateRegister
 
union  PsNPulsesRegister
 

Enumerations

enum  DataAvail : uint8_t { NO_DATA, BAD_DATA, DATA_OK }
 
enum  LtrType : uint8_t { LTR_TYPE_UNKNOWN = 0, LTR_TYPE_ALS_ONLY = 1, LTR_TYPE_PS_ONLY = 2, LTR_TYPE_ALS_AND_PS = 3 }
 
enum  CommandRegisters : uint8_t {
  CommandRegisters::ALS_CONTR = 0x80, CommandRegisters::PS_CONTR = 0x81, CommandRegisters::PS_LED = 0x82, CommandRegisters::PS_N_PULSES = 0x83,
  CommandRegisters::PS_MEAS_RATE = 0x84, CommandRegisters::MEAS_RATE = 0x85, CommandRegisters::PART_ID = 0x86, CommandRegisters::MANUFAC_ID = 0x87,
  CommandRegisters::ALS_DATA_CH1_0 = 0x88, CommandRegisters::ALS_DATA_CH1_1 = 0x89, CommandRegisters::ALS_DATA_CH0_0 = 0x8A, CommandRegisters::ALS_DATA_CH0_1 = 0x8B,
  CommandRegisters::ALS_PS_STATUS = 0x8C, CommandRegisters::PS_DATA_0 = 0x8D, CommandRegisters::PS_DATA_1 = 0x8E, CommandRegisters::ALS_PS_INTERRUPT = 0x8F,
  CommandRegisters::PS_THRES_UP_0 = 0x90, CommandRegisters::PS_THRES_UP_1 = 0x91, CommandRegisters::PS_THRES_LOW_0 = 0x92, CommandRegisters::PS_THRES_LOW_1 = 0x93,
  CommandRegisters::PS_OFFSET_1 = 0x94, CommandRegisters::PS_OFFSET_0 = 0x95, CommandRegisters::ALS_THRES_UP_0 = 0x97, CommandRegisters::ALS_THRES_UP_1 = 0x98,
  CommandRegisters::ALS_THRES_LOW_0 = 0x99, CommandRegisters::ALS_THRES_LOW_1 = 0x9A, CommandRegisters::INTERRUPT_PERSIST = 0x9E
}
 
enum  AlsGain : uint8_t {
  GAIN_1 = 0, GAIN_2 = 1, GAIN_4 = 2, GAIN_8 = 3,
  GAIN_48 = 6, GAIN_96 = 7
}
 
enum  IntegrationTime : uint8_t {
  INTEGRATION_TIME_100MS = 0, INTEGRATION_TIME_50MS = 1, INTEGRATION_TIME_200MS = 2, INTEGRATION_TIME_400MS = 3,
  INTEGRATION_TIME_150MS = 4, INTEGRATION_TIME_250MS = 5, INTEGRATION_TIME_300MS = 6, INTEGRATION_TIME_350MS = 7
}
 
enum  MeasurementRepeatRate {
  REPEAT_RATE_50MS = 0, REPEAT_RATE_100MS = 1, REPEAT_RATE_200MS = 2, REPEAT_RATE_500MS = 3,
  REPEAT_RATE_1000MS = 4, REPEAT_RATE_2000MS = 5
}
 
enum  PsGain : uint8_t { PS_GAIN_16 = 0, PS_GAIN_32 = 2, PS_GAIN_64 = 3 }
 
enum  PsMode : uint8_t { PS_MODE_STANDBY_00 = 0, PS_MODE_STANDBY_01 = 1, PS_MODE_ACTIVE_10 = 2, PS_MODE_ACTIVE_11 = 3 }
 
enum  PsLedFreq : uint8_t {
  PS_LED_FREQ_30KHZ = 0, PS_LED_FREQ_40KHZ = 1, PS_LED_FREQ_50KHZ = 2, PS_LED_FREQ_60KHZ = 3,
  PS_LED_FREQ_70KHZ = 4, PS_LED_FREQ_80KHZ = 5, PS_LED_FREQ_90KHZ = 6, PS_LED_FREQ_100KHZ = 7
}
 
enum  PsLedDuty : uint8_t { PS_LED_DUTY_25 = 0, PS_LED_DUTY_50 = 1, PS_LED_DUTY_75 = 2, PS_LED_DUTY_100 = 3 }
 
enum  PsLedCurrent : uint8_t {
  PS_LED_CURRENT_5MA = 0, PS_LED_CURRENT_10MA = 1, PS_LED_CURRENT_20MA = 2, PS_LED_CURRENT_50MA = 3,
  PS_LED_CURRENT_100MA = 4, PS_LED_CURRENT_100MA1 = 5, PS_LED_CURRENT_100MA2 = 6, PS_LED_CURRENT_100MA3 = 7
}
 
enum  PsMeasurementRate : uint8_t {
  PS_MEAS_RATE_50MS = 0, PS_MEAS_RATE_70MS = 1, PS_MEAS_RATE_100MS = 2, PS_MEAS_RATE_200MS = 3,
  PS_MEAS_RATE_500MS = 4, PS_MEAS_RATE_1000MS = 5, PS_MEAS_RATE_2000MS = 6, PS_MEAS_RATE_2000MS1 = 7,
  PS_MEAS_RATE_10MS = 8
}
 

Functions

template<typename T , size_t size>
get_next (const T(&array)[size], const T val)
 
template<typename T , size_t size>
get_prev (const T(&array)[size], const T val)
 

Variables

enum esphome::ltr_als_ps::DataAvail __attribute__
 

Enumeration Type Documentation

◆ AlsGain

Enumerator
GAIN_1 
GAIN_2 
GAIN_4 
GAIN_8 
GAIN_48 
GAIN_96 

Definition at line 43 of file ltr_definitions.h.

◆ CommandRegisters

Enumerator
ALS_CONTR 
PS_CONTR 
PS_LED 
PS_N_PULSES 
PS_MEAS_RATE 
MEAS_RATE 
PART_ID 
MANUFAC_ID 
ALS_DATA_CH1_0 
ALS_DATA_CH1_1 
ALS_DATA_CH0_0 
ALS_DATA_CH0_1 
ALS_PS_STATUS 
PS_DATA_0 
PS_DATA_1 
ALS_PS_INTERRUPT 
PS_THRES_UP_0 
PS_THRES_UP_1 
PS_THRES_LOW_0 
PS_THRES_LOW_1 
PS_OFFSET_1 
PS_OFFSET_0 
ALS_THRES_UP_0 
ALS_THRES_UP_1 
ALS_THRES_LOW_0 
ALS_THRES_LOW_1 
INTERRUPT_PERSIST 

Definition at line 8 of file ltr_definitions.h.

◆ DataAvail

Enumerator
NO_DATA 
BAD_DATA 
DATA_OK 

Definition at line 14 of file ltr_als_ps.h.

◆ IntegrationTime

Enumerator
INTEGRATION_TIME_100MS 
INTEGRATION_TIME_50MS 
INTEGRATION_TIME_200MS 
INTEGRATION_TIME_400MS 
INTEGRATION_TIME_150MS 
INTEGRATION_TIME_250MS 
INTEGRATION_TIME_300MS 
INTEGRATION_TIME_350MS 

Definition at line 54 of file ltr_definitions.h.

◆ LtrType

Enumerator
LTR_TYPE_UNKNOWN 
LTR_TYPE_ALS_ONLY 
LTR_TYPE_PS_ONLY 
LTR_TYPE_ALS_AND_PS 

Definition at line 16 of file ltr_als_ps.h.

◆ MeasurementRepeatRate

Enumerator
REPEAT_RATE_50MS 
REPEAT_RATE_100MS 
REPEAT_RATE_200MS 
REPEAT_RATE_500MS 
REPEAT_RATE_1000MS 
REPEAT_RATE_2000MS 

Definition at line 67 of file ltr_definitions.h.

◆ PsGain

Enumerator
PS_GAIN_16 
PS_GAIN_32 
PS_GAIN_64 

Definition at line 77 of file ltr_definitions.h.

◆ PsLedCurrent

Enumerator
PS_LED_CURRENT_5MA 
PS_LED_CURRENT_10MA 
PS_LED_CURRENT_20MA 
PS_LED_CURRENT_50MA 
PS_LED_CURRENT_100MA 
PS_LED_CURRENT_100MA1 
PS_LED_CURRENT_100MA2 
PS_LED_CURRENT_100MA3 

Definition at line 112 of file ltr_definitions.h.

◆ PsLedDuty

Enumerator
PS_LED_DUTY_25 
PS_LED_DUTY_50 
PS_LED_DUTY_75 
PS_LED_DUTY_100 

Definition at line 104 of file ltr_definitions.h.

◆ PsLedFreq

Enumerator
PS_LED_FREQ_30KHZ 
PS_LED_FREQ_40KHZ 
PS_LED_FREQ_50KHZ 
PS_LED_FREQ_60KHZ 
PS_LED_FREQ_70KHZ 
PS_LED_FREQ_80KHZ 
PS_LED_FREQ_90KHZ 
PS_LED_FREQ_100KHZ 

Definition at line 92 of file ltr_definitions.h.

◆ PsMeasurementRate

Enumerator
PS_MEAS_RATE_50MS 
PS_MEAS_RATE_70MS 
PS_MEAS_RATE_100MS 
PS_MEAS_RATE_200MS 
PS_MEAS_RATE_500MS 
PS_MEAS_RATE_1000MS 
PS_MEAS_RATE_2000MS 
PS_MEAS_RATE_2000MS1 
PS_MEAS_RATE_10MS 

Definition at line 124 of file ltr_definitions.h.

◆ PsMode

Enumerator
PS_MODE_STANDBY_00 
PS_MODE_STANDBY_01 
PS_MODE_ACTIVE_10 
PS_MODE_ACTIVE_11 

Definition at line 84 of file ltr_definitions.h.

Function Documentation

◆ get_next()

template<typename T , size_t size>
T esphome::ltr_als_ps::get_next ( const T(&)  array[size],
const T  val 
)

Definition at line 15 of file ltr_als_ps.cpp.

◆ get_prev()

template<typename T , size_t size>
T esphome::ltr_als_ps::get_prev ( const T(&)  array[size],
const T  val 
)

Definition at line 30 of file ltr_als_ps.cpp.

Variable Documentation

◆ __attribute__

enum esphome::ltr_als_ps::DataAvail esphome::ltr_als_ps::__attribute__