X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/0c2ad9eb349e1a5676468af3b407329dde4a53b4..0da99447d3e88e83f9977501bee56af5c7aa56c0:/LUFA/Drivers/USB/Core/Pipe.h diff --git a/LUFA/Drivers/USB/Core/Pipe.h b/LUFA/Drivers/USB/Core/Pipe.h index 387ee5042..faa803b6d 100644 --- a/LUFA/Drivers/USB/Core/Pipe.h +++ b/LUFA/Drivers/USB/Core/Pipe.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -97,6 +97,19 @@ #endif /* Public Interface - May be used in end-application: */ + /* Type Defines: */ + /** Type define for a pipe table entry, used to configure pipes in groups via + * \ref Pipe_ConfigurePipeTable(). + */ + typedef struct + { + uint8_t Address; /**< Address of the pipe to configure, or zero if the table entry is to be unused. */ + uint16_t Size; /**< Size of the pipe bank, in bytes. */ + uint8_t EndpointAddress; /** Address of the endpoint in the connected device. */ + uint8_t Type; /**< Type of the endpoint, a \c EP_TYPE_* mask. */ + uint8_t Banks; /**< Number of hardware banks to use for the pipe. */ + } USB_Pipe_Table_t; + /* Macros: */ /** Pipe address for the default control pipe, which always resides in address 0. This is * defined for convenience to give more readable code when used with the pipe macros. @@ -106,18 +119,13 @@ /** Pipe number mask, for masking against pipe addresses to retrieve the pipe's numerical address * in the device. */ - #define PIPE_PIPENUM_MASK 0x07 + #define PIPE_PIPENUM_MASK 0x0F /** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's * numerical address in the attached device. */ #define PIPE_EPNUM_MASK 0x0F - /** Endpoint direction mask, for masking against endpoint addresses to retrieve the endpoint's - * direction for comparing with the \c ENDPOINT_DESCRIPTOR_DIR_* masks. - */ - #define PIPE_EPDIR_MASK 0x80 - /* Architecture Includes: */ #if (ARCH == ARCH_AVR8) #include "AVR8/Pipe_AVR8.h"