2021-07-09 01:27:26 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-07-18 21:31:40 +02:00
|
|
|
#include <inttypes.h>
|
|
|
|
|
2021-07-09 02:20:27 +02:00
|
|
|
#define VIALRGB_PROTOCOL_VERSION 1
|
|
|
|
|
2021-07-09 01:27:26 +02:00
|
|
|
/* Start at 0x40 in order to not conflict with existing "enum via_lighting_value",
|
|
|
|
even though they likely wouldn't be enabled together with vialrgb */
|
|
|
|
enum {
|
2021-07-09 02:20:27 +02:00
|
|
|
vialrgb_set_mode = 0x41,
|
2021-07-10 04:11:50 +02:00
|
|
|
vialrgb_direct_fastset = 0x42,
|
2021-07-09 01:27:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2021-07-09 02:20:27 +02:00
|
|
|
vialrgb_get_info = 0x40,
|
|
|
|
vialrgb_get_mode = 0x41,
|
2021-07-09 04:38:45 +02:00
|
|
|
vialrgb_get_supported = 0x42,
|
2021-07-10 04:11:50 +02:00
|
|
|
vialrgb_get_number_leds = 0x43,
|
|
|
|
vialrgb_get_led_info = 0x44,
|
2021-07-09 01:27:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void vialrgb_get_value(uint8_t *data, uint8_t length);
|
|
|
|
void vialrgb_set_value(uint8_t *data, uint8_t length);
|
|
|
|
void vialrgb_save(uint8_t *data, uint8_t length);
|
|
|
|
|
|
|
|
#if defined(VIALRGB_ENABLE) && !defined(RGB_MATRIX_ENABLE)
|
|
|
|
#error VIALRGB_ENABLE=yes requires RGB_MATRIX_ENABLE=yes
|
|
|
|
#endif
|