From abdefd6e0506b613592fad7491788e218f43e905 Mon Sep 17 00:00:00 2001 From: wanghongenaf Date: Fri, 6 Jun 2025 20:38:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9EHDI=20vibrator=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanghongenaf --- display/composer/v1_0/BUILD.gn | 1 - display/composer/v1_1/BUILD.gn | 1 - display/composer/v1_2/BUILD.gn | 1 - vibrator/v2_0/IVibratorInterface.idl | 45 ++++++++++++++++++++++++++-- vibrator/v2_0/VibratorTypes.idl | 16 ++++++++++ 5 files changed, 59 insertions(+), 5 deletions(-) diff --git a/display/composer/v1_0/BUILD.gn b/display/composer/v1_0/BUILD.gn index d6f2c1e8..3cf438fb 100644 --- a/display/composer/v1_0/BUILD.gn +++ b/display/composer/v1_0/BUILD.gn @@ -29,6 +29,5 @@ hdi("display_composer") { language = "cpp" subsystem_name = "hdf" part_name = "drivers_interface_display" - public_configs = [ "../hdifd_parcelable/" ] } diff --git a/display/composer/v1_1/BUILD.gn b/display/composer/v1_1/BUILD.gn index 34b1aa85..e5bb7a3e 100644 --- a/display/composer/v1_1/BUILD.gn +++ b/display/composer/v1_1/BUILD.gn @@ -31,7 +31,6 @@ hdi("display_composer") { language = "cpp" subsystem_name = "hdf" part_name = "drivers_interface_display" - public_configs = [ "../hdifd_parcelable/" ] } diff --git a/display/composer/v1_2/BUILD.gn b/display/composer/v1_2/BUILD.gn index 2fb8b854..47b42696 100644 --- a/display/composer/v1_2/BUILD.gn +++ b/display/composer/v1_2/BUILD.gn @@ -36,7 +36,6 @@ hdi("display_composer") { language = "cpp" subsystem_name = "hdf" part_name = "drivers_interface_display" - public_configs = [ "../hdifd_parcelable/" ] } diff --git a/vibrator/v2_0/IVibratorInterface.idl b/vibrator/v2_0/IVibratorInterface.idl index 0e97f748..68b6e30a 100644 --- a/vibrator/v2_0/IVibratorInterface.idl +++ b/vibrator/v2_0/IVibratorInterface.idl @@ -273,7 +273,7 @@ interface IVibratorInterface { */ RegVibratorPlugCallback([in] IVibratorPlugCallback callbackObj); - /** + /** * @brief UnRegisters the callback for reporting vibrator plug state. * * The deviceId means which pluged in this device. @@ -283,8 +283,49 @@ interface IVibratorInterface { * @param callbackObj Indicates the callback to register. For details, see {@link IVibratorPlugCallback}. * @return Returns 0 if the callback is successfully registered; returns a negative value otherwise. * - * @since 5.1 + * @since 5.1 * @version 2.0 */ UnRegVibratorPlugCallback([in] IVibratorPlugCallback callbackObj); + + /** + * @brief HD vibration data packet delivery. + * + * @param Indecates the Hd vibration data packet. + * + * @return Returns 0 if the operation is successful. + * @return Returns negative value if the get failed. + * + * @sensor 6.0 + * @version 1.0 + */ + PlayPatternBySessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId, [in] struct HapticPaket hapticPaket); + + /** + * @brief HD vibration data packet delivery. + * + * @param Indecates the Hd vibration data packet. + * + * @return Returns 0 if the operation is successful. + * @return Returns negative value if the get failed. + * + * @sensor 6.0 + * @version 1.0 + */ + PlayPackageBySession([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId, [in] struct VibratorPackage vibratorPackage); + + /** + * @brief Stops the vibration. + * + * Before the vibrator starts, it must stop vibrating in any mode. This function can be used during + * and after the vibrating process. + * + * @param mode Indicates the vibration mode, which can be one-shot or periodic. For details, + * see {@link HdfVibratorMode}. + * @return Returns 0 if the operation is successful; returns a negative value otherwise. + * + * @sensor 6.0 + * @version 1.0 + */ + StopVibrateBySessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId); } \ No newline at end of file diff --git a/vibrator/v2_0/VibratorTypes.idl b/vibrator/v2_0/VibratorTypes.idl index 6a4aa3b4..71ac3d21 100644 --- a/vibrator/v2_0/VibratorTypes.idl +++ b/vibrator/v2_0/VibratorTypes.idl @@ -226,6 +226,22 @@ struct HapticPaket { struct HapticEvent[] events; }; +/** + * @brief Defines the vibration data delivery packet. + * + * The information include the different trypes of vibrationsr; + * + * @sensor 6.0 + */ +struct VibratorPackage { + /** Indicates the pattern number of data to be delivered. */ + int patternNum; + /** Indicates the vibration duration of data to be delivered. */ + int packageduration; + /** Indicates the vibration data delivery pattern array. */ + struct HapticPaket[] patterns; +}; + /** * @brief Defines the vibration capability data package. * -- Gitee From 6ab78a39d3924914214a95ff2759019342761935 Mon Sep 17 00:00:00 2001 From: wanghongenaf Date: Mon, 16 Jun 2025 03:43:20 +0000 Subject: [PATCH 2/2] update display/composer/v1_0/BUILD.gn. Signed-off-by: wanghongenaf --- display/composer/v1_0/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/display/composer/v1_0/BUILD.gn b/display/composer/v1_0/BUILD.gn index 3cf438fb..1e3eb0bc 100644 --- a/display/composer/v1_0/BUILD.gn +++ b/display/composer/v1_0/BUILD.gn @@ -29,5 +29,6 @@ hdi("display_composer") { language = "cpp" subsystem_name = "hdf" part_name = "drivers_interface_display" + public_configs = [ "../hdifd_parcelable/" ] } -- Gitee