forked from audiohacked/OpenCorsairLink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.h
81 lines (67 loc) · 1.66 KB
/
options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* This file is part of OpenCorsairLink.
* Copyright (C) 2017 Sean Nelson <[email protected]>
* OpenCorsairLink is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* any later version.
* OpenCorsairLink is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OpenCorsairLink. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _OPTIONS_H
#define _OPTIONS_H
#include <stdint.h>
#include "common.h"
struct color {
uint8_t red;
uint8_t green;
uint8_t blue;
};
struct fan_table {
/** temperatures */
int8_t t1;
int8_t t2;
int8_t t3;
int8_t t4;
int8_t t5;
int8_t t6;
/** fan speeds */
int8_t s1;
int8_t s2;
int8_t s3;
int8_t s4;
int8_t s5;
int8_t s6;
};
enum pump_modes {
PWM = 0,
RPM = 1,
DEFAULT = 2,
QUIET = 3,
BALANCED = 4,
PERFORMANCE = 5,
CUSTOM = 6,
};
struct option_flags {
// flags
//unsigned int debug_messages:1;
unsigned int device_firmware:1;
unsigned int read_temperature:1;
unsigned int read_fan_speed:1;
};
struct option_parse_return {
struct color led_color;
struct color warning_led;
int8_t warning_led_temp;
struct fan_table fan1;
struct fan_table pump;
uint8_t pump_mode;
};
int options_parse(int argc, char **argv,
struct option_flags *flags, int8_t *device_number,
struct option_parse_return *settings);
#endif