X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/39d07c3da045a3d739f9977101f8a81f0b8ff0e1..dcf303762ad6b1401d2dcfd763764b400dcee2f7:/LUFA/Drivers/USB/LowLevel/Pipe.h diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index f3da9d1ce..62cbe65a2 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -77,6 +77,12 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ + /** Mask for \ref Pipe_GetErrorFlags(), indicating that an overflow error occurred in the pipe on the received data. */ + #define PIPE_ERRORFLAG_OVERFLOW (1 << 6) + + /** Mask for \ref Pipe_GetErrorFlags(), indicating that an underflow error occurred in the pipe on the received data. */ + #define PIPE_ERRORFLAG_UNDERFLOW (1 << 5) + /** Mask for \ref Pipe_GetErrorFlags(), indicating that a CRC error occurred in the pipe on the received data. */ #define PIPE_ERRORFLAG_CRC16 (1 << 4) @@ -426,7 +432,10 @@ #define Pipe_ClearErrorFlags() MACROS{ UPERRX = 0; }MACROE - #define Pipe_GetErrorFlags() UPERRX + #define Pipe_GetErrorFlags() ((UPERRX & (PIPE_ERRORFLAG_CRC16 | PIPE_ERRORFLAG_TIMEOUT | \ + PIPE_ERRORFLAG_PID | PIPE_ERRORFLAG_DATAPID | \ + PIPE_ERRORFLAG_DATATGL)) | \ + (UPSTAX & PIPE_ERRORFLAG_OVERFLOW | PIPE_ERRORFLAG_UNDERFLOW)) #define Pipe_IsReadWriteAllowed() ((UPINTX & (1 << RWAL)) ? true : false)