Loading...
Searching...
No Matches

Interrupt configuration. More...

Detailed Description

Interrupt configuration.

The interrupt enable flags apds99xx_int_config_t::als_int_en and apds99xx_int_config_t::prx_int_en control whether ALS and proximity sensor interrupts are enable.

The persistence values apds99xx_int_config_t::als_pers and apds99xx_int_config_t::prx_pers specify how many ALS or proximity values have to be outside of the thresholds defined by apds99xx_int_config_t::als_thresh_low and apds99xx_int_config_t::als_thresh_high or apds99xx_int_config_t::prx_thresh_low and apds99xx_int_config_t::prx_thresh_high.

Note
If the persistence values are 0, an interrupt is generated in each cycle at the end of the corresponding measurement step, regardless of the values and the defined threshold. The corresponding interrupt is thus used as a data-ready interrupt.

Definition at line 374 of file apds99xx.h.

#include <apds99xx.h>

Data Fields

bool als_int_en
 ALS interrupt enabled.
 
uint8_t als_pers
 Number of consecutive ALS values that have to be outside the thresholds to generate an interrupt:
 
uint16_t als_thresh_low
 Low threshold value for ALS interrupts.
 
uint16_t als_thresh_high
 High threshold value for ALS interrupts.
 
bool prx_int_en
 Proximity interrupt enabled.
 
uint8_t prx_pers
 Number of consecutive proximity values that have to be outside the thresholds to generate an interrupt:
 
uint16_t prx_thresh_low
 Low threshold for proximity values (only the low byte is used for APDS9960)
 
uint16_t prx_thresh_high
 High threshold for proximity values (only the low byte is used for APDS9960)
 

Field Documentation

◆ als_int_en

bool apds99xx_int_config_t::als_int_en

ALS interrupt enabled.

Definition at line 375 of file apds99xx.h.

◆ als_pers

uint8_t apds99xx_int_config_t::als_pers

Number of consecutive ALS values that have to be outside the thresholds to generate an interrupt:

Value Interrupt is generated
0 every cycle (ALS data-ready interrupt)
1...15 when n values are outside the thresholds

Definition at line 376 of file apds99xx.h.

◆ als_thresh_high

uint16_t apds99xx_int_config_t::als_thresh_high

High threshold value for ALS interrupts.

Definition at line 383 of file apds99xx.h.

◆ als_thresh_low

uint16_t apds99xx_int_config_t::als_thresh_low

Low threshold value for ALS interrupts.

Definition at line 382 of file apds99xx.h.

◆ prx_int_en

bool apds99xx_int_config_t::prx_int_en

Proximity interrupt enabled.

Definition at line 385 of file apds99xx.h.

◆ prx_pers

uint8_t apds99xx_int_config_t::prx_pers

Number of consecutive proximity values that have to be outside the thresholds to generate an interrupt:

Value Interrupt is generated
0 every cycle (PRX data-ready interrupt)
1, 2, 3 when 1, 2, or 3 values are outside the thresholds
4...15 when (n - 3) * 5 values are outside the thresholds

Definition at line 386 of file apds99xx.h.

◆ prx_thresh_high

uint16_t apds99xx_int_config_t::prx_thresh_high

High threshold for proximity values (only the low byte is used for APDS9960)

Definition at line 397 of file apds99xx.h.

◆ prx_thresh_low

uint16_t apds99xx_int_config_t::prx_thresh_low

Low threshold for proximity values (only the low byte is used for APDS9960)

Definition at line 395 of file apds99xx.h.


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