Loading...
Searching...
No Matches

Internal addresses, registers, constants for the VCNL40X0 devices. More...

Detailed Description

Internal addresses, registers, constants for the VCNL40X0 devices.

Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file vcnl40x0_internals.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define VCNL40X0_ADDR   (0x13)
 VCNL40X0 I2C address.
 
#define VCNL40X0_PRODUCT_ID   (0x20)
 VCNL40X0 product ID.
 

VCNL40X0 registers

#define VCNL40X0_REG_COMMAND   (0x80)
 
#define VCNL40X0_REG_PRODUCT_ID   (0x81)
 
#define VCNL40X0_REG_PROXIMITY_RATE   (0x82)
 
#define VCNL40X0_REG_PROXIMITY_CURRENT   (0x83)
 
#define VCNL40X0_REG_AMBIENT_PARAMETER   (0x84)
 
#define VCNL40X0_REG_AMBIENT_VALUE   (0x85)
 
#define VCNL40X0_REG_PROXIMITY_VALUE   (0x87)
 
#define VCNL40X0_REG_INTERRUPT_CONTROL   (0x89)
 
#define VCNL40X0_REG_INTERRUPT_LOW_THRES   (0x8a)
 
#define VCNL40X0_REG_HIGH_THRES   (0x8c)
 
#define VCNL40X0_REG_INTERRUPT_STATUS   (0x8e)
 
#define VCNL40X0_REG_PROX_TIMING   (0xf9)
 
#define VCNL40X0_REG_AMBIENT_IR_LIGHT_LEVEL   (0x90) /* should not be used */
 

VCNL40X0 command register constants

#define VCNL40X0_COMMAND_ALL_DISABLE   (0x00)
 
#define VCNL40X0_COMMAND_SELFTIMED_MODE_ENABLE   (0x01)
 
#define VCNL40X0_COMMAND_PROX_ENABLE   (0x02)
 
#define VCNL40X0_COMMAND_AMBI_ENABLE   (0x04)
 
#define VCNL40X0_COMMAND_PROX_ON_DEMAND   (0x08)
 
#define VCNL40X0_COMMAND_AMBI_ON_DEMAND   (0x10)
 
#define VCNL40X0_COMMAND_MASK_PROX_DATA_READY   (0x20)
 
#define VCNL40X0_COMMAND_MASK_AMBI_DATA_READY   (0x40)
 
#define VCNL40X0_COMMAND_MASK_LOCK   (0x80)
 

VCNL40X0 product ID register constants

#define VCNL40X0_PRODUCT_MASK_REVISION_ID   (0x0f)
 
#define VCNL40X0_PRODUCT_MASK_PRODUCT_ID   (0xf0)
 

VCNL40X0 proximity rate register constants

#define VCNL40X0_PROXIMITY_MASK_MEASUREMENT_RATE   (0x07)
 
#define VCNL40X0_PROXIMITY_MASK_LED_CURRENT   (0x3f)
 
#define VCNL40X0_PROXIMITY_MASK_FUSE_PROG_ID   (0xc0)
 

VCNL40X0 ambient light parameter register constants

#define VCNL40X0_AMBIENT_MASK_PARA_AVERAGE   (0x07)
 
#define VCNL40X0_AMBIENT_PARA_AUTO_OFFSET_ENABLE   (0x08)
 
#define VCNL40X0_AMBIENT_MASK_PARA_AUTO_OFFSET   (0x08)
 
#define VCNL40X0_AMBIENT_MASK_PARA_MEAS_RATE   (0x70)
 
#define VCNL40X0_AMBIENT_PARA_CONT_CONV_ENABLE   (0x80)
 
#define VCNL40X0_AMBIENT_MASK_PARA_CONT_CONV   (0x80)
 

VCNL40X0 interrupt control register constants

#define VCNL40X0_INTERRUPT_THRES_SEL_PROX   (0x00)
 
#define VCNL40X0_INTERRUPT_THRES_SEL_ALS   (0x01)
 
#define VCNL40X0_INTERRUPT_THRES_ENABLE   (0x02)
 
#define VCNL40X0_INTERRUPT_ALS_READY_ENABLE   (0x04)
 
#define VCNL40X0_INTERRUPT_PROX_READY_ENABLE   (0x08)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_1   (0x00)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_2   (0x20)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_4   (0x40)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_8   (0x60)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_16   (0x80)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_32   (0xa0)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_64   (0xc0)
 
#define VCNL40X0_INTERRUPT_COUNT_EXCEED_128   (0xe0)
 
#define VCNL40X0_INTERRUPT_MASK_COUNT_EXCEED   (0xe0)
 

VCNL40X0 interrupt status register constants

#define VCNL40X0_INTERRUPT_STATUS_THRES_HI   (0x01)
 
#define VCNL40X0_INTERRUPT_STATUS_THRES_LO   (0x02)
 
#define VCNL40X0_INTERRUPT_STATUS_ALS_READY   (0x04)
 
#define VCNL40X0_INTERRUPT_STATUS_PROX_READY   (0x08)
 
#define VCNL40X0_INTERRUPT_MASK_STATUS_THRES_HI   (0x01)
 
#define VCNL40X0_INTERRUPT_MASK_THRES_LO   (0x02)
 
#define VCNL40X0_INTERRUPT_MASK_ALS_READY   (0x04)
 
#define VCNL40X0_INTERRUPT_MASK_PROX_READY   (0x08)
 

Macro Definition Documentation

◆ VCNL40X0_ADDR

#define VCNL40X0_ADDR   (0x13)

VCNL40X0 I2C address.

Definition at line 29 of file vcnl40x0_internals.h.

◆ VCNL40X0_AMBIENT_MASK_PARA_AUTO_OFFSET

#define VCNL40X0_AMBIENT_MASK_PARA_AUTO_OFFSET   (0x08)

Definition at line 93 of file vcnl40x0_internals.h.

◆ VCNL40X0_AMBIENT_MASK_PARA_AVERAGE

#define VCNL40X0_AMBIENT_MASK_PARA_AVERAGE   (0x07)

Definition at line 91 of file vcnl40x0_internals.h.

◆ VCNL40X0_AMBIENT_MASK_PARA_CONT_CONV

#define VCNL40X0_AMBIENT_MASK_PARA_CONT_CONV   (0x80)

Definition at line 96 of file vcnl40x0_internals.h.

◆ VCNL40X0_AMBIENT_MASK_PARA_MEAS_RATE

#define VCNL40X0_AMBIENT_MASK_PARA_MEAS_RATE   (0x70)

Definition at line 94 of file vcnl40x0_internals.h.

◆ VCNL40X0_AMBIENT_PARA_AUTO_OFFSET_ENABLE

#define VCNL40X0_AMBIENT_PARA_AUTO_OFFSET_ENABLE   (0x08)

Definition at line 92 of file vcnl40x0_internals.h.

◆ VCNL40X0_AMBIENT_PARA_CONT_CONV_ENABLE

#define VCNL40X0_AMBIENT_PARA_CONT_CONV_ENABLE   (0x80)

Definition at line 95 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_ALL_DISABLE

#define VCNL40X0_COMMAND_ALL_DISABLE   (0x00)

Definition at line 59 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_AMBI_ENABLE

#define VCNL40X0_COMMAND_AMBI_ENABLE   (0x04)

Definition at line 62 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_AMBI_ON_DEMAND

#define VCNL40X0_COMMAND_AMBI_ON_DEMAND   (0x10)

Definition at line 64 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_MASK_AMBI_DATA_READY

#define VCNL40X0_COMMAND_MASK_AMBI_DATA_READY   (0x40)

Definition at line 66 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_MASK_LOCK

#define VCNL40X0_COMMAND_MASK_LOCK   (0x80)

Definition at line 67 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_MASK_PROX_DATA_READY

#define VCNL40X0_COMMAND_MASK_PROX_DATA_READY   (0x20)

Definition at line 65 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_PROX_ENABLE

#define VCNL40X0_COMMAND_PROX_ENABLE   (0x02)

Definition at line 61 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_PROX_ON_DEMAND

#define VCNL40X0_COMMAND_PROX_ON_DEMAND   (0x08)

Definition at line 63 of file vcnl40x0_internals.h.

◆ VCNL40X0_COMMAND_SELFTIMED_MODE_ENABLE

#define VCNL40X0_COMMAND_SELFTIMED_MODE_ENABLE   (0x01)

Definition at line 60 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_ALS_READY_ENABLE

#define VCNL40X0_INTERRUPT_ALS_READY_ENABLE   (0x04)

Definition at line 106 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_1

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_1   (0x00)

Definition at line 108 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_128

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_128   (0xe0)

Definition at line 115 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_16

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_16   (0x80)

Definition at line 112 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_2

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_2   (0x20)

Definition at line 109 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_32

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_32   (0xa0)

Definition at line 113 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_4

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_4   (0x40)

Definition at line 110 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_64

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_64   (0xc0)

Definition at line 114 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_COUNT_EXCEED_8

#define VCNL40X0_INTERRUPT_COUNT_EXCEED_8   (0x60)

Definition at line 111 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_MASK_ALS_READY

#define VCNL40X0_INTERRUPT_MASK_ALS_READY   (0x04)

Definition at line 129 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_MASK_COUNT_EXCEED

#define VCNL40X0_INTERRUPT_MASK_COUNT_EXCEED   (0xe0)

Definition at line 116 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_MASK_PROX_READY

#define VCNL40X0_INTERRUPT_MASK_PROX_READY   (0x08)

Definition at line 130 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_MASK_STATUS_THRES_HI

#define VCNL40X0_INTERRUPT_MASK_STATUS_THRES_HI   (0x01)

Definition at line 127 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_MASK_THRES_LO

#define VCNL40X0_INTERRUPT_MASK_THRES_LO   (0x02)

Definition at line 128 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_PROX_READY_ENABLE

#define VCNL40X0_INTERRUPT_PROX_READY_ENABLE   (0x08)

Definition at line 107 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_STATUS_ALS_READY

#define VCNL40X0_INTERRUPT_STATUS_ALS_READY   (0x04)

Definition at line 125 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_STATUS_PROX_READY

#define VCNL40X0_INTERRUPT_STATUS_PROX_READY   (0x08)

Definition at line 126 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_STATUS_THRES_HI

#define VCNL40X0_INTERRUPT_STATUS_THRES_HI   (0x01)

Definition at line 123 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_STATUS_THRES_LO

#define VCNL40X0_INTERRUPT_STATUS_THRES_LO   (0x02)

Definition at line 124 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_THRES_ENABLE

#define VCNL40X0_INTERRUPT_THRES_ENABLE   (0x02)

Definition at line 105 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_THRES_SEL_ALS

#define VCNL40X0_INTERRUPT_THRES_SEL_ALS   (0x01)

Definition at line 104 of file vcnl40x0_internals.h.

◆ VCNL40X0_INTERRUPT_THRES_SEL_PROX

#define VCNL40X0_INTERRUPT_THRES_SEL_PROX   (0x00)

Definition at line 103 of file vcnl40x0_internals.h.

◆ VCNL40X0_PRODUCT_ID

#define VCNL40X0_PRODUCT_ID   (0x20)

VCNL40X0 product ID.

Definition at line 34 of file vcnl40x0_internals.h.

◆ VCNL40X0_PRODUCT_MASK_PRODUCT_ID

#define VCNL40X0_PRODUCT_MASK_PRODUCT_ID   (0xf0)

Definition at line 75 of file vcnl40x0_internals.h.

◆ VCNL40X0_PRODUCT_MASK_REVISION_ID

#define VCNL40X0_PRODUCT_MASK_REVISION_ID   (0x0f)

Definition at line 74 of file vcnl40x0_internals.h.

◆ VCNL40X0_PROXIMITY_MASK_FUSE_PROG_ID

#define VCNL40X0_PROXIMITY_MASK_FUSE_PROG_ID   (0xc0)

Definition at line 84 of file vcnl40x0_internals.h.

◆ VCNL40X0_PROXIMITY_MASK_LED_CURRENT

#define VCNL40X0_PROXIMITY_MASK_LED_CURRENT   (0x3f)

Definition at line 83 of file vcnl40x0_internals.h.

◆ VCNL40X0_PROXIMITY_MASK_MEASUREMENT_RATE

#define VCNL40X0_PROXIMITY_MASK_MEASUREMENT_RATE   (0x07)

Definition at line 82 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_AMBIENT_IR_LIGHT_LEVEL

#define VCNL40X0_REG_AMBIENT_IR_LIGHT_LEVEL   (0x90) /* should not be used */

Definition at line 52 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_AMBIENT_PARAMETER

#define VCNL40X0_REG_AMBIENT_PARAMETER   (0x84)

Definition at line 44 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_AMBIENT_VALUE

#define VCNL40X0_REG_AMBIENT_VALUE   (0x85)

Definition at line 45 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_COMMAND

#define VCNL40X0_REG_COMMAND   (0x80)

Definition at line 40 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_HIGH_THRES

#define VCNL40X0_REG_HIGH_THRES   (0x8c)

Definition at line 49 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_INTERRUPT_CONTROL

#define VCNL40X0_REG_INTERRUPT_CONTROL   (0x89)

Definition at line 47 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_INTERRUPT_LOW_THRES

#define VCNL40X0_REG_INTERRUPT_LOW_THRES   (0x8a)

Definition at line 48 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_INTERRUPT_STATUS

#define VCNL40X0_REG_INTERRUPT_STATUS   (0x8e)

Definition at line 50 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_PRODUCT_ID

#define VCNL40X0_REG_PRODUCT_ID   (0x81)

Definition at line 41 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_PROX_TIMING

#define VCNL40X0_REG_PROX_TIMING   (0xf9)

Definition at line 51 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_PROXIMITY_CURRENT

#define VCNL40X0_REG_PROXIMITY_CURRENT   (0x83)

Definition at line 43 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_PROXIMITY_RATE

#define VCNL40X0_REG_PROXIMITY_RATE   (0x82)

Definition at line 42 of file vcnl40x0_internals.h.

◆ VCNL40X0_REG_PROXIMITY_VALUE

#define VCNL40X0_REG_PROXIMITY_VALUE   (0x87)

Definition at line 46 of file vcnl40x0_internals.h.