X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=include%2Fusb_defs.h;h=236a5ecdf6f9fda347aafe2bded83e42fbdab372;hb=440a5742393bb959fd7bce28f5c916355d8607ca;hp=4f3601a16c3a487a05b6bcf8c31cda2d3bc27894;hpb=7e7501f4bb0d550fbc6960e7e2fb2bc84d9795cf;p=karo-tx-uboot.git diff --git a/include/usb_defs.h b/include/usb_defs.h index 4f3601a16c..236a5ecdf6 100644 --- a/include/usb_defs.h +++ b/include/usb_defs.h @@ -2,26 +2,9 @@ * (C) Copyright 2001 * Denis Peter, MPL AG Switzerland * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ * * Note: Part of this code has been derived from linux - * */ #ifndef _USB_DEFS_H_ #define _USB_DEFS_H_ @@ -80,6 +63,25 @@ #define USB_DIR_OUT 0 #define USB_DIR_IN 0x80 +/* + * bmRequestType: USB Device Requests, table 9.2 USB 2.0 spec. + * (shifted) direction/type/recipient. + */ +#define DeviceRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE) << 8) + +#define DeviceOutRequest \ + ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE) << 8) + +#define InterfaceRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) + +#define EndpointRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) + +#define EndpointOutRequest \ + ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) + /* Descriptor types */ #define USB_DT_DEVICE 0x01 #define USB_DT_CONFIG 0x02