Home
last modified time | relevance | path

Searched refs:als0 (Results 1 – 2 of 2) sorted by relevance

/device/google/contexthub/firmware/os/drivers/ams_tmd2772/
Dams_tmd2772.c274 static inline float getLuxFromAlsData(uint16_t als0, uint16_t als1) in getLuxFromAlsData() argument
279 if ((als0 * 10) < (als1 * 21)) { in getLuxFromAlsData()
282 } else if (((als0 * 10) >= (als1 * 21)) && ((als0 * 10) <= (als1 * 43)) && (als0 > 300)) { in getLuxFromAlsData()
290 float lux1 = GA * 207 * (als0 - (1.799 * als1)) * cpl; in getLuxFromAlsData()
291 float lux2 = GA * 207 * ((0.188f * als0) - (0.303 * als1)) * cpl; in getLuxFromAlsData()
293 if ((als0 >= AMS_TMD2772_ALS_MAX_CHANNEL_COUNT) || in getLuxFromAlsData()
/device/google/contexthub/firmware/os/drivers/rohm_rpr0521/
Drohm_rpr0521.c343 static inline float getLuxFromAlsData(uint16_t als0, uint16_t als1) in getLuxFromAlsData() argument
346 float d0 = (float)als0 * invGain[ROHM_RPR0521_GAIN_ALS0]; in getLuxFromAlsData()
567 uint16_t als0, als1, ps; in handle_i2c_event() local
662 als0 = *(uint16_t*)(xfer->txrxBuf); in handle_i2c_event()
665 DEBUG_PRINT("als sample ready: als0=%u als1=%u\n", als0, als1); in handle_i2c_event()
668 sample.fdata = getLuxFromAlsData(als0, als1); in handle_i2c_event()