qmk/qmk_firmware

[Bug] Compile error with USE_I2C and RGB_MATRIX_SPLIT

Open

#13,218 opened on Jun 16, 2021

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (Avg merge 20d 9h) (27 merged PRs in 30d)

Description

Describe the Bug

  1. config RGB_MATRIX_ENABLE = yes and RGB_MATRIX_DRIVER = WS2812
  2. define USE_I2C and RGB_MATRIX_SPLIT
  3. Compile error occurs.

System Information

Additional Context

Compiling: quantum/process_keycode/process_magic.c                                                  [OK]
Compiling: quantum/process_keycode/process_grave_esc.c                                              [OK]
Compiling: quantum/split_common/transport.c                                                        quantum/split_common/transport.c: In function 'transport_master':
quantum/split_common/transport.c:169:5: error: cannot convert to a pointer type
     i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
     ^~~~~~~~~~~~
quantum/split_common/transport.c: In function 'transport_slave':
quantum/split_common/transport.c:225:5: error: cannot convert to a pointer type
     memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
     ^~~~~~
quantum/split_common/transport.c:225:5: error: cannot convert to a pointer type
quantum/split_common/transport.c:225:5: error: null argument where non-null required (argument 1) [-Werror=nonnull]
quantum/split_common/transport.c:225:5: error: null argument where non-null required (argument 2) [-Werror=nonnull]
cc1.exe: all warnings being treated as errors
 [ERRORS]
 |
 |
 |
make[1]: *** [tmk_core/rules.mk:436: .build/obj_yk_4_default/quantum/split_common/transport.o] エラー 1
Make finished with errors
make: *** [Makefile:530: yk_4:default] エラー 1

Contributor guide