tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/bh1750/registers.go (about)

     1  package bh1750
     2  
     3  // Constants/addresses used for I2C.
     4  
     5  // The I2C address which this device listens to.
     6  const Address = 0x23
     7  
     8  // Registers. Names, addresses and comments copied from the datasheet.
     9  const (
    10  	POWER_DOWN                              = 0x00
    11  	POWER_ON                                = 0x01
    12  	RESET                                   = 0x07
    13  	CONTINUOUS_HIGH_RES_MODE   SamplingMode = 0x10
    14  	CONTINUOUS_HIGH_RES_MODE_2 SamplingMode = 0x11
    15  	CONTINUOUS_LOW_RES_MODE    SamplingMode = 0x13
    16  	ONE_TIME_HIGH_RES_MODE     SamplingMode = 0x20
    17  	ONE_TIME_HIGH_RES_MODE_2   SamplingMode = 0x21
    18  	ONE_TIME_LOW_RES_MODE      SamplingMode = 0x23
    19  
    20  	// resolution in 10*lx
    21  	HIGH_RES  = 10
    22  	HIGH_RES2 = 5
    23  	LOW_RES   = 40
    24  )