-
Notifications
You must be signed in to change notification settings - Fork 126
/
rmi.c
57 lines (50 loc) · 1.91 KB
/
rmi.c
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
/*
* This file is part of OpenCorsairLink.
* Copyright (C) 2017-2020 Sean Nelson <audiohacked@gmail.com>
* 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/>.
*/
#include "driver.h"
// #include "device.h"
#include "lowlevel/rmi.h"
#include "logic/print.h"
#include "protocol/rmi.h"
struct corsair_lowlevel_driver corsairlink_lowlevel_rmi = {
.init = corsairlink_rmi_init,
.deinit = corsairlink_rmi_deinit,
.read = corsairlink_rmi_read,
.write = corsairlink_rmi_write,
};
struct corsair_device_driver corsairlink_driver_rmi = {
.name = corsairlink_rmi_name,
.vendor = corsairlink_rmi_vendor,
.product = corsairlink_rmi_product,
.device_id = corsairlink_rmi_device_id,
.fw_version = corsairlink_rmi_firmware_id,
.temperature =
{
.read = corsairlink_rmi_temperature,
},
.power =
{
.supply_voltage = corsairlink_rmi_power_supply_voltage,
.total_wattage = corsairlink_rmi_power_total_wattage,
.sensor_select = corsairlink_rmi_sensor_select,
.voltage = corsairlink_rmi_output_volts,
.amperage = corsairlink_rmi_output_amps,
.wattage = corsairlink_rmi_output_watts,
},
.psu_time =
{
.powered = corsairlink_rmi_time_powered,
.uptime = corsairlink_rmi_time_uptime,
},
};