/drivers/peripheral/light/test/unittest/hdi/ |
H A D | hdf_light_hdi_test.cpp | 63 static void InitConfig(HdfLightEffect &effect) in InitConfig() argument 65 effect.lightColor.colorValue.rgbColor.r = MIN_VALUE; in InitConfig() 66 effect.lightColor.colorValue.rgbColor.g = MIN_VALUE; in InitConfig() 67 effect.lightColor.colorValue.rgbColor.b = MIN_VALUE; in InitConfig() 68 effect.flashEffect.flashMode = HDF_LIGHT_FLASH_NONE; in InitConfig() 81 HdfLightEffect effect; in HWTEST_F() local 82 InitConfig(effect); in HWTEST_F() 83 effect.lightColor.colorValue.rgbColor.r = MAX_VALUE; in HWTEST_F() 85 int32_t ret = g_lightInterface->TurnOnLight(LIGHT_ID_BATTERY, effect); in HWTEST_F() 104 HdfLightEffect effect; in HWTEST_F() local 127 HdfLightEffect effect; HWTEST_F() local 150 HdfLightEffect effect; HWTEST_F() local 176 HdfLightEffect effect; HWTEST_F() local 202 HdfLightEffect effect; HWTEST_F() local 227 HdfLightEffect effect; HWTEST_F() local 253 HdfLightEffect effect; HWTEST_F() local 273 HdfLightEffect effect; HWTEST_F() local 293 HdfLightEffect effect; HWTEST_F() local 319 HdfLightEffect effect; HWTEST_F() local 345 HdfLightEffect effect; HWTEST_F() local 371 HdfLightEffect effect; HWTEST_F() local [all...] |
H A D | hdf_light_hdi_common_test.cpp | 61 static void InitConfig(HdfLightEffect &effect) in InitConfig() argument 63 effect.lightColor.colorValue.rgbColor.r = MIN_VALUE; in InitConfig() 64 effect.lightColor.colorValue.rgbColor.g = MIN_VALUE; in InitConfig() 65 effect.lightColor.colorValue.rgbColor.b = MIN_VALUE; in InitConfig() 66 effect.flashEffect.flashMode = HDF_LIGHT_FLASH_NONE; in InitConfig() 111 HdfLightEffect effect; in HWTEST_F() local 112 InitConfig(effect); in HWTEST_F() 113 effect.lightColor.colorValue.rgbColor.r = MAX_VALUE; in HWTEST_F() 115 int32_t ret = g_lightInterface->TurnOnLight(g_info[0].lightId, effect); in HWTEST_F() 134 HdfLightEffect effect; in HWTEST_F() local 156 HdfLightEffect effect; HWTEST_F() local 179 HdfLightEffect effect; HWTEST_F() local 203 HdfLightEffect effect; HWTEST_F() local 227 HdfLightEffect effect; HWTEST_F() local 247 HdfLightEffect effect; HWTEST_F() local [all...] |
H A D | hdi_unittest_light.cpp | 79 static void LightTest(int32_t lightId, int32_t lightFlashMode, HdfLightEffect &effect) in LightTest() argument 83 effect.flashEffect.onTime = ON_TIME; in LightTest() 84 effect.flashEffect.offTime = OFF_TIME; in LightTest() 86 effect.flashEffect.flashMode = lightFlashMode; in LightTest() 89 int32_t ret = g_lightInterface->TurnOnLight(lightId, effect); in LightTest() 143 HdfLightEffect effect = { in HWTEST_F() local 149 LightTest(HDF_LIGHT_ID_BATTERY, HDF_LIGHT_FLASH_NONE, effect); in HWTEST_F() 163 HdfLightEffect effect = { in HWTEST_F() local 169 LightTest(HDF_LIGHT_ID_BATTERY, HDF_LIGHT_FLASH_NONE, effect); in HWTEST_F() 183 HdfLightEffect effect in HWTEST_F() local 203 HdfLightEffect effect = { HWTEST_F() local 223 HdfLightEffect effect = { HWTEST_F() local 243 HdfLightEffect effect = { HWTEST_F() local 263 HdfLightEffect effect = { HWTEST_F() local 283 HdfLightEffect effect = { HWTEST_F() local 303 HdfLightEffect effect = { HWTEST_F() local 323 HdfLightEffect effect = { HWTEST_F() local 343 HdfLightEffect effect = { HWTEST_F() local 363 HdfLightEffect effect = { HWTEST_F() local 383 HdfLightEffect effect = { HWTEST_F() local 403 HdfLightEffect effect = { HWTEST_F() local 423 HdfLightEffect effect = { HWTEST_F() local 443 HdfLightEffect effect = { HWTEST_F() local 463 HdfLightEffect effect = { HWTEST_F() local 483 HdfLightEffect effect = { HWTEST_F() local 503 HdfLightEffect effect = { HWTEST_F() local 523 HdfLightEffect effect = { HWTEST_F() local 543 HdfLightEffect effect = { HWTEST_F() local 563 HdfLightEffect effect = { HWTEST_F() local 583 HdfLightEffect effect = { HWTEST_F() local 603 HdfLightEffect effect = { HWTEST_F() local 623 HdfLightEffect effect = { HWTEST_F() local 714 HdfLightEffect effect = { HWTEST_F() local 747 HdfLightEffect effect = { HWTEST_F() local 780 HdfLightEffect effect = { HWTEST_F() local 813 HdfLightEffect effect = { HWTEST_F() local [all...] |
/drivers/peripheral/light/test/unittest/common/ |
H A D | hdf_light_test.cpp | 138 struct LightEffect effect; in HWTEST_F() local 139 effect.flashEffect.flashMode = LIGHT_FLASH_NONE; in HWTEST_F() 140 effect.flashEffect.onTime = 0; in HWTEST_F() 141 effect.flashEffect.offTime = 0; in HWTEST_F() 144 effect.lightColor.colorValue.rgbColor.r = 255; in HWTEST_F() 145 effect.lightColor.colorValue.rgbColor.g = 0; in HWTEST_F() 146 effect.lightColor.colorValue.rgbColor.b = 0; in HWTEST_F() 147 int32_t ret = g_lightDev->TurnOnLight(g_lightInfo[i].lightId, &effect); in HWTEST_F() 155 effect.lightColor.colorValue.rgbColor.r = 0; in HWTEST_F() 156 effect in HWTEST_F() 177 struct LightEffect effect; HWTEST_F() local 229 struct LightEffect effect; HWTEST_F() local [all...] |
/drivers/peripheral/light/test/performance/common/ |
H A D | hdf_light_performance_test.cpp | 68 static void InitConfig(LightEffect &effect) in InitConfig() argument 70 effect.lightColor.colorValue.rgbColor.r = MIN_VALUE; in InitConfig() 71 effect.lightColor.colorValue.rgbColor.g = MIN_VALUE; in InitConfig() 72 effect.lightColor.colorValue.rgbColor.b = MIN_VALUE; in InitConfig() 73 effect.flashEffect.flashMode = LIGHT_FLASH_NONE; in InitConfig() 86 LightEffect effect; in HWTEST_F() local 87 InitConfig(effect); in HWTEST_F() 88 effect.lightColor.colorValue.rgbColor.r = MAX_VALUE; in HWTEST_F() 90 int32_t ret = g_lightPerformanceDev->TurnOnLight(LIGHT_ID_BATTERY, &effect); in HWTEST_F()
|
/drivers/peripheral/light/test/benchmarktest/ |
H A D | hdf_light_benchmark_test.cpp | 105 HdfLightEffect effect;
in BENCHMARK_F() local 106 effect.lightColor.colorValue.rgbColor.r = COLORVALUE_RED;
in BENCHMARK_F() 107 effect.lightColor.colorValue.rgbColor.g = COLORVALUE_GREEN;
in BENCHMARK_F() 108 effect.lightColor.colorValue.rgbColor.b = COLORVALUE_BLUE;
in BENCHMARK_F() 109 effect.flashEffect.flashMode = LIGHT_FLASH_NONE;
in BENCHMARK_F() 112 ret = g_lightInterface->TurnOnLight(iter.lightId, effect);
in BENCHMARK_F() 143 HdfLightEffect effect;
in BENCHMARK_F() local 144 effect.lightColor.colorValue.rgbColor.r = COLORVALUE_RED;
in BENCHMARK_F() 145 effect.lightColor.colorValue.rgbColor.g = COLORVALUE_GREEN;
in BENCHMARK_F() 146 effect in BENCHMARK_F() [all...] |
/drivers/peripheral/light/test/performance/hdi/ |
H A D | hdf_light_hdi_performance_test.cpp | 110 HdfLightEffect effect; in HWTEST_F() local 111 effect.flashEffect.flashMode = HDF_LIGHT_FLASH_NONE; in HWTEST_F() 113 ret = g_lightInterface->TurnOnLight(iter.lightId, effect); in HWTEST_F() 152 HdfLightEffect effect; in HWTEST_F() local 153 effect.lightColor.colorValue.rgbColor.r = 0xFF; in HWTEST_F() 154 effect.flashEffect.flashMode = HDF_LIGHT_FLASH_BLINK; in HWTEST_F() 155 effect.flashEffect.onTime = ON_TIME; in HWTEST_F() 156 effect.flashEffect.offTime = OFF_TIME; in HWTEST_F() 158 ret = g_lightInterface->TurnOnLight(iter.lightId, effect); in HWTEST_F()
|
/drivers/peripheral/light/hdi_impl/ |
H A D | light_interface_impl.cpp | 75 int32_t LightInterfaceImpl::TurnOnLight(int32_t lightId, const HdfLightEffectVdi& effect) in TurnOnLight() argument 85 lightEffect.lightColor.colorValue.rgbColor.b = effect.lightColor.colorValue.rgbColor.b; in TurnOnLight() 86 lightEffect.lightColor.colorValue.rgbColor.g = effect.lightColor.colorValue.rgbColor.g; in TurnOnLight() 87 lightEffect.lightColor.colorValue.rgbColor.r = effect.lightColor.colorValue.rgbColor.r; in TurnOnLight() 88 lightEffect.lightColor.colorValue.wrgbColor.b = effect.lightColor.colorValue.wrgbColor.b; in TurnOnLight() 89 lightEffect.lightColor.colorValue.wrgbColor.g = effect.lightColor.colorValue.wrgbColor.g; in TurnOnLight() 90 lightEffect.lightColor.colorValue.wrgbColor.r = effect.lightColor.colorValue.wrgbColor.r; in TurnOnLight() 91 lightEffect.lightColor.colorValue.wrgbColor.w = effect.lightColor.colorValue.wrgbColor.w; in TurnOnLight() 92 lightEffect.flashEffect.flashMode = effect.flashEffect.flashMode; in TurnOnLight() 93 lightEffect.flashEffect.onTime = effect in TurnOnLight() [all...] |
H A D | light_interface_impl.h | 32 int32_t TurnOnLight(int32_t lightId, const HdfLightEffectVdi& effect) override;
|
/drivers/peripheral/light/hdi_service/ |
H A D | light_if_service.cpp | 115 int32_t LightIfService::TurnOnLight(int32_t lightId, const HdfLightEffect& effect)
in TurnOnLight() argument 124 lightEffectVdi.lightColor.colorValue.rgbColor.b = effect.lightColor.colorValue.rgbColor.b;
in TurnOnLight() 125 lightEffectVdi.lightColor.colorValue.rgbColor.g = effect.lightColor.colorValue.rgbColor.g;
in TurnOnLight() 126 lightEffectVdi.lightColor.colorValue.rgbColor.r = effect.lightColor.colorValue.rgbColor.r;
in TurnOnLight() 127 lightEffectVdi.lightColor.colorValue.wrgbColor.b = effect.lightColor.colorValue.wrgbColor.b;
in TurnOnLight() 128 lightEffectVdi.lightColor.colorValue.wrgbColor.g = effect.lightColor.colorValue.wrgbColor.g;
in TurnOnLight() 129 lightEffectVdi.lightColor.colorValue.wrgbColor.r = effect.lightColor.colorValue.wrgbColor.r;
in TurnOnLight() 130 lightEffectVdi.lightColor.colorValue.wrgbColor.w = effect.lightColor.colorValue.wrgbColor.w;
in TurnOnLight() 131 lightEffectVdi.flashEffect.flashMode = effect.flashEffect.flashMode;
in TurnOnLight() 132 lightEffectVdi.flashEffect.onTime = effect in TurnOnLight() [all...] |
H A D | light_if_service.h | 33 int32_t TurnOnLight(int32_t lightId, const HdfLightEffect& effect) override;
|
/drivers/peripheral/light/hal/src/ |
H A D | light_controller.c | 176 static int32_t OnLightValidityJudgment(uint32_t lightId, struct LightEffect *effect) in OnLightValidityJudgment() argument 183 if (effect->flashEffect.flashMode < LIGHT_FLASH_NONE || effect->flashEffect.flashMode > LIGHT_FLASH_BLINK) { in OnLightValidityJudgment() 188 if ((effect->flashEffect.flashMode == LIGHT_FLASH_BLINK) && (effect->flashEffect.onTime == 0 || in OnLightValidityJudgment() 189 effect->flashEffect.offTime == 0)) { in OnLightValidityJudgment() 197 static int32_t OnLight(uint32_t lightId, struct LightEffect *effect) in OnLight() argument 201 if (effect == NULL) { in OnLight() 202 HDF_LOGE("%{public}s: effect is NULL", __func__); in OnLight() 206 ret = OnLightValidityJudgment(lightId, effect); in OnLight() [all...] |
/drivers/hdf_core/framework/model/misc/vibrator/driver/include/ |
H A D | vibrator_haptic.h | 22 VIBRATOR_TYPE_EFFECT = 0, // Preset effect in device 23 VIBRATOR_TYPE_TIME = 1, // Preset effect by time 33 const char *effect; member 43 const char *effect; member
|
/drivers/peripheral/vibrator/test/unittest/hdi/ |
H A D | hdi_unittest_vibrator.cpp | 107 * @tc.desc: Start periodic vibration with preset effect. 142 * @tc.desc: Start periodic vibration with custom composite effect. 169 HdfCompositeEffect effect; in HWTEST_F() local 170 effect.type = HDF_EFFECT_TYPE_PRIMITIVE; in HWTEST_F() 171 effect.compositeEffects = vec; in HWTEST_F() 172 int32_t ret = g_vibratorInterface->EnableCompositeEffect(effect); in HWTEST_F() 181 * @tc.desc: Start periodic vibration with custom composite effect. 208 HdfCompositeEffect effect; in HWTEST_F() local 209 effect.type = HDF_EFFECT_TYPE_PRIMITIVE; in HWTEST_F() 210 effect in HWTEST_F() 308 HdfCompositeEffect effect; HWTEST_F() local [all...] |
/drivers/hdf_core/framework/model/misc/vibrator/driver/src/ |
H A D | vibrator_driver.c | 92 HDF_LOGE("%s: start effect failed!", __func__); in SetEffectVibrator() 151 config.effect = NULL; in StartOnce() 165 const char *effect = NULL; in StartEffect() local 173 effect = HdfSbufReadString(data); in StartEffect() 174 CHECK_VIBRATOR_NULL_PTR_RETURN_VALUE(effect, HDF_FAILURE); in StartEffect() 188 config.effect = effect; in StartEffect() 301 config.effect = NULL; in EnableModulationParameter()
|
H A D | vibrator_haptic.c | 83 HDF_LOGE("%s: malloc effect effectNode fail", __func__); in ParserHapticEffect() 87 ret = parser->GetString(childNode, "effectName", &effectNode->effect, NULL); in ParserHapticEffect() 144 HDF_LOGD("%s: vibrator not support effect", __func__); in ParserVibratorHapticConfig() 152 HDF_LOGE("%s: vibrator get effect fail", __func__); in ParserVibratorHapticConfig() 187 uint32_t effect; in ProcessHapticEffect() local 198 effect = hapticData->currentEffectSeq[hapticData->currentSeqIndex]; in ProcessHapticEffect() 199 SetEffectVibrator(effect); in ProcessHapticEffect() 268 if ((effectCfg->cfgMode == VIBRATOR_MODE_PRESET) && (effectCfg->effect != NULL)) { in GetHapticSeqByEffect() 270 if (strcmp(effectCfg->effect, pos->effect) in GetHapticSeqByEffect() [all...] |
/drivers/peripheral/vibrator/test/benchmarktest/ |
H A D | hdf_vibrator_benchmark_test.cpp | 39 std::string g_builtIn = "haptic.default.effect"; 208 * @tc.desc: Start periodic vibration with custom composite effect 231 HdfCompositeEffect effect; in BENCHMARK_F() local 232 effect.type = HDF_EFFECT_TYPE_PRIMITIVE; in BENCHMARK_F() 233 effect.compositeEffects = vec; in BENCHMARK_F() 236 ret = g_vibratorInterface->EnableCompositeEffect(effect); in BENCHMARK_F() 248 * @tc.desc: Get effect information with the given effect type
|
/drivers/peripheral/light/interfaces/include/ |
H A D | light_if.h | 74 * @param effect Indicates the pointer to the lighting effect, if the lightbrightness field is 0, 84 int32_t (*TurnOnLight)(uint32_t lightId, struct LightEffect *effect);
|
/drivers/peripheral/vibrator/hal/src/ |
H A D | vibrator_controller.c | 152 HDF_LOGE("%{public}s: effect is false", __func__); in EnableVibratorModulation() 225 static int32_t Start(const char *effect) in Start() argument 231 if (effect == NULL) { in Start() 232 HDF_LOGE("%s: start vibrator effect type invalid", __func__); in Start() 245 if (!HdfSbufWriteString(msg, effect)) { in Start() 262 static int32_t GetEffectInfo(const char *effect, struct EffectInfo *effectInfo) in GetEffectInfo() argument 266 if (!strcmp(effect, g_effectmap[i].effectName)) { in GetEffectInfo()
|
/drivers/peripheral/light/interfaces/v1_0/ |
H A D | ilight_interface_vdi.h | 37 virtual int32_t TurnOnLight(int32_t lightId, const HdfLightEffectVdi& effect) = 0;
|
/drivers/peripheral/vibrator/interfaces/include/ |
H A D | vibrator_if.h | 65 * @brief Controls the vibrator to perform a periodic vibration with the preset effect. 70 * @param effectType Indicates the pointer to the preset effect type. It is recommended that the 95 * @param vibratorInfo Indicates the pointer to the vibration effect, For details, see {@link VibratorInfo}. 104 * @brief Start the vibrator according to the incoming vibration effect. 122 * @brief Controls the vibrator to perform a periodic vibration with the custom composite effect. 124 * @param effect Indicates the pointer to the custom composite effect type. For details, 132 int32_t (*EnableCompositeEffect)(struct CompositeEffect *effect); 134 * @brief Obtains the vibration effect information with the specified effect typ [all...] |
/drivers/peripheral/vibrator/hdi_impl/ |
H A D | vibrator_interface_impl.h | 36 int32_t EnableCompositeEffect(const HdfCompositeEffectVdi& effect) override;
|
/drivers/peripheral/vibrator/hdi_service/ |
H A D | vibrator_if_service.cpp | 235 int32_t VibratorIfService::EnableCompositeEffect(const HdfCompositeEffect &effect)
in EnableCompositeEffect() argument 244 for (const auto &compositeEffects : effect.compositeEffects) {
in EnableCompositeEffect() 246 if (effect.type == HDF_EFFECT_TYPE_TIME) {
in EnableCompositeEffect() 251 } else if (effect.type == HDF_EFFECT_TYPE_PRIMITIVE) {
in EnableCompositeEffect() 260 compositeEffectVdi.type = effect.type;
in EnableCompositeEffect()
|
H A D | vibrator_if_service.h | 38 int32_t EnableCompositeEffect(const HdfCompositeEffect& effect) override;
|
/drivers/peripheral/vibrator/interfaces/v1_1/ |
H A D | ivibrator_interface_vdi.h | 42 virtual int32_t EnableCompositeEffect(const HdfCompositeEffectVdi& effect) = 0;
|