Home
last modified time | relevance | path

Searched refs:als1 (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()
294 (als1 >= AMS_TMD2772_ALS_MAX_CHANNEL_COUNT)) { in getLuxFromAlsData()
/device/google/contexthub/firmware/os/drivers/rohm_rpr0521/
Drohm_rpr0521.c384 static inline float getLuxFromAlsData(uint16_t als0, uint16_t als1) in getLuxFromAlsData() argument
388 float d1 = (float)als1 * invGain[ROHM_RPR0521_GAIN_ALS1]; in getLuxFromAlsData()
604 uint16_t als0, als1, ps; in handle_i2c_event() local
696 als1 = *(uint16_t*)(xfer->txrxBuf+2); in handle_i2c_event()
698 DEBUG_PRINT("als sample ready: als0=%u als1=%u\n", als0, als1); in handle_i2c_event()
701 sample.fdata = getLuxFromAlsData(als0, als1); in handle_i2c_event()