X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/de0df8b16259458c78c742b5dbedd4ac90856285..3642ea0b9715cdf0196b10c9fc97898940eaefa6:/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h index e1a3ff486..6f3b1f3a3 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2013. + Copyright (C) Dean Camera, 2015. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2015 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 @@ -91,7 +91,7 @@ * * \param[in] Buffer Application buffer to check * - * \return Boolean true if the buffer contains a packet from the host, false otherwise + * \return Boolean \c true if the buffer contains a packet from the host, \c false otherwise */ #define TCP_APP_HAS_RECEIVED_PACKET(Buffer) (Buffer->Ready && (Buffer->Direction == TCP_PACKETDIR_IN)) @@ -99,7 +99,7 @@ * * \param[in] Buffer Application buffer to check * - * \return Boolean true if the buffer has been captured by the application for device-to-host transmissions, false otherwise + * \return Boolean \c true if the buffer has been captured by the application for device-to-host transmissions, \c false otherwise */ #define TCP_APP_HAVE_CAPTURED_BUFFER(Buffer) (!(Buffer->Ready) && Buffer->InUse && (Buffer->Direction == TCP_PACKETDIR_OUT)) @@ -107,7 +107,7 @@ * * \param[in] Buffer Application buffer to check * - * \return Boolean true if the buffer may be captured by the application for device-to-host transmissions, false otherwise + * \return Boolean \c true if the buffer may be captured by the application for device-to-host transmissions, \c false otherwise */ #define TCP_APP_CAN_CAPTURE_BUFFER(Buffer) Buffer->InUse @@ -118,32 +118,32 @@ * * \param[in] Buffer Application buffer to lock */ - #define TCP_APP_CAPTURE_BUFFER(Buffer) MACROS{ Buffer->Direction = TCP_PACKETDIR_OUT; Buffer->InUse = true; }MACROE + #define TCP_APP_CAPTURE_BUFFER(Buffer) do { Buffer->Direction = TCP_PACKETDIR_OUT; Buffer->InUse = true; } while (0) /** Application macro: Releases a captured application buffer, allowing for host-to-device packets to be received. * * \param[in] Buffer Application buffer to release */ - #define TCP_APP_RELEASE_BUFFER(Buffer) MACROS{ Buffer->InUse = false; }MACROE + #define TCP_APP_RELEASE_BUFFER(Buffer) do { Buffer->InUse = false; } while (0) /** Application macro: Sends the contents of the given application buffer to the host. * * \param[in] Buffer Application buffer to send * \param[in] Len Length of data contained in the buffer */ - #define TCP_APP_SEND_BUFFER(Buffer, Len) MACROS{ Buffer->Direction = TCP_PACKETDIR_OUT; Buffer->Length = Len; Buffer->Ready = true; }MACROE + #define TCP_APP_SEND_BUFFER(Buffer, Len) do { Buffer->Direction = TCP_PACKETDIR_OUT; Buffer->Length = Len; Buffer->Ready = true; } while (0) /** Application macro: Clears the application buffer, ready for a packet to be written to it. * * \param[in] Buffer Application buffer to clear */ - #define TCP_APP_CLEAR_BUFFER(Buffer) MACROS{ Buffer->Ready = false; Buffer->Length = 0; }MACROE + #define TCP_APP_CLEAR_BUFFER(Buffer) do { Buffer->Ready = false; Buffer->Length = 0; } while (0) /** Application macro: Closes an open connection to a host. * * \param[in] Connection Open TCP connection to close */ - #define TCP_APP_CLOSECONNECTION(Connection) MACROS{ Connection->State = TCP_Connection_Closing; }MACROE + #define TCP_APP_CLOSECONNECTION(Connection) do { Connection->State = TCP_Connection_Closing; } while (0) /* Enums: */ /** Enum for possible TCP port states. */