1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @addtogroup HdiUsb 18 * @{ 19 * 20 * @brief Provides unified APIs for usb services to access usb drivers. 21 * 22 * A usb service can obtain a usb driver object or agent and then call APIs provided by this object or agent to 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 * setting the usb data reporting mode, and setting usb options such as the accuracy and measurement range. 26 * 27 * @version 1.0 28 */ 29 30package ohos.hdi.usb.v1_0; 31 32/** 33 * @brief Defines the callback for reporting usb data. This callback needs to be registered when 34 * a usb user subscribes to usb data. Only after the usb is enabled, the usb data subscriber can receive 35 * usb data. For details, see {@link IUsbInterface}. 36 * 37 * @since 3.2 38 */ 39[callback] interface IUsbdBulkCallback { 40 41 OnBulkWriteCallback([in] int status, [in] int actLength); 42 43 OnBulkReadCallback([in] int status, [in] int actLength); 44 45}