| 1 |
#pragma once |
| 2 |
#include "stdint.h" |
| 3 |
#include "libratbag.h" |
| 4 |
|
| 5 |
#define MARSGAMING_LED_BREATHING_OFF 0 |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
struct marsgaming_led_color { |
| 13 |
uint8_t red; |
| 14 |
uint8_t green; |
| 15 |
uint8_t blue; |
| 16 |
}; |
| 17 |
|
| 18 |
struct marsgaming_led { |
| 19 |
struct marsgaming_led_color color; |
| 20 |
uint8_t brightness; |
| 21 |
uint8_t breathing_speed; |
| 22 |
} __attribute__((packed)); |
| 23 |
|
| 24 |
_Static_assert(sizeof(struct marsgaming_led) == 5, "Marsgaming led is not 5 bytes"); |
| 25 |
|
| 26 |
struct ratbag_color |
| 27 |
marsgaming_led_color_to_ratbag(struct marsgaming_led_color color); |