1/* 2 * Copyright (c) 2021 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 * Constants of events that will be registered to system. 18 */ 19const EventConstants = { 20 21 /** 22 * Bitmask used for extracting the USBEndpoint type from it's address 23 */ 24 USB_ENDPOINT_XFERTYPE_MASK: 0x03, 25 26 /** 27 * Control USBEndpoint type 28 */ 29 USB_ENDPOINT_XFER_CONTROL: 0, 30 31 /** 32 * Isochronous USBEndpoint type 33 */ 34 USB_ENDPOINT_XFER_ISOC: 1, 35 36 /** 37 * Bulk USBEndpoint type 38 */ 39 USB_ENDPOINT_XFER_BULK: 2, 40 41 /** 42 * Interrupt USBEndpoint type 43 */ 44 USB_ENDPOINT_XFER_INT: 3, 45 46 /** 47 * Bitmask used for extracting the USBEndpoint number from it's address 48 */ 49 USB_ENDPOINT_NUMBER_MASK: 0x0f, 50 51 /** 52 * Bitmask used for extracting the USBEndpoint direction from it's address 53 */ 54 USB_ENDPOINT_DIR_MASK: 0x80, 55 56 /** 57 * Used to signify direction of data for USBEndpoint is OUT, host to device 58 */ 59 USB_ENDPOINT_DIR_OUT: 0, 60 61 /** 62 * Used to signify direction of data for USBEndpoint is IN, device to host 63 */ 64 USB_ENDPOINT_DIR_IN: 0x80 65} 66 67export default EventConstants;