1 /* 2 * Copyright (c) 2023 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 ILIGHT_TYPE_VDI_H 17 #define ILIGHT_TYPE_VDI_H 18 19 #include <stdint.h> 20 21 #ifdef __cplusplus 22 #if __cplusplus 23 extern "C" { 24 #endif 25 #endif /* __cplusplus */ 26 27 #define LIGHT_NAME_MAX_LEN 16 28 29 enum HdfLightIdVdi { 30 VDI_LIGHT_ID_BATTERY = 1, 31 VDI_LIGHT_ID_NOTIFICATIONS = 2, 32 VDI_LIGHT_ID_ATTENTION = 3, 33 VDI_LIGHT_ID_BUTT = 4, 34 }; 35 36 enum HdfLightTypeVdi { 37 VDI_LIGHT_TYPE_SINGLE_COLOR = 1, 38 VDI_LIGHT_TYPE_RGB_COLOR = 2, 39 VDI_LIGHT_TYPE_WRGB_COLOR = 3, 40 }; 41 42 struct HdfLightInfoVdi { 43 char lightName[LIGHT_NAME_MAX_LEN]; 44 int32_t lightId; 45 int32_t lightNumber; 46 int32_t lightType; 47 }; 48 49 enum HdfLightFlashModeVdi { 50 VDI_LIGHT_FLASH_NONE = 0, 51 VDI_LIGHT_FLASH_BLINK = 1, 52 VDI_LIGHT_FLASH_GRADIENT = 2, 53 VDI_LIGHT_FLASH_BUTT = 3, 54 }; 55 56 struct HdfLightFlashEffectVdi { 57 int32_t flashMode; 58 int32_t onTime; 59 int32_t offTime; 60 }; 61 62 struct RGBColorVdi { 63 uint8_t r; 64 uint8_t g; 65 uint8_t b; 66 uint8_t reserved; 67 }; 68 69 struct WRGBColorVdi { 70 uint8_t w; 71 uint8_t r; 72 uint8_t g; 73 uint8_t b; 74 }; 75 76 union ColorValueVdi { 77 int32_t singleColor; 78 struct WRGBColorVdi wrgbColor; 79 struct RGBColorVdi rgbColor; 80 }; 81 82 struct HdfLightColorVdi { 83 union ColorValueVdi colorValue; 84 }; 85 86 struct HdfLightEffectVdi { 87 struct HdfLightColorVdi lightColor; 88 struct HdfLightFlashEffectVdi flashEffect; 89 }; 90 91 #ifdef __cplusplus 92 #if __cplusplus 93 } 94 #endif 95 #endif /* __cplusplus */ 96 97 #endif /* ILIGHT_TYPE_VDI_H */ 98 /** @} */ 99