-__attribute__((weak))
-void rgb_matrix_indicators_kb(void) {}
-
-__attribute__((weak))
-void rgb_matrix_indicators_user(void) {}
-
-
-// void rgb_matrix_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column )
-// {
-// if ( row >= MATRIX_ROWS )
-// {
-// // Special value, 255=none, 254=all
-// *index = row;
-// }
-// else
-// {
-// // This needs updated to something like
-// // uint8_t led[8], led_count;
-// // map_row_column_to_led(row,column,led,&led_count);
-// // for(uint8_t i = 0; i < led_count; i++)
-// map_row_column_to_led( row, column, index );
-// }
-// }
-
-void rgb_matrix_init_drivers(void) {
- //sei();
-
- // Initialize TWI
- TWIInit();
- IS31FL3731_init( DRIVER_ADDR_1 );
- IS31FL3731_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 );
- }
- // This actually updates the LED drivers
- IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
-
- // TODO: put the 1 second startup delay here?
-
- // clear the key hits
- for ( int led=0; led<DRIVER_LED_TOTAL; led++ ) {
- g_key_hit[led] = 255;
- }
-
-
- if (!eeconfig_is_enabled()) {
- dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
- eeconfig_init();
- eeconfig_update_rgb_matrix_default();
- }
- rgb_matrix_config.raw = eeconfig_read_rgb_matrix();
- if (!rgb_matrix_config.mode) {
- dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");
- eeconfig_update_rgb_matrix_default();
- rgb_matrix_config.raw = eeconfig_read_rgb_matrix();
- }
- eeconfig_debug_rgb_matrix(); // display current eeprom values
-}
-
-// Deals with the messy details of incrementing an integer
-uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
- int16_t new_value = value;
- new_value += step;
- return MIN( MAX( new_value, min ), max );
-}
-
-uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
- int16_t new_value = value;
- new_value -= step;
- return MIN( MAX( new_value, min ), max );
-}
-
-// void *backlight_get_custom_key_color_eeprom_address( uint8_t led )
-// {
-// // 3 bytes per color
-// return EECONFIG_RGB_MATRIX + ( led * 3 );
-// }
-
-// void backlight_get_key_color( uint8_t led, HSV *hsv )
-// {
-// void *address = backlight_get_custom_key_color_eeprom_address( led );
-// hsv->h = eeprom_read_byte(address);
-// hsv->s = eeprom_read_byte(address+1);
-// hsv->v = eeprom_read_byte(address+2);
-// }
-
-// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv )
-// {
-// uint8_t led[8], led_count;
-// map_row_column_to_led(row,column,led,&led_count);
-// for(uint8_t i = 0; i < led_count; i++) {
-// if ( led[i] < DRIVER_LED_TOTAL )
-// {
-// void *address = backlight_get_custom_key_color_eeprom_address(led[i]);
-// eeprom_update_byte(address, hsv.h);
-// eeprom_update_byte(address+1, hsv.s);
-// eeprom_update_byte(address+2, hsv.v);
-// }
-// }
-// }
-
-void rgb_matrix_test_led( uint8_t index, bool red, bool green, bool blue ) {
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- if ( i == index )
- {
- IS31FL3731_set_led_control_register( i, red, green, blue );
- }
- else
- {
- IS31FL3731_set_led_control_register( i, false, false, false );
- }
- }