Mir
edid.h
Go to the documentation of this file.
1 /*
2  * Copyright © Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MIROIL_EDID_H
18 #define MIROIL_EDID_H
19 
20 #include <cstdint>
21 #include <string>
22 #include <vector>
23 
24 namespace miroil
25 {
26 
27 struct Edid
28 {
29  std::string vendor;
30  uint16_t product_code{0};
31  uint32_t serial_number{0};
32 
33  struct PhysicalSizeMM { int width; int height; };
35 
36  struct Descriptor {
37  enum class Type : uint8_t {
38  timing_identifiers = 0xfa,
39  white_point_data = 0xfb,
40  monitor_name = 0xfc,
41  monitor_limits = 0xfd,
42  unspecified_text = 0xfe,
43  serial_number = 0xff,
44 
45  undefined = 0x00,
46  };
47 
48  union Value {
49  char monitor_name[13];
50  char unspecified_text[13];
51  char serial_number[13];
52  };
53 
55  Value value{{0}};
56 
57  std::string string_value() const;
58  };
60 
62 };
63 
64 }
65 
66 #endif // MIROIL_EDID_H

Copyright © 2012-2023 Canonical Ltd.
Generated on Wed Feb 1 16:59:23 UTC 2023
This documentation is licensed under the GPL version 2 or 3.