mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Move static color definitions for use by multiple drivers
This commit is contained in:
parent
af54fb8d9b
commit
5f2db68a9b
|
@ -105,16 +105,6 @@ static struct key_entry clevo_wmi_keymap[] = {
|
|||
|
||||
#define BRIGHTNESS_STEP 25
|
||||
|
||||
struct color_t {
|
||||
u32 code;
|
||||
char* name;
|
||||
};
|
||||
|
||||
struct color_list_t {
|
||||
uint size;
|
||||
struct color_t colors[];
|
||||
};
|
||||
|
||||
// Keyboard struct
|
||||
struct kbd_led_state_t {
|
||||
u8 has_extra;
|
||||
|
@ -196,20 +186,6 @@ static struct kbd_led_state_t kbd_led_state = {
|
|||
.whole_kbd_color = 7
|
||||
};
|
||||
|
||||
static struct color_list_t color_list = {
|
||||
.size = 8,
|
||||
.colors = {
|
||||
{ .name = "BLACK", .code = 0x000000 }, // 0
|
||||
{ .name = "RED", .code = 0xFF0000 }, // 1
|
||||
{ .name = "GREEN", .code = 0x00FF00 }, // 2
|
||||
{ .name = "BLUE", .code = 0x0000FF }, // 3
|
||||
{ .name = "YELLOW", .code = 0xFFFF00 }, // 4
|
||||
{ .name = "MAGENTA", .code = 0xFF00FF }, // 5
|
||||
{ .name = "CYAN", .code = 0x00FFFF }, // 6
|
||||
{ .name = "WHITE", .code = 0xFFFFFF }, // 7
|
||||
}
|
||||
};
|
||||
|
||||
static struct blinking_pattern_t blinking_patterns[] = {
|
||||
{ .key = 0,.value = 0,.name = "CUSTOM"},
|
||||
{ .key = 1,.value = 0x1002a000,.name = "BREATHE"},
|
||||
|
|
|
@ -68,4 +68,31 @@ bool sparse_keymap_report_known_event(struct input_dev *dev, unsigned int code,
|
|||
return false;
|
||||
}
|
||||
|
||||
struct color_t {
|
||||
u32 code;
|
||||
char* name;
|
||||
};
|
||||
|
||||
struct color_list_t {
|
||||
uint size;
|
||||
struct color_t colors[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Commonly used standard colors
|
||||
*/
|
||||
static struct color_list_t color_list = {
|
||||
.size = 8,
|
||||
.colors = {
|
||||
{ .name = "BLACK", .code = 0x000000 }, // 0
|
||||
{ .name = "RED", .code = 0xFF0000 }, // 1
|
||||
{ .name = "GREEN", .code = 0x00FF00 }, // 2
|
||||
{ .name = "BLUE", .code = 0x0000FF }, // 3
|
||||
{ .name = "YELLOW", .code = 0xFFFF00 }, // 4
|
||||
{ .name = "MAGENTA", .code = 0xFF00FF }, // 5
|
||||
{ .name = "CYAN", .code = 0x00FFFF }, // 6
|
||||
{ .name = "WHITE", .code = 0xFFFFFF }, // 7
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue