!42 Gitee Review - 0621_master

Merge pull request !42 from kevin/0621_master
This commit is contained in:
openharmony_ci
2021-06-22 14:05:20 +00:00
committed by Gitee
8 changed files with 126 additions and 0 deletions
+1
View File
@@ -21,3 +21,4 @@ source "drivers/hdf/khdf/model/network/wifi/Kconfig"
source "drivers/hdf/khdf/model/network/bluetooth/Kconfig"
source "drivers/hdf/khdf/model/sensor/Kconfig"
source "drivers/hdf/khdf/model/storage/Kconfig"
source "drivers/hdf/khdf/model/misc/vibrator/Kconfig"
+1
View File
@@ -44,3 +44,4 @@ obj-$(CONFIG_DRIVERS_HDF_WIFI) += model/network/wifi/
obj-$(CONFIG_DRIVERS_HDF_SENSOR) += model/sensor/
obj-$(CONFIG_DRIVERS_HDF_STORAGE) += model/storage/
obj-$(CONFIG_DRIVERS_HDF_BT) += model/network/bluetooth/
obj-$(CONFIG_DRIVERS_HDF_VIBRATOR) += model/misc/vibrator/
+25
View File
@@ -308,5 +308,30 @@
}
}
}
vibrator :: host {
hostName = "vibrator_host";
device_vibrator :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_VIBRATOR";
serviceName = "hdf_misc_vibrator";
deviceMatchAttr = "hdf_vibrator_driver";
}
}
device_linear_vibrator :: device {
device0 :: deviceNode {
policy = 1;
priority = 105;
preload = 0;
permission = 0664;
moduleName = "HDF_LINEAR_VIBRATOR";
serviceName = "hdf_misc_linear_vibrator";
deviceMatchAttr = "hdf_linear_vibrator_driver";
}
}
}
}
}
+2
View File
@@ -9,6 +9,8 @@
#include "wifi/wlan_platform.hcs"
#include "wifi/wlan_chip_hi3881.hcs"
#include "sensor/sensor_config.hcs"
#include "vibrator/vibrator_config.hcs"
#include "vibrator/linear_vibrator_config.hcs"
root {
module = "hisilicon,hi35xx_chip";
+14
View File
@@ -0,0 +1,14 @@
root {
linearVibratorConfig {
boardConfig {
match_attr = "hdf_linear_vibrator_driver";
vibratorChipConfig {
busType = 1; // 0:i2c 1:gpio
gpioNum = 31;
startReg = 0;
stopReg = 0;
startMask = 0;
}
}
}
}
+16
View File
@@ -0,0 +1,16 @@
root {
vibratorConfig {
boardConfig {
match_attr = "hdf_vibrator_driver";
vibratorAttr {
/* 0:rotor 1:linear */
deviceType = 1;
supportPreset = 1;
}
vibratorHapticConfig {
vibrator_haptic_default_time = [1, 0, 600, 800, 600, 1100, 0]; // time seq
vibrator_haptic_default_effect = [0, 0, 3, 800, 1]; // build-in effect
}
}
}
}
+25
View File
@@ -0,0 +1,25 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
config DRIVERS_HDF_VIBRATOR
bool "Enable HDF vibrator driver"
default n
depends on DRIVERS_HDF
help
Answer Y to enable HDF vibrator driver.
config DRIVERS_HDF_VIBRATOR_LINEAR
bool "Enable HDF linear vibrator driver"
default n
depends on DRIVERS_HDF_VIBRATOR
help
Answer Y to enable HDF linear vibrator driver.
+42
View File
@@ -0,0 +1,42 @@
#
# Copyright (c) 2021 Huawei Device Co., Ltd.
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
SEC_LIB_SOURCES = memcpy_s.c memmove_s.c memset_s.c securecutil.c secureinput_a.c secureprintoutput_a.c snprintf_s.c sprintf_s.c strcat_s.c strcpy_s.c strncat_s.c strncpy_s.c strtok_s.c vsnprintf_s.c vsprintf_s.c
PWD:=$(shell pwd)
SEC_OBJECTS:=$(patsubst %.c,%.o,$(SEC_LIB_SOURCES))
VIBRATOR_ROOT_DIR = ../../../../../../framework/model/misc/vibrator/driver
obj-$(CONFIG_DRIVERS_HDF_VIBRATOR) += \
$(VIBRATOR_ROOT_DIR)/src/vibrator_driver.o \
$(VIBRATOR_ROOT_DIR)/src/vibrator_haptic.o
obj-$(CONFIG_DRIVERS_HDF_VIBRATOR_LINEAR) += \
$(VIBRATOR_ROOT_DIR)/chipset/vibrator_linear_driver.o
ccflags-y += -Iinclude/../drivers/hdf/framework/model/misc/vibrator/driver/include \
-Iinclude/../drivers/hdf/framework/model/misc/vibrator/driver/chipset \
-Iinclude/../drivers/hdf/framework/include/core \
-Iinclude/../drivers/hdf/framework/core/common/include/host \
-Iinclude/../drivers/hdf/framework/include/utils \
-Iinclude/../drivers/hdf/framework/include/osal \
-Iinclude/../drivers/hdf/framework/ability/sbuf/include \
-Iinclude/../drivers/hdf/framework/include/platform \
-Iinclude/../drivers/hdf/framework/include/config \
-Iinclude/../drivers/hdf/framework/core/host/include \
-Iinclude/../drivers/hdf/framework/core/shared/include \
-Iinclude/../drivers/hdf/framework/utils/include \
-Iinclude/../drivers/hdf/khdf/osal/include \
-I$(PROJECT_ROOT)/third_party/bounds_checking_function/include