/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @addtogroup Motion * @{ * * @brief Provides common APIs for hardware services to access the motion driver module. * * A service can obtain a motion driver object or agent and then call APIs provided by this object or agent to * enable or disable motion and subscribe to or unsubscribe from motion data. * * @since 4.0 */ /** * @file MotionTypes.idl * * @brief Defines the data structures used by the motion module, including the motion types and reported motion data structure. * * @since 4.0 * @version 1.1 */ /** * @brief Defines the package path of the motion driver module APIs. * * @since 4.0 */ package ohos.hdi.motion.v1_1; /** * @brief Defines the motion wave config param. * * The motion wave config param includes the wave frequency, wave amplitude, wave is use gyroscope. * * @since 4.0 */ struct WaveParam { /** wave frequency */ int waveFrequency; /** wave amplitude */ int waveAmplitude; /** wave is use gyroscope */ boolean isUseGyroscope; }; /** * @brief Enumerates motion types. * * @since 4.0 */ enum HdfMotionTypeTag { /** Pickup */ HDF_MOTION_TYPE_PICKUP = 0, /** Flip */ HDF_MOTION_TYPE_FLIP, /** Closing to the ear */ HDF_MOTION_CLOSE_TO_EAR, /** Shaking */ HDF_MOTION_TYPE_SHAKE, /** Screen rotation */ HDF_MOTION_TYPE_ROTATION, /** Pocket mode */ HDF_MOTION_TYPE_POCKET_MODE, /** Taking away from the ear */ HDF_MOTION_TYPE_LEAVE_EAR, /** Wrist-up */ HDF_MOTION_TYPE_WRIST_UP, /** Wrist-down */ HDF_MOTION_TYPE_WRIST_DOWN, /** Wave */ HDF_MOTION_TYPE_WAVE, /** Step counter */ HDF_MOTION_TYPE_STEP_COUNTER, /** Reserved */ HDF_MOTION_TYPE_RESERVED, /** Maximum motion type */ HDF_MOTION_TYPE_MAX, }; /** @} */