Qwiic_OPT4048_Py  v0.9.1_test-4-gdcd7056
Python for SFE Qwiic OPT4048
Loading...
Searching...
No Matches
qwiic_opt4048.QwOpt4048 Class Reference

QwOpt4048. More...

Public Member Functions

def __init__ (self, address=None, i2c_driver=None)
 Initialize the QwOpt4048 device class. More...
 
def is_connected (self)
 Determine if a OPT4048 device is conntected to the system. More...
 
def begin (self)
 Initializes this device with default parameters. More...
 
def get_device_id (self)
 Retrieve the unique device ID of the OPT4048. More...
 
def set_basic_setup (self)
 Configure basic setup for the OPT4048. More...
 
def set_range (self, color_range)
 Set the range of the OPT4048. More...
 
def get_range (self)
 Retrieve the current range setting of the OPT4048. More...
 
def set_conversion_time (self, time)
 Set the time used to convert light to analog values. More...
 
def get_conversion_time (self)
 Gets the time used to convert light to analog values. More...
 
def set_qwake (self, enable=True)
 Sets the quick wake bit for the OPT4048. More...
 
def get_qwake (self)
 Retrieve the quick wake bit for the OPT4048. More...
 
def set_operation_mode (self, mode)
 Set the operation mode of the OPT4048: Power-down, Forced auto-range, one-shot, or continuous. More...
 
def get_operation_mode (self)
 Retrieve the current operation mode of the OPT4048. More...
 
def set_int_latch (self, enable=True)
 Set the interrupt latch of the OPT4048. More...
 
def get_int_latch (self)
 Retrieve the interrupt latch of the OPT4048. More...
 
def set_int_active_high (self, enable=True)
 Set the interrupt polarity of the OPT4048. More...
 
def get_int_active_high (self)
 Retrieve the interrupt polarity of the OPT4048. More...
 
def set_int_input (self, enable=True)
 Set the interrupt input of the OPT4048. More...
 
def get_int_input_enable (self)
 Retrieve the interrupt input of the OPT4048. More...
 
def set_int_mechanism (self, mechanism)
 Set the interrupt mechanism of the OPT4048: SMBus Alert, INT Pin data ready for next channel, or INT Pin data ready for all channels. More...
 
def get_int_mechanism (self)
 Retrieve the interrupt mechanism of the OPT4048: SMBus Alert, INT Pin data ready for next channel, or INT Pin data ready for all channels. More...
 
def get_all_flags (self)
 Retrieve all flags of the OPT4048. More...
 
def get_overload_flag (self)
 Retrieve the flag that indicates the ADC is overloaded. More...
 
def get_conv_ready_flag (self)
 Retrieve the flag that indicates a conversion is ready to be read. More...
 
def get_too_bright_flag (self)
 Retrieve the flag that indicates lux has is above the current range. More...
 
def get_too_dim_flag (self)
 Retrieve the flag that indicates lux has is below the current range. More...
 
def set_fault_count (self, count)
 Set the number of faults needed to trigger an interupt. More...
 
def get_fault_count (self)
 Retrieve the number of faults that have been triggered. More...
 
def set_threshold_low (self, thresh)
 Set the low interrupt threshold value of the OPT4048. More...
 
def get_threshold_low (self)
 Retrieve the low interrupt threshold value of the OPT4048. More...
 
def set_threshold_high (self, thresh)
 Set the high interrupt threshold value of the OPT4048. More...
 
def get_threshold_high (self)
 Retrieve the high interrupt threshold value of the OPT4048. More...
 
def set_i2c_burst (self, enable=True)
 Set the I2C burst setting of the OPT4048: auto-increment or single register I2C reads. More...
 
def get_i2c_burst (self)
 Retrieve the I2C burst setting of the OPT4048: auto-increment or single register I2C reads. More...
 
def get_adc_ch0 (self)
 Retrieve the ADC value of channel 0 of the OPT4048. More...
 
def get_adc_code (self, bytes)
 Calculate the ADC code from the 2 words read from an ADC register. More...
 
def get_adc_counter (self, bytes)
 Calculate the ADC counter from the 2 words read from an ADC register. More...
 
def get_adc_crc (self, bytes)
 Calculate the ADC CRC from the 2 words read from an ADC register. More...
 
def get_adc_ch1 (self)
 Retrieve the ADC value of channel 1 of the OPT4048. More...
 
def get_adc_ch2 (self)
 Retrieve the ADC value of channel 2 of the OPT4048. More...
 
def get_adc_ch3 (self)
 Retrieve the ADC value of channel 3 of the OPT4048. More...
 
def get_all_adc (self)
 Retrieve the ADC values of all channels of the OPT4048. More...
 
def get_all_channel_data (self, color)
 Retrieve the ADC values of all channels of the OPT4048. More...
 
def get_lux (self)
 Retrieve the Lux value of the OPT4048. More...
 
def get_CIEx (self)
 Retrieve the CIEx value of the OPT4048. More...
 
def get_CIEy (self)
 Retrieve the CIEy value of the OPT4048. More...
 
def get_CCT (self)
 Retrieve the CCT value of the OPT4048. More...
 

Public Attributes

 address
 
 FLAGS_MASK_OVERLOAD
 
 FLAGS_MASK_CONV_READY
 
 FLAGS_MASK_FLAG_HIGH
 
 FLAGS_MASK_FLAG_LOW
 

Static Public Attributes

 device_name = _DEFAULT_NAME
 
 available_addresses = _AVAILABLE_I2C_ADDRESS
 
list cie_matrix
 
int OPT_MATRIX_ROWS = 4
 
int OPT_MATRIX_COLS = 4
 
int SFE_OPT4048_REGISTER_EXP_RES_CH0 = 0x00
 
int SFE_OPT4048_REGISTER_RES_CNT_CRC_CH0 = 0x01
 
int SFE_OPT4048_REGISTER_EXP_RES_CH1 = 0x02
 
int SFE_OPT4048_REGISTER_RES_CNT_CRC_CH1 = 0x03
 
int SFE_OPT4048_REGISTER_EXP_RES_CH2 = 0x04
 
int SFE_OPT4048_REGISTER_RES_CNT_CRC_CH2 = 0x05
 
int SFE_OPT4048_REGISTER_EXP_RES_CH3 = 0x06
 
int SFE_OPT4048_REGISTER_RES_CNT_CRC_CH3 = 0x07
 
int SFE_OPT4048_REGISTER_THRESH_L_EXP_RES = 0x08
 
int SFE_OPT4048_REGISTER_THRESH_H_EXP_RES = 0x09
 
int SFE_OPT4048_REGISTER_CONTROL = 0x0A
 
int SFE_OPT4048_REGISTER_INT_CONTROL = 0x0B
 
int SFE_OPT4048_REGISTER_FLAGS = 0x0C
 
int SFE_OPT4048_REGISTER_DEVICE_ID = 0x11
 
int RANGE_2KLUX2 = 0x00
 
int RANGE_4KLUX5 = 0x01
 
int RANGE_9LUX = 0x02
 
int RANGE_18LUX = 0x03
 
int RANGE_36LUX = 0x04
 
int RANGE_72LUX = 0x05
 
int RANGE_144LUX = 0x06
 
int RANGE_AUTO = 0x0C
 
int CONVERSION_TIME_600US = 0x00
 
int CONVERSION_TIME_1MS = 0x01
 
int CONVERSION_TIME_1MS8 = 0x02
 
int CONVERSION_TIME_3MS4 = 0x03
 
int CONVERSION_TIME_6MS5 = 0x04
 
int CONVERSION_TIME_12MS7 = 0x05
 
int CONVERSION_TIME_25MS = 0x06
 
int CONVERSION_TIME_50MS = 0x07
 
int CONVERSION_TIME_100MS = 0x08
 
int CONVERSION_TIME_200MS = 0x09
 
int CONVERSION_TIME_400MS = 0x0A
 
int CONVERSION_TIME_800MS = 0x0B
 
int OPERATION_MODE_POWER_DOWN = 0x00
 
int OPERATION_MODE_AUTO_ONE_SHOT = 0x01
 
int OPERATION_MODE_ONE_SHOT = 0x02
 
int OPERATION_MODE_CONTINUOUS = 0x03
 
int FAULT_COUNT_1 = 0x00
 
int FAULT_COUNT_2 = 0x01
 
int FAULT_COUNT_3 = 0x02
 
int FAULT_COUNT_8 = 0x03
 
int THRESH_CHANNEL_CH0 = 0x00
 
int THRESH_CHANNEL_CH1 = 0x01
 
int THRESH_CHANNEL_CH2 = 0x02
 
int THRESH_CHANNEL_CH3 = 0x03
 
int INT_SMBUS_ALERT = 0x00
 
int INT_DR_NEXT_CHANNEL = 0x01
 
int INT_DR_ALL_CHANNELS = 0x03
 
int FLAGS_SHIFT_OVERLOAD = 3
 
int FLAGS_SHIFT_CONV_READY = 2
 
int FLAGS_SHIFT_FLAG_HIGH = 1
 
int FLAGS_SHIFT_FLAG_LOW = 0
 
int FLAGS_MASK_OVERLOAD = 0b1 << FLAGS_SHIFT_OVERLOAD
 
int FLAGS_MASK_CONV_READY = 0b1 << FLAGS_SHIFT_CONV_READY
 
int FLAGS_MASK_FLAG_HIGH = 0b1 << FLAGS_SHIFT_FLAG_HIGH
 
int FLAGS_MASK_FLAG_LOW = 0b1 << FLAGS_SHIFT_FLAG_LOW
 
int CH_EXP_RES_SHIFT_EXP = 12
 
int CH_EXP_RES_SHIFT_RES_MSB = 0
 
int CH_RES_CNT_CRC_SHIFT_RES_LSB = 8
 
int CH_RES_CNT_CRC_SHIFT_CNT = 4
 
int CH_RES_CNT_CRC_SHIFT_CRC = 0
 
int CH_EXP_RES_MASK_EXP = 0xF << CH_EXP_RES_SHIFT_EXP
 
int CH_EXP_RES_MASK_RES_MSB = 0xFFF << CH_EXP_RES_SHIFT_RES_MSB
 
int CH_RES_CNT_CRC_MASK_RES_LSB = 0xFF << CH_RES_CNT_CRC_SHIFT_RES_LSB
 
int CH_RES_CNT_CRC_MASK_CNT = 0xF << CH_RES_CNT_CRC_SHIFT_CNT
 
int CH_RES_CNT_CRC_MASK_CRC = 0xF << CH_RES_CNT_CRC_SHIFT_CRC
 

Properties

 connected = property(is_connected)
 

Detailed Description

Constructor & Destructor Documentation

◆ __init__()

def qwiic_opt4048.QwOpt4048.__init__ (   self,
  address = None,
  i2c_driver = None 
)

Initialize the QwOpt4048 device class.

Parameters
addressThe I2C address to use for the device.
i2c_driverAn existing i2c driver object to use (optional).
Returns
Object The QwOpt4048 device object.

Member Function Documentation

◆ begin()

def qwiic_opt4048.QwOpt4048.begin (   self)

Initializes this device with default parameters.

Returns
bool Returns True if successful, otherwise False

◆ get_adc_ch0()

def qwiic_opt4048.QwOpt4048.get_adc_ch0 (   self)

Retrieve the ADC value of channel 0 of the OPT4048.

Returns
int ADC value of channel 0.

◆ get_adc_ch1()

def qwiic_opt4048.QwOpt4048.get_adc_ch1 (   self)

Retrieve the ADC value of channel 1 of the OPT4048.

Returns
int ADC value of channel 1.

◆ get_adc_ch2()

def qwiic_opt4048.QwOpt4048.get_adc_ch2 (   self)

Retrieve the ADC value of channel 2 of the OPT4048.

Returns
int ADC value of channel 2.

◆ get_adc_ch3()

def qwiic_opt4048.QwOpt4048.get_adc_ch3 (   self)

Retrieve the ADC value of channel 3 of the OPT4048.

Returns
int ADC value of channel 3.

◆ get_adc_code()

def qwiic_opt4048.QwOpt4048.get_adc_code (   self,
  bytes 
)

Calculate the ADC code from the 2 words read from an ADC register.

Parameters
listof int bytes: The resulting list of doing a 4 byte block read from an ADC register.
Returns
ADC code.

◆ get_adc_counter()

def qwiic_opt4048.QwOpt4048.get_adc_counter (   self,
  bytes 
)

Calculate the ADC counter from the 2 words read from an ADC register.

Parameters
listof int bytes: The resulting list of doing a 4 byte block read from an ADC register.
Returns
ADC counter.

◆ get_adc_crc()

def qwiic_opt4048.QwOpt4048.get_adc_crc (   self,
  bytes 
)

Calculate the ADC CRC from the 2 words read from an ADC register.

Parameters
listof int bytes: The resulting list of doing a 4 byte block read from an ADC register.
Returns
ADC CRC.

◆ get_all_adc()

def qwiic_opt4048.QwOpt4048.get_all_adc (   self)

Retrieve the ADC values of all channels of the OPT4048.

Returns
sfe_color_t ADC values of all channels.

◆ get_all_channel_data()

def qwiic_opt4048.QwOpt4048.get_all_channel_data (   self,
  color 
)

Retrieve the ADC values of all channels of the OPT4048.

Parameters
sfe_color_tcolor: Color data object to store the ADC values.
Returns
sfe_color_t ADC values of all channels.

◆ get_all_flags()

def qwiic_opt4048.QwOpt4048.get_all_flags (   self)

Retrieve all flags of the OPT4048.

Returns
int All flags of the OPT4048.

◆ get_CCT()

def qwiic_opt4048.QwOpt4048.get_CCT (   self)

Retrieve the CCT value of the OPT4048.

Returns
float CCT value.

◆ get_CIEx()

def qwiic_opt4048.QwOpt4048.get_CIEx (   self)

Retrieve the CIEx value of the OPT4048.

Returns
float CIEx value.

◆ get_CIEy()

def qwiic_opt4048.QwOpt4048.get_CIEy (   self)

Retrieve the CIEy value of the OPT4048.

Returns
float CIEy value.

◆ get_conv_ready_flag()

def qwiic_opt4048.QwOpt4048.get_conv_ready_flag (   self)

Retrieve the flag that indicates a conversion is ready to be read.

Returns
bool Flag that indicates a conversion is ready to be read.

◆ get_conversion_time()

def qwiic_opt4048.QwOpt4048.get_conversion_time (   self)

Gets the time used to convert light to analog values.

Longer times result in more accurate readings.

Returns
int Current conversion time setting.

◆ get_device_id()

def qwiic_opt4048.QwOpt4048.get_device_id (   self)

Retrieve the unique device ID of the OPT4048.

Returns
int Unique device ID.

◆ get_fault_count()

def qwiic_opt4048.QwOpt4048.get_fault_count (   self)

Retrieve the number of faults that have been triggered.

Returns
int Number of faults that have been triggered.

◆ get_i2c_burst()

def qwiic_opt4048.QwOpt4048.get_i2c_burst (   self)

Retrieve the I2C burst setting of the OPT4048: auto-increment or single register I2C reads.

On by default.

Returns
bool I2C burst setting.

◆ get_int_active_high()

def qwiic_opt4048.QwOpt4048.get_int_active_high (   self)

Retrieve the interrupt polarity of the OPT4048.

When enabled, the interrupt pin is active high.

Returns
bool Interrupt polarity.

◆ get_int_input_enable()

def qwiic_opt4048.QwOpt4048.get_int_input_enable (   self)

Retrieve the interrupt input of the OPT4048.

When enabled, the interrupt pin is used as an input.

Returns
bool Interrupt input.

◆ get_int_latch()

def qwiic_opt4048.QwOpt4048.get_int_latch (   self)

Retrieve the interrupt latch of the OPT4048.

When enabled, the interrupt pin will remain active until the interrupt register is read.

Returns
bool Interrupt latch.

◆ get_int_mechanism()

def qwiic_opt4048.QwOpt4048.get_int_mechanism (   self)

Retrieve the interrupt mechanism of the OPT4048: SMBus Alert, INT Pin data ready for next channel, or INT Pin data ready for all channels.

Returns
int Interrupt mechanism.

◆ get_lux()

def qwiic_opt4048.QwOpt4048.get_lux (   self)

Retrieve the Lux value of the OPT4048.

Returns
float Lux value.

◆ get_operation_mode()

def qwiic_opt4048.QwOpt4048.get_operation_mode (   self)

Retrieve the current operation mode of the OPT4048.

Returns
int Current operation mode.

◆ get_overload_flag()

def qwiic_opt4048.QwOpt4048.get_overload_flag (   self)

Retrieve the flag that indicates the ADC is overloaded.

Returns
bool Flag that indicates the ADC is overloaded.

◆ get_qwake()

def qwiic_opt4048.QwOpt4048.get_qwake (   self)

Retrieve the quick wake bit for the OPT4048.

When enabled, not all systems are put into deep sleep when the device is set to this mode, resulting in faster wake times.

Returns
int Quick wake bit.

◆ get_range()

def qwiic_opt4048.QwOpt4048.get_range (   self)

Retrieve the current range setting of the OPT4048.

Returns
int Current range setting.

◆ get_threshold_high()

def qwiic_opt4048.QwOpt4048.get_threshold_high (   self)

Retrieve the high interrupt threshold value of the OPT4048.

Returns
int High interrupt threshold value.

◆ get_threshold_low()

def qwiic_opt4048.QwOpt4048.get_threshold_low (   self)

Retrieve the low interrupt threshold value of the OPT4048.

Returns
int Low interrupt threshold value.

◆ get_too_bright_flag()

def qwiic_opt4048.QwOpt4048.get_too_bright_flag (   self)

Retrieve the flag that indicates lux has is above the current range.

This is considered a fault and is stored int the fault register.

Returns
bool Flag that indicates lux is above the current range.

◆ get_too_dim_flag()

def qwiic_opt4048.QwOpt4048.get_too_dim_flag (   self)

Retrieve the flag that indicates lux has is below the current range.

This is considered a fault and is stored int the fault register.

Returns
bool Flag that indicates lux is below the current range.

◆ is_connected()

def qwiic_opt4048.QwOpt4048.is_connected (   self)

Determine if a OPT4048 device is conntected to the system.

Returns
bool True if the device is connected, otherwise False.

◆ set_basic_setup()

def qwiic_opt4048.QwOpt4048.set_basic_setup (   self)

Configure basic setup for the OPT4048.

This function sets the range, conversion time, and operation mode to default values. It's meant to just get the device up and running with minimal thought from the user.

Returns
None

◆ set_conversion_time()

def qwiic_opt4048.QwOpt4048.set_conversion_time (   self,
  time 
)

Set the time used to convert light to analog values.

Longer times result in more accurate readings.

Parameters
inttime: The desired conversion time to set.
Returns
None

◆ set_fault_count()

def qwiic_opt4048.QwOpt4048.set_fault_count (   self,
  count 
)

Set the number of faults needed to trigger an interupt.

Parameters
intcount: Number of faults needed to trigger an interupt.
Returns
None

◆ set_i2c_burst()

def qwiic_opt4048.QwOpt4048.set_i2c_burst (   self,
  enable = True 
)

Set the I2C burst setting of the OPT4048: auto-increment or single register I2C reads.

Parameters
boolenable: Enable or disable I2C burst setting.
Returns
None

◆ set_int_active_high()

def qwiic_opt4048.QwOpt4048.set_int_active_high (   self,
  enable = True 
)

Set the interrupt polarity of the OPT4048.

When enabled, the interrupt pin is active high.

Parameters
boolenable: Enable or disable interrupt polarity.
Returns
None

◆ set_int_input()

def qwiic_opt4048.QwOpt4048.set_int_input (   self,
  enable = True 
)

Set the interrupt input of the OPT4048.

When enabled, the interrupt pin is used as an input.

Parameters
boolenable: Enable or disable interrupt input.

◆ set_int_latch()

def qwiic_opt4048.QwOpt4048.set_int_latch (   self,
  enable = True 
)

Set the interrupt latch of the OPT4048.

When enabled, the interrupt pin will remain active until the interrupt register is read.

Parameters
boolenable: Enable or disable interrupt latch.
Returns
None

◆ set_int_mechanism()

def qwiic_opt4048.QwOpt4048.set_int_mechanism (   self,
  mechanism 
)

Set the interrupt mechanism of the OPT4048: SMBus Alert, INT Pin data ready for next channel, or INT Pin data ready for all channels.

Parameters
boolenable: Enable or disable interrupt mechanism.
Returns
None

◆ set_operation_mode()

def qwiic_opt4048.QwOpt4048.set_operation_mode (   self,
  mode 
)

Set the operation mode of the OPT4048: Power-down, Forced auto-range, one-shot, or continuous.

Parameters
intmode: The desired operation mode to set.
Returns
None

◆ set_qwake()

def qwiic_opt4048.QwOpt4048.set_qwake (   self,
  enable = True 
)

Sets the quick wake bit for the OPT4048.

When enabled, not all systems are put into deep sleep when the device is set to this mode, resulting in faster wake times.

Parameters
boolenable: Enable or disable quick wake.

◆ set_range()

def qwiic_opt4048.QwOpt4048.set_range (   self,
  color_range 
)

Set the range of the OPT4048.

Parameters
int(Must be one of the valid range settings in the RANGE_... enums above) color_range: The desired range to set.
Returns
None or -1 on Error

◆ set_threshold_high()

def qwiic_opt4048.QwOpt4048.set_threshold_high (   self,
  thresh 
)

Set the high interrupt threshold value of the OPT4048.

Parameters
intthresh: High interrupt threshold value.
Returns
None

◆ set_threshold_low()

def qwiic_opt4048.QwOpt4048.set_threshold_low (   self,
  thresh 
)

Set the low interrupt threshold value of the OPT4048.

Parameters
intthresh: Low interrupt threshold value.
Returns
None

Member Data Documentation

◆ address

qwiic_opt4048.QwOpt4048.address

◆ available_addresses

qwiic_opt4048.QwOpt4048.available_addresses = _AVAILABLE_I2C_ADDRESS
static

◆ CH_EXP_RES_MASK_EXP

int qwiic_opt4048.QwOpt4048.CH_EXP_RES_MASK_EXP = 0xF << CH_EXP_RES_SHIFT_EXP
static

◆ CH_EXP_RES_MASK_RES_MSB

int qwiic_opt4048.QwOpt4048.CH_EXP_RES_MASK_RES_MSB = 0xFFF << CH_EXP_RES_SHIFT_RES_MSB
static

◆ CH_EXP_RES_SHIFT_EXP

int qwiic_opt4048.QwOpt4048.CH_EXP_RES_SHIFT_EXP = 12
static

◆ CH_EXP_RES_SHIFT_RES_MSB

int qwiic_opt4048.QwOpt4048.CH_EXP_RES_SHIFT_RES_MSB = 0
static

◆ CH_RES_CNT_CRC_MASK_CNT

int qwiic_opt4048.QwOpt4048.CH_RES_CNT_CRC_MASK_CNT = 0xF << CH_RES_CNT_CRC_SHIFT_CNT
static

◆ CH_RES_CNT_CRC_MASK_CRC

int qwiic_opt4048.QwOpt4048.CH_RES_CNT_CRC_MASK_CRC = 0xF << CH_RES_CNT_CRC_SHIFT_CRC
static

◆ CH_RES_CNT_CRC_MASK_RES_LSB

int qwiic_opt4048.QwOpt4048.CH_RES_CNT_CRC_MASK_RES_LSB = 0xFF << CH_RES_CNT_CRC_SHIFT_RES_LSB
static

◆ CH_RES_CNT_CRC_SHIFT_CNT

int qwiic_opt4048.QwOpt4048.CH_RES_CNT_CRC_SHIFT_CNT = 4
static

◆ CH_RES_CNT_CRC_SHIFT_CRC

int qwiic_opt4048.QwOpt4048.CH_RES_CNT_CRC_SHIFT_CRC = 0
static

◆ CH_RES_CNT_CRC_SHIFT_RES_LSB

int qwiic_opt4048.QwOpt4048.CH_RES_CNT_CRC_SHIFT_RES_LSB = 8
static

◆ cie_matrix

list qwiic_opt4048.QwOpt4048.cie_matrix
static
Initial value:
= [
[0.000234892992, -0.0000189652390, 0.0000120811684, 0],
[0.0000407467441, 0.000198958202, -0.0000158848115, 0.00215],
[0.0000928619404, -0.0000169739553, 0.000674021520, 0],
[0, 0, 0, 0],
]

◆ CONVERSION_TIME_100MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_100MS = 0x08
static

◆ CONVERSION_TIME_12MS7

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_12MS7 = 0x05
static

◆ CONVERSION_TIME_1MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_1MS = 0x01
static

◆ CONVERSION_TIME_1MS8

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_1MS8 = 0x02
static

◆ CONVERSION_TIME_200MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_200MS = 0x09
static

◆ CONVERSION_TIME_25MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_25MS = 0x06
static

◆ CONVERSION_TIME_3MS4

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_3MS4 = 0x03
static

◆ CONVERSION_TIME_400MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_400MS = 0x0A
static

◆ CONVERSION_TIME_50MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_50MS = 0x07
static

◆ CONVERSION_TIME_600US

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_600US = 0x00
static

◆ CONVERSION_TIME_6MS5

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_6MS5 = 0x04
static

◆ CONVERSION_TIME_800MS

int qwiic_opt4048.QwOpt4048.CONVERSION_TIME_800MS = 0x0B
static

◆ device_name

qwiic_opt4048.QwOpt4048.device_name = _DEFAULT_NAME
static

◆ FAULT_COUNT_1

int qwiic_opt4048.QwOpt4048.FAULT_COUNT_1 = 0x00
static

◆ FAULT_COUNT_2

int qwiic_opt4048.QwOpt4048.FAULT_COUNT_2 = 0x01
static

◆ FAULT_COUNT_3

int qwiic_opt4048.QwOpt4048.FAULT_COUNT_3 = 0x02
static

◆ FAULT_COUNT_8

int qwiic_opt4048.QwOpt4048.FAULT_COUNT_8 = 0x03
static

◆ FLAGS_MASK_CONV_READY [1/2]

int qwiic_opt4048.QwOpt4048.FLAGS_MASK_CONV_READY = 0b1 << FLAGS_SHIFT_CONV_READY
static

◆ FLAGS_MASK_CONV_READY [2/2]

qwiic_opt4048.QwOpt4048.FLAGS_MASK_CONV_READY

◆ FLAGS_MASK_FLAG_HIGH [1/2]

int qwiic_opt4048.QwOpt4048.FLAGS_MASK_FLAG_HIGH = 0b1 << FLAGS_SHIFT_FLAG_HIGH
static

◆ FLAGS_MASK_FLAG_HIGH [2/2]

qwiic_opt4048.QwOpt4048.FLAGS_MASK_FLAG_HIGH

◆ FLAGS_MASK_FLAG_LOW [1/2]

int qwiic_opt4048.QwOpt4048.FLAGS_MASK_FLAG_LOW = 0b1 << FLAGS_SHIFT_FLAG_LOW
static

◆ FLAGS_MASK_FLAG_LOW [2/2]

qwiic_opt4048.QwOpt4048.FLAGS_MASK_FLAG_LOW

◆ FLAGS_MASK_OVERLOAD [1/2]

int qwiic_opt4048.QwOpt4048.FLAGS_MASK_OVERLOAD = 0b1 << FLAGS_SHIFT_OVERLOAD
static

◆ FLAGS_MASK_OVERLOAD [2/2]

qwiic_opt4048.QwOpt4048.FLAGS_MASK_OVERLOAD

◆ FLAGS_SHIFT_CONV_READY

int qwiic_opt4048.QwOpt4048.FLAGS_SHIFT_CONV_READY = 2
static

◆ FLAGS_SHIFT_FLAG_HIGH

int qwiic_opt4048.QwOpt4048.FLAGS_SHIFT_FLAG_HIGH = 1
static

◆ FLAGS_SHIFT_FLAG_LOW

int qwiic_opt4048.QwOpt4048.FLAGS_SHIFT_FLAG_LOW = 0
static

◆ FLAGS_SHIFT_OVERLOAD

int qwiic_opt4048.QwOpt4048.FLAGS_SHIFT_OVERLOAD = 3
static

◆ INT_DR_ALL_CHANNELS

int qwiic_opt4048.QwOpt4048.INT_DR_ALL_CHANNELS = 0x03
static

◆ INT_DR_NEXT_CHANNEL

int qwiic_opt4048.QwOpt4048.INT_DR_NEXT_CHANNEL = 0x01
static

◆ INT_SMBUS_ALERT

int qwiic_opt4048.QwOpt4048.INT_SMBUS_ALERT = 0x00
static

◆ OPERATION_MODE_AUTO_ONE_SHOT

int qwiic_opt4048.QwOpt4048.OPERATION_MODE_AUTO_ONE_SHOT = 0x01
static

◆ OPERATION_MODE_CONTINUOUS

int qwiic_opt4048.QwOpt4048.OPERATION_MODE_CONTINUOUS = 0x03
static

◆ OPERATION_MODE_ONE_SHOT

int qwiic_opt4048.QwOpt4048.OPERATION_MODE_ONE_SHOT = 0x02
static

◆ OPERATION_MODE_POWER_DOWN

int qwiic_opt4048.QwOpt4048.OPERATION_MODE_POWER_DOWN = 0x00
static

◆ OPT_MATRIX_COLS

int qwiic_opt4048.QwOpt4048.OPT_MATRIX_COLS = 4
static

◆ OPT_MATRIX_ROWS

int qwiic_opt4048.QwOpt4048.OPT_MATRIX_ROWS = 4
static

◆ RANGE_144LUX

int qwiic_opt4048.QwOpt4048.RANGE_144LUX = 0x06
static

◆ RANGE_18LUX

int qwiic_opt4048.QwOpt4048.RANGE_18LUX = 0x03
static

◆ RANGE_2KLUX2

int qwiic_opt4048.QwOpt4048.RANGE_2KLUX2 = 0x00
static

◆ RANGE_36LUX

int qwiic_opt4048.QwOpt4048.RANGE_36LUX = 0x04
static

◆ RANGE_4KLUX5

int qwiic_opt4048.QwOpt4048.RANGE_4KLUX5 = 0x01
static

◆ RANGE_72LUX

int qwiic_opt4048.QwOpt4048.RANGE_72LUX = 0x05
static

◆ RANGE_9LUX

int qwiic_opt4048.QwOpt4048.RANGE_9LUX = 0x02
static

◆ RANGE_AUTO

int qwiic_opt4048.QwOpt4048.RANGE_AUTO = 0x0C
static

◆ SFE_OPT4048_REGISTER_CONTROL

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_CONTROL = 0x0A
static

◆ SFE_OPT4048_REGISTER_DEVICE_ID

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_DEVICE_ID = 0x11
static

◆ SFE_OPT4048_REGISTER_EXP_RES_CH0

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_EXP_RES_CH0 = 0x00
static

◆ SFE_OPT4048_REGISTER_EXP_RES_CH1

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_EXP_RES_CH1 = 0x02
static

◆ SFE_OPT4048_REGISTER_EXP_RES_CH2

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_EXP_RES_CH2 = 0x04
static

◆ SFE_OPT4048_REGISTER_EXP_RES_CH3

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_EXP_RES_CH3 = 0x06
static

◆ SFE_OPT4048_REGISTER_FLAGS

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_FLAGS = 0x0C
static

◆ SFE_OPT4048_REGISTER_INT_CONTROL

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_INT_CONTROL = 0x0B
static

◆ SFE_OPT4048_REGISTER_RES_CNT_CRC_CH0

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_RES_CNT_CRC_CH0 = 0x01
static

◆ SFE_OPT4048_REGISTER_RES_CNT_CRC_CH1

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_RES_CNT_CRC_CH1 = 0x03
static

◆ SFE_OPT4048_REGISTER_RES_CNT_CRC_CH2

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_RES_CNT_CRC_CH2 = 0x05
static

◆ SFE_OPT4048_REGISTER_RES_CNT_CRC_CH3

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_RES_CNT_CRC_CH3 = 0x07
static

◆ SFE_OPT4048_REGISTER_THRESH_H_EXP_RES

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_THRESH_H_EXP_RES = 0x09
static

◆ SFE_OPT4048_REGISTER_THRESH_L_EXP_RES

int qwiic_opt4048.QwOpt4048.SFE_OPT4048_REGISTER_THRESH_L_EXP_RES = 0x08
static

◆ THRESH_CHANNEL_CH0

int qwiic_opt4048.QwOpt4048.THRESH_CHANNEL_CH0 = 0x00
static

◆ THRESH_CHANNEL_CH1

int qwiic_opt4048.QwOpt4048.THRESH_CHANNEL_CH1 = 0x01
static

◆ THRESH_CHANNEL_CH2

int qwiic_opt4048.QwOpt4048.THRESH_CHANNEL_CH2 = 0x02
static

◆ THRESH_CHANNEL_CH3

int qwiic_opt4048.QwOpt4048.THRESH_CHANNEL_CH3 = 0x03
static

Property Documentation

◆ connected

qwiic_opt4048.QwOpt4048.connected = property(is_connected)
static

The documentation for this class was generated from the following file: