Link Adafrut I2C address list. Feature the EEPROM separately as it's not on the main bus, so its address won't clash with other addresses.

This commit is contained in:
László Monda
2017-09-19 16:00:11 +02:00
parent e3d407e14d
commit 57e6a6c067

View File

@@ -8,6 +8,7 @@
// Macros:
// 7-bit I2C addresses - see http://www.i2c-bus.org/addressing/
// Also see https://learn.adafruit.com/i2c-addresses/the-list
// General call / Start byte 0b0000000
// CBUS address 0b0000001
@@ -15,7 +16,6 @@
// Reserved for future purposes 0b0000011
// High-Speed master code 0b00001XX
#define I2C_ADDRESS_LEFT_KEYBOARD_HALF 0b0001000
#define I2C_ADDRESS_EEPROM 0b1010000
#define I2C_ADDRESS_LED_DRIVER_LEFT 0b1110100
// LED driver / touchpad 0b1110101
// LED driver / touchpad 0b1110110
@@ -24,6 +24,9 @@
// 10-bit slave addressing 0b11110XX
// Reserved for future purposes 0b11111XX
// The EEPROM is featured separately as it's not connected to the main I2C bus.
#define I2C_ADDRESS_EEPROM 0b1010000
#define IS_I2C_LED_DRIVER_ADDRESS(address) \
(I2C_ADDRESS_LED_DRIVER_LEFT <= (address) && (address) <= I2C_ADDRESS_LED_DRIVER_RIGHT)