Skip to content

Commit

Permalink
Fix use of ISSI driver config before init (qmk#16493)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Mar 3, 2022
1 parent 4a66bdf commit 7fb312c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tmk_core/protocol/arm_atsam/i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ uint8_t I2C3733_Init_Drivers(void) {
if (gcr_actual > LED_GCR_MAX) gcr_actual = LED_GCR_MAX;
gcr_desired = gcr_actual;

void issi3733_prepare_arrays(void);
issi3733_prepare_arrays();

// Set up master device
i2c_led_send_CRWL(0);
i2c_led_select_page(0, 3);
Expand Down
2 changes: 0 additions & 2 deletions tmk_core/protocol/arm_atsam/main_arm_atsam.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ int main(void) {
i2c1_init();
#endif // RGB_MATRIX_ENABLE

matrix_init();

USB_Hub_init();

DBGC(DC_MAIN_UDC_START_BEGIN);
Expand Down
6 changes: 6 additions & 0 deletions tmk_core/protocol/arm_atsam/md_rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ void gcr_compute(void) {
}

void issi3733_prepare_arrays(void) {
static bool s_init = false;
if (s_init) {
return;
}
s_init = true;

memset(issidrv, 0, sizeof(issi3733_driver_t) * ISSI3733_DRIVER_COUNT);

int i;
Expand Down

0 comments on commit 7fb312c

Please sign in to comment.