diff --git a/README.md b/README.md index 76110789e882b17302a0afa8279e3821f5a34021..cda25ee621ce253e2265ba681c1a159f17330e3f 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; } ``` @@ -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. diff --git a/README_zh.md b/README_zh.md index e9d3ef0df4f747db495cc57d31725664d052de38..97548d00f8507f0fd1514808edcdf7ee7da98164 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; } ``` diff --git a/include/core/hdf_device_desc.h b/include/core/hdf_device_desc.h index 9c64aa6f7f0a6640ac3528e593dd119f672b35e3..9c55e21cc55105d1fc0c43681742265b0e24c8db 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 diff --git a/model/input/driver/hdf_input_device_manager.c b/model/input/driver/hdf_input_device_manager.c index 00bdbb2855489b1dba47cb795090529461441d55..f0b0b37a82e5eb10577762f2372ae4533e80125f 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 239c711d58779797f5518736fd64854599bbfdc7..edb8fcf39a2348856843705d92acc10aab2f801b 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;