Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGB Matrix refactoring to open up for new drivers #3913

Merged
merged 7 commits into from
Sep 27, 2018
Prev Previous commit
Next Next commit
rgb_matrix: document driver struct members
  • Loading branch information
abrasive committed Sep 27, 2018
commit 2497ece68cbedc15c50bdd7362d73cff569baed4
9 changes: 8 additions & 1 deletion quantum/rgb_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,17 @@ void rgblight_mode(uint8_t mode);
uint32_t rgblight_get_mode(void);

typedef struct {
/* Perform any initialisation required for the other driver functions to work. */
void (*init)(void);
void (*flush)(void);

/* Set the colour of a single LED in the buffer. */
void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b);
/* Set the colour of all LEDS on the keyboard in the buffer. */
void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b);
/* Flush any buffered changes to the hardware. */
void (*flush)(void);

/* Turn on a single LED at full brightness. */
void (*test_led)(int index, bool r, bool g, bool b);
} rgb_matrix_driver_t;

Expand Down