X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/cd0adb7574525978f50eabd536f7563f2d9f9aa7..51566d1a811f43dc39f38cb597de44ba9363d974:/LUFA/Drivers/USB/LowLevel/Pipe.h diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 294545804..fd01b5c58 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -292,6 +292,12 @@ /** Freezes the selected pipe, preventing it from communicating with an attached device. */ static inline void Pipe_Freeze(void); + /** Determines if the currently selected pipe is frozen, and not able to accept data. + * + * \return Boolean true if the currently selected pipe is frozen, false otherwise + */ + static inline bool Pipe_IsFrozen(void); + /** Clears the master pipe error flag. */ static inline void Pipe_ClearError(void); @@ -445,6 +451,8 @@ #define Pipe_Unfreeze() MACROS{ UPCONX &= ~(1 << PFREEZE); }MACROE #define Pipe_Freeze() MACROS{ UPCONX |= (1 << PFREEZE); }MACROE + + #define Pipe_IsFrozen() ((UPCONX & (1 << PFREEZE)) ? true : false) #define Pipe_ClearError() MACROS{ UPINTX &= ~(1 << PERRI); }MACROE