-
-
Notifications
You must be signed in to change notification settings - Fork 222
/
Copy pathSPDDetector.h
32 lines (26 loc) · 956 Bytes
/
SPDDetector.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
/*---------------------------------------------------------*\
| SPDDetector.h |
| |
| Detector for DRAM modules using SPD information |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include "SPDAccessor.h"
#include "SPDCommon.h"
class SPDDetector
{
public:
SPDDetector(i2c_smbus_interface *bus, uint8_t address, SPDMemoryType mem_type);
bool is_valid() const;
SPDMemoryType memory_type() const;
uint8_t spd_address() const;
i2c_smbus_interface *smbus() const;
private:
i2c_smbus_interface *bus;
uint8_t address;
SPDMemoryType mem_type;
bool valid;
void detect_memory_type();
};