Mir
edid.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016-2020 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 <string>
21 #include <vector>
22 
23 namespace miroil
24 {
25 
26 struct Edid
27 {
28  std::string vendor;
29  uint16_t product_code{0};
30  uint32_t serial_number{0};
31 
32  struct PhysicalSizeMM { int width; int height; };
34 
35  struct Descriptor {
36  enum class Type : uint8_t {
37  timing_identifiers = 0xfa,
38  white_point_data = 0xfb,
39  monitor_name = 0xfc,
40  monitor_limits = 0xfd,
41  unspecified_text = 0xfe,
42  serial_number = 0xff,
43 
44  undefined = 0x00,
45  };
46 
47  union Value {
48  char monitor_name[13];
49  char unspecified_text[13];
50  char serial_number[13];
51  };
52 
54  Value value{{0}};
55 
56  std::string string_value() const;
57  };
59 
61 };
62 
63 }
64 
65 #endif // MIROIL_EDID_H

Copyright © 2012-2022 Canonical Ltd.
Generated on Tue Sep 13 03:20:30 UTC 2022
This documentation is licensed under the GPL version 2 or 3.