X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b120c4e4cda5b5ed12a61697b5ab33d4dd0a70e8..46f2e488b0508d12be63b14213b8e0499eb01fc0:/LUFA/Drivers/USB/LowLevel/Pipe.h?ds=sidebyside diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 8cf48cd0a..0e877f623 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 << NBUSYBK0)); + } /** 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