ESPHome  2024.10.2
Data Structures | Enumerations | Functions
esphome::ltr501 Namespace Reference

Data Structures

union  AlsControlRegister501
 
union  AlsPsStatusRegister
 
union  InterruptPersistRegister
 
union  InterruptRegister
 
class  LTRAlsPs501Component
 
class  LTRPsHighTrigger
 
class  LTRPsLowTrigger
 
union  MeasurementRateRegister501
 
union  PartIdRegister
 
union  PsControlRegister501
 
union  PsData1Register
 
union  PsLedRegister
 
union  PsMeasurementRateRegister
 
union  PsNPulsesRegister501
 

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  AlsGain501 : uint8_t { GAIN_1 = 0, GAIN_150 = 1 }
 
enum  IntegrationTime501 : uint8_t { INTEGRATION_TIME_100MS = 0, INTEGRATION_TIME_50MS = 1, INTEGRATION_TIME_200MS = 2, INTEGRATION_TIME_400MS = 3 }
 
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  PsGain501 : uint8_t { PS_GAIN_1 = 0, PS_GAIN_4 = 1, PS_GAIN_8 = 2, PS_GAIN_16 = 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
}
 

Functions

bool operator== (const GainTimePair &lhs, const GainTimePair &rhs)
 
bool operator!= (const GainTimePair &lhs, const GainTimePair &rhs)
 
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)
 

Enumeration Type Documentation

◆ AlsGain501

Enumerator
GAIN_1 
GAIN_150 

Definition at line 43 of file ltr_definitions_501.h.

◆ CommandRegisters

enum esphome::ltr501::CommandRegisters : uint8_t
strong
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_501.h.

◆ DataAvail

Enumerator
NO_DATA 
BAD_DATA 
DATA_OK 

Definition at line 14 of file ltr501.h.

◆ IntegrationTime501

Enumerator
INTEGRATION_TIME_100MS 
INTEGRATION_TIME_50MS 
INTEGRATION_TIME_200MS 
INTEGRATION_TIME_400MS 

Definition at line 50 of file ltr_definitions_501.h.

◆ LtrType

enum esphome::ltr501::LtrType : uint8_t
Enumerator
LTR_TYPE_UNKNOWN 
LTR_TYPE_ALS_ONLY 
LTR_TYPE_PS_ONLY 
LTR_TYPE_ALS_AND_PS 

Definition at line 16 of file ltr501.h.

◆ MeasurementRepeatRate

Enumerator
REPEAT_RATE_50MS 
REPEAT_RATE_100MS 
REPEAT_RATE_200MS 
REPEAT_RATE_500MS 
REPEAT_RATE_1000MS 
REPEAT_RATE_2000MS 

Definition at line 59 of file ltr_definitions_501.h.

◆ PsGain501

Enumerator
PS_GAIN_1 
PS_GAIN_4 
PS_GAIN_8 
PS_GAIN_16 

Definition at line 69 of file ltr_definitions_501.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 97 of file ltr_definitions_501.h.

◆ PsLedDuty

Enumerator
PS_LED_DUTY_25 
PS_LED_DUTY_50 
PS_LED_DUTY_75 
PS_LED_DUTY_100 

Definition at line 89 of file ltr_definitions_501.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 77 of file ltr_definitions_501.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 

Definition at line 109 of file ltr_definitions_501.h.

Function Documentation

◆ get_next()

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

Definition at line 29 of file ltr501.cpp.

◆ get_prev()

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

Definition at line 44 of file ltr501.cpp.

◆ operator!=()

bool esphome::ltr501::operator!= ( const GainTimePair &  lhs,
const GainTimePair &  rhs 
)

Definition at line 25 of file ltr501.cpp.

◆ operator==()

bool esphome::ltr501::operator== ( const GainTimePair &  lhs,
const GainTimePair &  rhs 
)

Definition at line 21 of file ltr501.cpp.