Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
sif_ltr303als.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SIF_SAD_LTR303ALS   0x29
 
#define SIF_LTR303ALS_PARTID   0xA0
 
#define SIF_LTR303ALS_MANFID   0x05
 
#define SIF_LTR303ALS_MODE   SIF_LTR303ALS_MODE_POLL_ONE_SHOT
 
#define SIF_LTR303ALS_TSTUP_POWERUP_MS   100 /* startup time [ms] after power-up */
 
#define SIF_LTR303ALS_TSTUP_STANDBY_MS   10 /* startup time [ms] standby to active */
 
#define SIF_LTR303ALS_GAIN   LTR303ALS_GAIN_1X
 
#define SIF_LTR303ALS_TINT   LTR303ALS_TINT_100
 
#define SIF_LTR303ALS_TMEAS   LTR303ALS_TMEAS_200
 

Enumerations

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
}
 

Functions

u8_t SIF_LTR303ALS_Initialise (void)
 LTR303ALS: Initialise Sensor. More...
 
u8_t SIF_LTR303ALS_Configure (u8_t gain, u8_t tint, u8_t tmeas)
 LTR303ALS: Configure Sensor. More...
 
u8_t SIF_LTR303ALS_ReadLight (u16_t *ch0, u16_t *ch1)
 LTR303ALS: Read Light Measurement. More...