#include "vibrator_hal.h"
#include "vibrator.h"
#include "custom_utils.h"
-void custom_VibratorFunc(OHOS::VibratorType vibratorType)
-{
-
- vibrator_cmd_t mail = {0};
- switch (vibratorType)
- {
- case OHOS::VibratorType::VIBRATOR_TYPE_ONE:
- mail.cycle_time_ms=200;
- mail.duty = 20;
- mail.duration_time_ms = 100;
- break;
- case OHOS::VibratorType::VIBRATOR_TYPE_TWO:
- mail.cycle_time_ms=200;
- mail.duty = 20;
- mail.duration_time_ms = 200;
- break;
- case OHOS::VibratorType::VIBRATOR_TYPE_THREE:
- mail.cycle_time_ms=200;
- mail.duty = 20;
- mail.duration_time_ms = 500;
- break;
- }
-
- do_vibrator_cmd(mail);
-
-}
void custom_VibratorFunc_int(int vibratorType)
{
do_vibrator_cmd(mail);
}
+
+
+void custom_VibratorFunc(OHOS::VibratorType vibratorType)
+{
+
+ vibrator_cmd_t mail = {0};
+ switch (vibratorType)
+ {
+ case OHOS::VibratorType::VIBRATOR_TYPE_ONE:
+ custom_VibratorFunc_int(1);
+ break;
+ case OHOS::VibratorType::VIBRATOR_TYPE_TWO:
+ custom_VibratorFunc_int(2);
+ break;
+ case OHOS::VibratorType::VIBRATOR_TYPE_THREE:
+ custom_VibratorFunc_int(3);
+ break;
+ }
+}
+
#define MAG_CHECK_MS 20
static unsigned long g_app_queue;