47 lines
813 B
C
47 lines
813 B
C
#ifndef LINUXSMARTIE_AIO_H
|
|
#define LINUXSMARTIE_AIO_H
|
|
|
|
#include <libusb-1.0/libusb.h>
|
|
|
|
#define AIO_USB_VID 0x1b1c
|
|
#define AIO_USB_PID 0x0c13
|
|
|
|
#define AIO_COLOR_CYAN { 0, 255, 255 }
|
|
#define AIO_COLOR_WHITE { 0, 255, 255 }
|
|
#define AIO_COLOR_OFF { 0, 0, 0 }
|
|
|
|
enum aio_pump_mode_t : uint8_t {
|
|
QUIET,
|
|
BALANCED,
|
|
EXTREME
|
|
};
|
|
|
|
enum aio_color_mode_t : uint8_t {
|
|
AIO_COLOR_PULSE,
|
|
AIO_COLOR_SHIFT,
|
|
AIO_COLOR_FIXED,
|
|
AIO_COLOR_BLINKING
|
|
};
|
|
|
|
struct rgb_t {
|
|
uint8_t r;
|
|
uint8_t g;
|
|
uint8_t b;
|
|
};
|
|
|
|
struct aio_t{
|
|
libusb_device_handle* handle;
|
|
enum aio_pump_mode_t pump_mode;
|
|
float water_temp;
|
|
float t_q;
|
|
float t_b;
|
|
uint16_t pump_speed;
|
|
uint16_t fan_speed[2];
|
|
};
|
|
|
|
void aio_detect(struct aio_t *aio, float t_quiet, float t_balanced);
|
|
void aio_update(struct aio_t *aio);
|
|
void aio_close(const struct aio_t *aio);
|
|
|
|
#endif
|