From 73edce961a2c5c908dffffd68901ad5d36ab0da2 Mon Sep 17 00:00:00 2001 From: jmxl Date: Thu, 18 Mar 2021 15:30:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E4=B9=A6=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- README_zh.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76110789e..318bf7b25 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ int32_t SampleDriverBind(struct HdfDeviceObject *deviceObject) int32_t SampleDriverInit(struct HdfDeviceObject *deviceObject) { // TODO: Init hardware or other resources here. - return HDF_S UCCESS; + return HDF_SUCCESS; } ``` diff --git a/README_zh.md b/README_zh.md index e9d3ef0df..97548d00f 100644 --- a/README_zh.md +++ b/README_zh.md @@ -98,7 +98,7 @@ Init接口描述:当框架完成设备绑定动作后,就开始调用驱动 int32_t SampleDriverInit(struct HdfDeviceObject *deviceObject) { // TODO: Init hardware or other resources here. - return HDF_S UCCESS; + return HDF_SUCCESS; } ``` -- Gitee From 42c168fb8fa9ac3e3109c6255138a794f250d458 Mon Sep 17 00:00:00 2001 From: wangchenyang Date: Mon, 1 Feb 2021 16:36:41 +0800 Subject: [PATCH 2/4] Description:vfs refactoring Feature or Bugfix:Feature Binary Source:Huawei PrivateCode(Yes/No):Yes Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47 ChangeID:13306380 --- model/input/driver/hdf_input_device_manager.c | 8 ++++---- model/input/driver/hdf_touch.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/model/input/driver/hdf_input_device_manager.c b/model/input/driver/hdf_input_device_manager.c index 00bdbb285..f0b0b37a8 100644 --- a/model/input/driver/hdf_input_device_manager.c +++ b/model/input/driver/hdf_input_device_manager.c @@ -35,7 +35,7 @@ uint32_t TouchPoll(struct file *filep, InputDevice *inputDev, poll_table *wait); static int32_t InputDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) { int32_t ret; - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { return HDF_FAILURE; } @@ -54,7 +54,7 @@ static int32_t InputDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) static int32_t InputDevOpen(struct file *filep) { - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { HDF_LOGE("%s: filep is null", __func__); return HDF_FAILURE; @@ -64,7 +64,7 @@ static int32_t InputDevOpen(struct file *filep) static int32_t InputDevClose(struct file *filep) { - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { HDF_LOGE("%s: inputdev is null", __func__); return HDF_FAILURE; @@ -76,7 +76,7 @@ static int32_t InputDevClose(struct file *filep) static int32_t InputDevPoll(struct file *filep, poll_table *wait) { uint32_t pollMask = 0; - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; switch (inputdev->devType) { case INDEV_TYPE_TOUCH: pollMask = TouchPoll(filep, inputdev, wait); diff --git a/model/input/driver/hdf_touch.c b/model/input/driver/hdf_touch.c index 04daecad1..a78142bd9 100644 --- a/model/input/driver/hdf_touch.c +++ b/model/input/driver/hdf_touch.c @@ -104,7 +104,7 @@ int32_t TouchIoctl(InputDevice *inputdev, int32_t cmd, unsigned long arg) uint32_t TouchPoll(FAR struct file *filep, InputDevice *inputDev, poll_table *wait) { uint32_t pollMask = 0; - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { HDF_LOGE("%s: inputdev is null", __func__); return pollMask; -- Gitee From 2a179c2e29e3124d3fa02b2e4fa1bc27e4f96983 Mon Sep 17 00:00:00 2001 From: gonghui Date: Fri, 26 Mar 2021 08:55:59 +0800 Subject: [PATCH 3/4] modify HarmonyOS Driver interface to hardware driver interface --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 318bf7b25..cda25ee62 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ For details, see [Touchscreen Overview](en-us_topic_0000001052857350.md). ### WLAN -The WLAN module is developed based on the HDF and supports cross-OS migration, component adaptation, and modular assembly and compilation. Based on the unified APIs provided by the WLAN module, driver developers of WLAN vendors can adapt their driver code and developers of the HarmonyOS Driver Interfaces \(HDIs\) are capable of creating, disabling, scanning, and connecting to WLAN hotspots. +The WLAN module is developed based on the HDF and supports cross-OS migration, component adaptation, and modular assembly and compilation. Based on the unified APIs provided by the WLAN module, driver developers of WLAN vendors can adapt their driver code and developers of the Hardware Driver Interfaces \(HDIs\) are capable of creating, disabling, scanning, and connecting to WLAN hotspots. - APIs for implementing WLAN driver module capabilities: Implement the APIs of the WLAN HDI layer and provide capabilities of setting/obtaining the MAC address, obtaining the feature type, and setting the transmit power for upper-layer input services, as well as the capabilities of creating/releasing a **WifiModule**, connecting to/disconnecting from a WLAN hotspot, and applying for/releasing a **NetBuf** for developers. - APIs to be implemented by developers: Based on the provided platform driver, complete the board-level HCS configuration as well as the differentiated WLAN configuration, and offer APIs for initializing, deregistering, enabling, and disabling a network device. -- Gitee From 9217cb6b15df15badb189eb445a91cc2598ef93a Mon Sep 17 00:00:00 2001 From: gonghui Date: Fri, 26 Mar 2021 14:06:00 +0800 Subject: [PATCH 4/4] fix review issue --- include/core/hdf_device_desc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/core/hdf_device_desc.h b/include/core/hdf_device_desc.h index 9c64aa6f7..9c55e21cc 100644 --- a/include/core/hdf_device_desc.h +++ b/include/core/hdf_device_desc.h @@ -254,7 +254,7 @@ struct HdfDriverEntry { /** * @brief Obtains the driver service object based on a driver service name. * - * @param serviceName Indicates the pointer to the released driver service name. + * @param svcName Indicates the pointer to the released driver service name. * * @return Returns the driver service object if the operation is successful; returns NULL otherwise. * @since 1.0 -- Gitee