Sensor interface for LITEON LTR-303ALS-01 ambient light sensor.
More...
|
enum | sif_ltr303als_mode { SIF_LTR303ALS_MODE_POLL_ONE_SHOT
, SIF_LTR303ALS_MODE_CONTINUOUS
} |
|
enum | sif_ltr303als_reg_address {
LTR303ALS_REG_CONTROL = 0x80
, LTR303ALS_REG_MEAS_RATE = 0x85
, LTR303ALS_REG_PART_ID = 0x86
, LTR303ALS_REG_MANUFAC_ID = 0x87
,
LTR303ALS_REG_DATA_CH1_0 = 0x88
, LTR303ALS_REG_DATA_CH1_1 = 0x89
, LTR303ALS_REG_DATA_CH0_0 = 0x8A
, LTR303ALS_REG_DATA_CH0_1 = 0x8B
,
LTR303ALS_REG_STATUS = 0x8C
, LTR303ALS_REG_INTERRUPT = 0x8F
, LTR303ALS_REG_THRES_UP_0 = 0x97
, LTR303ALS_REG_THRES_UP_1 = 0x98
,
LTR303ALS_REG_THRES_LOW_0 = 0x99
, LTR303ALS_REG_THRES_LOW_1 = 0x9A
, LTR303ALS_REG_INT_PERS = 0x9E
, REG_LTR303ALS_CONTR = 0x80
,
REG_LTR303ALS_MEAS_RATE = 0x85
, REG_LTR303ALS_PART_ID = 0x86
, REG_LTR303ALS_MANUFAC_ID = 0x87
, REG_LTR303ALS_DATA_CH1_0 = 0x88
,
REG_LTR303ALS_DATA_CH1_1 = 0x89
, REG_LTR303ALS_DATA_CH0_0 = 0x8A
, REG_LTR303ALS_DATA_CH0_1 = 0x8B
, REG_LTR303ALS_STATUS = 0x8C
,
REG_LTR303ALS_INTERRUPT = 0x8F
, REG_LTR303ALS_THRES_UP_0 = 0x97
, REG_LTR303ALS_THRES_UP_1 = 0x98
, REG_LTR303ALS_THRES_LOW_0 = 0x99
,
REG_LTR303ALS_THRES_LOW_1 = 0x9A
, REG_LTR303ALS_INT_PERS = 0x9E
} |
|
enum | sif_ltr303als_gain {
LTR303ALS_GAIN_1X = 0x00
, LTR303ALS_GAIN_2X = 0x01
, LTR303ALS_GAIN_4X = 0x02
, LTR303ALS_GAIN_8X = 0x03
,
LTR303ALS_GAIN_48X = 0x06
, LTR303ALS_GAIN_96X = 0x07
} |
|
enum | sif_ltr303als_tint {
LTR303ALS_TINT_50 = 0x01
, LTR303ALS_TINT_100 = 0x00
, LTR303ALS_TINT_150 = 0x04
, LTR303ALS_TINT_200 = 0x02
,
LTR303ALS_TINT_250 = 0x05
, LTR303ALS_TINT_300 = 0x06
, LTR303ALS_TINT_350 = 0x07
, LTR303ALS_TINT_400 = 0x03
} |
|
enum | sif_ltr303als_tmeas {
LTR303ALS_TMEAS_50 = 0x00
, LTR303ALS_TMEAS_100 = 0x01
, LTR303ALS_TMEAS_200 = 0x02
, LTR303ALS_TMEAS_500 = 0x03
,
LTR303ALS_TMEAS_1000 = 0x04
, LTR303ALS_TMEAS_2000 = 0x05
} |
|
Sensor interface for LITEON LTR-303ALS-01 ambient light sensor.
◆ SIF_LTR303ALS_GAIN
◆ SIF_LTR303ALS_MANFID
#define SIF_LTR303ALS_MANFID 0x05 |
◆ SIF_LTR303ALS_MODE
◆ SIF_LTR303ALS_PARTID
#define SIF_LTR303ALS_PARTID 0xA0 |
◆ SIF_LTR303ALS_TINT
◆ SIF_LTR303ALS_TMEAS
◆ SIF_LTR303ALS_TSTUP_POWERUP_MS
#define SIF_LTR303ALS_TSTUP_POWERUP_MS 100 /* startup time [ms] after power-up */ |
◆ SIF_LTR303ALS_TSTUP_STANDBY_MS
#define SIF_LTR303ALS_TSTUP_STANDBY_MS 10 /* startup time [ms] standby to active */ |
◆ SIF_SAD_LTR303ALS
#define SIF_SAD_LTR303ALS 0x29 |
◆ sif_ltr303als_gain
Enumerator |
---|
LTR303ALS_GAIN_1X | |
LTR303ALS_GAIN_2X | |
LTR303ALS_GAIN_4X | |
LTR303ALS_GAIN_8X | |
LTR303ALS_GAIN_48X | |
LTR303ALS_GAIN_96X | |
◆ sif_ltr303als_mode
Enumerator |
---|
SIF_LTR303ALS_MODE_POLL_ONE_SHOT | |
SIF_LTR303ALS_MODE_CONTINUOUS | |
◆ sif_ltr303als_reg_address
Enumerator |
---|
LTR303ALS_REG_CONTROL | |
LTR303ALS_REG_MEAS_RATE | |
LTR303ALS_REG_PART_ID | |
LTR303ALS_REG_MANUFAC_ID | |
LTR303ALS_REG_DATA_CH1_0 | |
LTR303ALS_REG_DATA_CH1_1 | |
LTR303ALS_REG_DATA_CH0_0 | |
LTR303ALS_REG_DATA_CH0_1 | |
LTR303ALS_REG_STATUS | |
LTR303ALS_REG_INTERRUPT | |
LTR303ALS_REG_THRES_UP_0 | |
LTR303ALS_REG_THRES_UP_1 | |
LTR303ALS_REG_THRES_LOW_0 | |
LTR303ALS_REG_THRES_LOW_1 | |
LTR303ALS_REG_INT_PERS | |
REG_LTR303ALS_CONTR | |
REG_LTR303ALS_MEAS_RATE | |
REG_LTR303ALS_PART_ID | |
REG_LTR303ALS_MANUFAC_ID | |
REG_LTR303ALS_DATA_CH1_0 | |
REG_LTR303ALS_DATA_CH1_1 | |
REG_LTR303ALS_DATA_CH0_0 | |
REG_LTR303ALS_DATA_CH0_1 | |
REG_LTR303ALS_STATUS | |
REG_LTR303ALS_INTERRUPT | |
REG_LTR303ALS_THRES_UP_0 | |
REG_LTR303ALS_THRES_UP_1 | |
REG_LTR303ALS_THRES_LOW_0 | |
REG_LTR303ALS_THRES_LOW_1 | |
REG_LTR303ALS_INT_PERS | |
◆ sif_ltr303als_tint
Enumerator |
---|
LTR303ALS_TINT_50 | |
LTR303ALS_TINT_100 | |
LTR303ALS_TINT_150 | |
LTR303ALS_TINT_200 | |
LTR303ALS_TINT_250 | |
LTR303ALS_TINT_300 | |
LTR303ALS_TINT_350 | |
LTR303ALS_TINT_400 | |
◆ sif_ltr303als_tmeas
Enumerator |
---|
LTR303ALS_TMEAS_50 | |
LTR303ALS_TMEAS_100 | |
LTR303ALS_TMEAS_200 | |
LTR303ALS_TMEAS_500 | |
LTR303ALS_TMEAS_1000 | |
LTR303ALS_TMEAS_2000 | |
◆ SIF_LTR303ALS_Configure()
LTR303ALS: Configure Sensor.
- Parameters
-
gain | gain setting (sif_ltr303als_gain) |
tint | integration time setting (sif_ltr303als_tint) |
tmeas | measurement period setting (sif_ltr303als_tmeas) |
- Returns
- status
◆ SIF_LTR303ALS_Initialise()
u8_t SIF_LTR303ALS_Initialise |
( |
void |
| ) |
|
LTR303ALS: Initialise Sensor.
- Returns
- status, 0 = success
◆ SIF_LTR303ALS_ReadLight()
LTR303ALS: Read Light Measurement.
- Parameters
-
ch0 | pointer to 16-bit result for channel 0 (visible spectrum) |
ch1 | pointer to 16-bit result for channel 1 (infrared) |
- Returns
- status