Generalize LED driver functions by adding I2C address parameters.
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
#ifndef __I2C_H__
|
||||
#define __I2C_H__
|
||||
|
||||
#define LEFT_KEYBOARD_HALF_I2C_ADDRESS_7BIT 8
|
||||
// 7-bit I2C addresses
|
||||
|
||||
// The 7-bit I2C addresses of the IS31FL3731 LED driver range from 0x74 to 0x77
|
||||
#define LEFT_LED_DRIVER_ADDRESS_7BIT 0b1110100
|
||||
#define RIGHT_LED_DRIVER_ADDRESS_7BIT 0b1110111
|
||||
#define I2C_ADDRESS_LEFT_KEYBOARD_HALF 8
|
||||
|
||||
// IS31FL3731 LED drivers range from 0x74 to 0x77
|
||||
#define I2C_ADDRESS_LED_DRIVER_LEFT 0b1110100
|
||||
#define I2C_ADDRESS_LED_DRIVER_RIGHT 0b1110111
|
||||
|
||||
#define IS_I2C_LED_DRIVER_ADDRESS (address) \
|
||||
(I2C_ADDRESS_LED_DRIVER_LEFT <= address && address <= I2C_ADDRESS_LED_DRIVER_RIGHT)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user