qmk/qmk_firmware

[Bug] Compile error with USE_I2C and RGB_MATRIX_SPLIT

Open

#13.218 aperta il 16 giu 2021

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)C (43.867 fork)batch import
bughelp wanted

Metriche repository

Star
 (20.368 star)
Metriche merge PR
 (Merge medio 20g 9h) (27 PR mergiate in 30 g)

Descrizione

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

Guida contributor