PhycialDisplay: detect phycial size

This commit is contained in:
李通洲
2023-08-09 10:52:12 +08:00
parent abae204ab8
commit 008c9a597e
7 changed files with 29 additions and 7 deletions
+6
View File
@@ -26,3 +26,9 @@ void ffEdidGetName(const uint8_t edid[128], FFstrbuf* name)
}
}
}
void ffEdidGetPhycialSize(const uint8_t edid[128], uint32_t* width, uint32_t* height)
{
*width = (((uint32_t) edid[68] & 0xF0) << 4) + edid[66];
*height = (((uint32_t) edid[68] & 0x0F) << 8) + edid[67];
}
+1
View File
@@ -8,5 +8,6 @@
void ffEdidGetName(const uint8_t edid[128], FFstrbuf* name);
void ffEdidGetPhycialResolution(const uint8_t edid[128], uint32_t* width, uint32_t* height);
void ffEdidGetPhycialSize(const uint8_t edid[128], uint32_t* width, uint32_t* height); // in mm
#endif