diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-10-29 06:22:03 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-10-29 06:22:03 +0000 |
| commit | ce73c0ff96e291dbb6b1806b2ad67efd1e070d8a (patch) | |
| tree | eb705d8e8e4e26ea07b483b27b2f0ee35203b1b1 /LUFA/Drivers/USB/LowLevel/Pipe.h | |
| parent | d776f0d652da243e47df2f0902fbeb14cd5a67ec (diff) | |
Added new Pipe_GetBusyBanks(), Endpoint_GetBusyBanks() and Endpoint_AbortPendingIN() functions.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1545 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Pipe.h')
| -rw-r--r-- | LUFA/Drivers/USB/LowLevel/Pipe.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 8cf48cd0..53aeb1fd 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -452,6 +452,19 @@ PIPE_ERRORFLAG_DATATGL)) | (UPSTAX & (PIPE_ERRORFLAG_OVERFLOW | PIPE_ERRORFLAG_UNDERFLOW))); } + + /** Retrieves the number of busy banks in the currently selected pipe, which have been queued for + * transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the + * \ref Pipe_ClearIN() command. + * + * \ingroup Group_PipePacketManagement + * + * \return Total number of busy banks in the selected pipe. + */ + static inline uint8_t Pipe_GetBusyBanks(void) + { + return (UPSTAX & (0x03 << NBUSYBK)); + } /** Determines if the currently selected pipe may be read from (if data is waiting in the pipe * bank and the pipe is an IN direction, or if the bank is not yet full if the pipe is an OUT |
