diff --git a/en/application-dev/device/usb-guidelines.md b/en/application-dev/device/usb-guidelines.md index 64eee37cf1f0e34a58f5805d13be4cec77cb1498..696fd8e06d2d32c7bf083859bea40be81535352d 100644 --- a/en/application-dev/device/usb-guidelines.md +++ b/en/application-dev/device/usb-guidelines.md @@ -26,7 +26,7 @@ The following table lists the USB APIs currently available. For details, see the | releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number | Releases a USB interface. | | getFileDescriptor(pipe: USBDevicePipe): number | Obtains the file descriptor. | | getRawDescriptor(pipe: USBDevicePipe): Uint8Array | Obtains the raw USB descriptor. | -| controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout ?: number): Promise\ | Performs control transfer. | +| controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout ?: number): Promise\ | Performs control transfer. | ## How to Develop @@ -118,11 +118,11 @@ You can set a USB device as the USB host to connect to other USB devices for dat 4. Perform data transfer. - ```js - /* - Read data. Select the corresponding RX endpoint from deviceList for data transfer. - (endpoint.direction == 0x80); dataUint8Array indicates the data to read. The data type is Uint8Array. - */ + ```js + /* + Read data. Select the corresponding RX endpoint from deviceList for data transfer. + (endpoint.direction == 0x80); dataUint8Array indicates the data to read. The data type is Uint8Array. + */ let inEndpoint = interface1.endpoints[2]; let outEndpoint = interface1.endpoints[1]; let dataUint8Array = new Uint8Array(1024); @@ -147,7 +147,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat }).catch(error => { console.info("usb writeData error : " + JSON.stringify(error)); }); - ``` + ``` 5. Release the USB interface, and close the USB device. diff --git a/en/application-dev/reference/apis/js-apis-worker.md b/en/application-dev/reference/apis/js-apis-worker.md index db8a73c0ff0b29ca6c753073f8ea0d297b19ccb8..5b7468da9721fa93ba1e42313a83101adf631df1 100644 --- a/en/application-dev/reference/apis/js-apis-worker.md +++ b/en/application-dev/reference/apis/js-apis-worker.md @@ -107,7 +107,7 @@ In the FA model: "buildOption": { "sourceOption": { "workers": [ - "./src/main/ets/entryability/workers/worker.ts" + "./src/main/ets/MainAbility/workers/worker.ts" ] } } @@ -1192,7 +1192,7 @@ In the FA model: "buildOption": { "sourceOption": { "workers": [ - "./src/main/ets/entryability/workers/worker.ts" + "./src/main/ets/MainAbility/workers/worker.ts" ] } } @@ -2114,7 +2114,7 @@ Configuration of the **build-profile.json5** file: "buildOption": { "sourceOption": { "workers": [ - "./src/main/ets/entryability/workers/worker.ts" + "./src/main/ets/MainAbility/workers/worker.ts" ] } }