1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_ROSEN_EDIDPARSE_H 17 #define OHOS_ROSEN_EDIDPARSE_H 18 #include <vector> 19 #include <string> 20 21 #define COLOR_CHARACTER_MAX 10 22 23 typedef struct baseEdid { 24 std::string modelName; 25 std::string manufacturerName; 26 std::string displayProductName; 27 std::string asciiText; 28 std::string displayProductSerialNumber; 29 uint8_t edid_minor; 30 uint8_t weekOfManufactureOrModelYearFlag; 31 uint16_t yearOfManufactureOrModelYear; 32 uint16_t productCode; 33 uint32_t serialNumber; 34 int32_t hScreenSize; // Horizontal Screen Size in cm. 35 int32_t vScreenSize; 36 uint8_t bitsPerPrimaryColor; 37 uint8_t videoInputType; 38 uint8_t gamma; 39 uint8_t feature; 40 uint8_t colorCharacteristics[COLOR_CHARACTER_MAX]; 41 uint8_t extensionFlag; 42 uint8_t checkSum; 43 } BaseEdid; 44 45 // Making API functions visible to callers 46 extern "C" { 47 /** 48 * @brief Obtain the edid parse result based on the input edid information. 49 * 50 * @param edid - (input) orginal edid value 51 * @param outEdid - (output) the dp infomation parsed through edid. 52 * 53 * @return Integer indicating whether the parse is successful, 0: Succeed, -1: Failed 54 */ 55 int ParseBaseEdid(const uint8_t* edidData, const uint32_t edidSize, BaseEdid* outEdid); 56 } 57 #endif // OHOS_ROSEN_EDIDPARSE_H