tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/is31fl3731/registers.go (about) 1 package is31fl3731 2 3 // Registers. Names taken from the datasheet: 4 // https://www.lumissil.com/assets/pdf/core/IS31FL3731_DS.pdf 5 const ( 6 // AD pin connected to GND 7 I2C_ADDRESS_74 uint8 = 0x74 8 // AD pin connected to SCL 9 I2C_ADDRESS_75 uint8 = 0x75 10 // AD pin connected to SDA 11 I2C_ADDRESS_76 uint8 = 0x76 12 // AD pin connected to VCC 13 I2C_ADDRESS_77 uint8 = 0x77 14 15 // Main command register 16 COMMAND uint8 = 0xFD 17 18 // Commands for each of 8 frames 19 FRAME_0 uint8 = 0x00 20 FRAME_1 uint8 = 0x01 21 FRAME_2 uint8 = 0x02 22 FRAME_3 uint8 = 0x03 23 FRAME_4 uint8 = 0x04 24 FRAME_5 uint8 = 0x05 25 FRAME_6 uint8 = 0x06 26 FRAME_7 uint8 = 0x07 27 28 // Command to set configuration 29 FUNCTION uint8 = 0x0B 30 31 // Configuration: 32 SET_DISPLAY_MODE uint8 = 0x00 33 SET_ACTIVE_FRAME uint8 = 0x01 34 SET_AUDIOSYNC uint8 = 0x06 35 SET_SHUTDOWN uint8 = 0x0A 36 37 // Configuration: display mode 38 DISPLAY_MODE_PICTURE uint8 = 0x00 39 40 // Configuration: audiosync (enable audio signal to modulate the intensity of 41 // the matrix) 42 AUDIOSYNC_OFF uint8 = 0x00 43 AUDIOSYNC_ON uint8 = 0x01 44 45 // Configuration: software shutdown 46 SOFTWARE_OFF uint8 = 0x00 47 SOFTWARE_ON uint8 = 0x01 48 49 // Frame LEDs 50 LED_CONTROL_OFFSET uint8 = 0x00 // to on/off each LED 51 LED_PWM_OFFSET uint8 = 0x24 // to set PWM (0-255) for each LED 52 )