summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authoryiancar <yiangosyiangou@cytanet.com.cy>2018-08-15 08:19:38 +0300
committerJack Humbert <jack.humb@gmail.com>2018-08-15 01:19:38 -0400
commitad2bb529c795be066b279f52bebec03257992fc2 (patch)
treeaddf2d3b665316c985f0b0d1c524a60977d3ed72 /quantum
parentfeec8ad4694814ed8953c6f72798f51f39724af5 (diff)
Rgb matrix arm (#3648)
* Addition of I2C master driver for STM32, Generalization of ISSI3731 driver - Addition of an i2c_master driver for STM32 to replicate expectations of AVR driver. - Moved ISSI3731 driver one level up to make it accesible by both architectures. - Renamed ISSI3731 functions to a more general name for preparation of other ISSI drivers. - Added compiler directives where necessary to differenciate each architecture. * converted tabs to spaces
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index b4bbc3dc07..70ad1a1783 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -106,16 +106,16 @@ void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i, uint8_t
}
void rgb_matrix_update_pwm_buffers(void) {
- IS31FL3731_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
- IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
+ IS31_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
+ IS31_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
}
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) {
- IS31FL3731_set_color( index, red, green, blue );
+ IS31_set_color( index, red, green, blue );
}
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) {
- IS31FL3731_set_color_all( red, green, blue );
+ IS31_set_color_all( red, green, blue );
}
bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
@@ -752,16 +752,16 @@ void rgb_matrix_init(void) {
void rgb_matrix_setup_drivers(void) {
// Initialize TWI
i2c_init();
- IS31FL3731_init( DRIVER_ADDR_1 );
- IS31FL3731_init( DRIVER_ADDR_2 );
+ IS31_init( DRIVER_ADDR_1 );
+ IS31_init( DRIVER_ADDR_2 );
for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) {
bool enabled = true;
// This only caches it for later
- IS31FL3731_set_led_control_register( index, enabled, enabled, enabled );
+ IS31_set_led_control_register( index, enabled, enabled, enabled );
}
// This actually updates the LED drivers
- IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
+ IS31_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
}
// Deals with the messy details of incrementing an integer
@@ -811,11 +811,11 @@ void rgb_matrix_test_led( uint8_t index, bool red, bool green, bool blue ) {
{
if ( i == index )
{
- IS31FL3731_set_led_control_register( i, red, green, blue );
+ IS31_set_led_control_register( i, red, green, blue );
}
else
{
- IS31FL3731_set_led_control_register( i, false, false, false );
+ IS31_set_led_control_register( i, false, false, false );
}
}
}