From deed746d3716d59153e04860c646bfb7b82ca820 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 17 Jun 2010 08:15:58 +0000 Subject: Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT(). Minor tweaks to the library documentation. --- LUFA/Common/Attributes.h | 8 +- LUFA/Common/Common.h | 24 ++-- LUFA/Doxygen.conf | 2 +- LUFA/Drivers/Board/Buttons.h | 2 +- LUFA/Drivers/Board/Dataflash.h | 4 +- LUFA/Drivers/Board/Joystick.h | 2 +- LUFA/Drivers/Board/LEDs.h | 14 +-- LUFA/Drivers/Board/Temperature.h | 2 +- LUFA/Drivers/Misc/TerminalCodes.h | 5 +- LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h | 14 +-- LUFA/Drivers/Peripheral/SPI.h | 10 +- LUFA/Drivers/Peripheral/Serial.h | 14 +-- LUFA/Drivers/Peripheral/SerialStream.h | 4 +- LUFA/Drivers/USB/Class/Common/Audio.h | 156 +++++++++++++------------- LUFA/Drivers/USB/Class/Common/CDC.h | 52 ++++----- LUFA/Drivers/USB/Class/Common/HID.h | 40 +++---- LUFA/Drivers/USB/Class/Common/MIDI.h | 80 ++++++------- LUFA/Drivers/USB/Class/Common/MassStorage.h | 32 +++--- LUFA/Drivers/USB/Class/Common/RNDIS.h | 24 ++-- LUFA/Drivers/USB/Class/Common/StillImage.h | 52 ++++----- LUFA/Drivers/USB/Class/Device/Audio.h | 50 ++++----- LUFA/Drivers/USB/Class/Device/CDC.h | 80 ++++++------- LUFA/Drivers/USB/Class/Device/HID.h | 40 +++---- LUFA/Drivers/USB/Class/Device/MIDI.h | 38 +++---- LUFA/Drivers/USB/Class/Device/MassStorage.h | 34 +++--- LUFA/Drivers/USB/Class/Device/RNDIS.h | 46 ++++---- LUFA/Drivers/USB/Class/Host/CDC.h | 98 ++++++++-------- LUFA/Drivers/USB/Class/Host/HID.h | 86 +++++++------- LUFA/Drivers/USB/Class/Host/HIDParser.h | 42 +++---- LUFA/Drivers/USB/Class/Host/MIDI.h | 48 ++++---- LUFA/Drivers/USB/Class/Host/MassStorage.h | 116 +++++++++---------- LUFA/Drivers/USB/Class/Host/Printer.h | 66 +++++------ LUFA/Drivers/USB/Class/Host/RNDIS.h | 94 ++++++++-------- LUFA/Drivers/USB/Class/Host/StillImage.h | 102 ++++++++--------- LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h | 58 +++++----- LUFA/Drivers/USB/HighLevel/Events.h | 6 +- LUFA/Drivers/USB/HighLevel/StdDescriptors.h | 28 ++--- LUFA/Drivers/USB/HighLevel/USBTask.h | 4 +- LUFA/Drivers/USB/LowLevel/DevChapter9.h | 6 +- LUFA/Drivers/USB/LowLevel/Device.h | 2 +- LUFA/Drivers/USB/LowLevel/Endpoint.h | 66 +++++------ LUFA/Drivers/USB/LowLevel/Host.h | 20 ++-- LUFA/Drivers/USB/LowLevel/OTG.h | 33 +++--- LUFA/Drivers/USB/LowLevel/Pipe.h | 92 +++++++-------- LUFA/Drivers/USB/USB.h | 5 +- LUFA/ManPages/ChangeLog.txt | 1 + LUFA/Scheduler/Scheduler.h | 25 ++--- 47 files changed, 917 insertions(+), 910 deletions(-) (limited to 'LUFA') diff --git a/LUFA/Common/Attributes.h b/LUFA/Common/Attributes.h index 01938dc8f..220017a29 100644 --- a/LUFA/Common/Attributes.h +++ b/LUFA/Common/Attributes.h @@ -124,15 +124,15 @@ /** Places the function in one of the initialization sections, which execute before the main function * of the application. Refer to the avr-libc manual for more information on the initialization sections. * - * \param[in] x Initialization section number where the function should be placed + * \param[in] SectionIndex Initialization section number where the function should be placed. */ - #define ATTR_INIT_SECTION(x) __attribute__ ((naked, section (".init" #x ))) + #define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((naked, section (".init" #SectionIndex ))) /** Marks a function as an alias for another function. * - * \param[in] x Name of the function which the given function name should alias + * \param[in] Func Name of the function which the given function name should alias. */ - #define ATTR_ALIAS(x) __attribute__ ((alias( #x ))) + #define ATTR_ALIAS(Func) __attribute__ ((alias( #Func ))) #endif /** @} */ diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index 76307d7e9..fa9a10f3c 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -99,17 +99,17 @@ */ #define JTAG_DEBUG_ASSERT(x) MACROS{ if (!(x)) { JTAG_DEBUG_BREAK(); } }MACROE - /** Macro for testing condition "x" and writing debug data to the serial stream if false. As a - * prerequisite for this macro, the serial stream should be configured via the Peripheral/SerialStream driver. + /** Macro for testing condition "x" and writing debug data to the stdout stream if false. The stdout stream + * must be pre-initialized before this macro is run and linked to an output device, such as the AVR's USART + * peripheral. * - * The serial output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion - * {x} failed." + * The output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion {x} failed." * * \ingroup Group_Debugging */ - #define SERIAL_STREAM_ASSERT(x) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \ - "Assertion \"%s\" failed.\r\n"), \ - __FILE__, __func__, __LINE__, #x); } \ + #define STDOUT_ASSERT(x) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \ + "Assertion \"%s\" failed.\r\n"), \ + __FILE__, __func__, __LINE__, #x); } \ }MACROE /* Inline Functions: */ @@ -118,7 +118,7 @@ * * \ingroup Group_BitManip * - * \param[in] Byte Byte of data whose bits are to be reversed + * \param[in] Byte Byte of data whose bits are to be reversed. */ static inline uint8_t BitReverse(uint8_t Byte) ATTR_WARN_UNUSED_RESULT ATTR_CONST; static inline uint8_t BitReverse(uint8_t Byte) @@ -134,7 +134,7 @@ * * \ingroup Group_BitManip * - * \param[in] Word Word of data whose bytes are to be swapped + * \param[in] Word Word of data whose bytes are to be swapped. */ static inline uint16_t SwapEndian_16(uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST; static inline uint16_t SwapEndian_16(uint16_t Word) @@ -146,7 +146,7 @@ * * \ingroup Group_BitManip * - * \param[in] DWord Double word of data whose bytes are to be swapped + * \param[in] DWord Double word of data whose bytes are to be swapped. */ static inline uint32_t SwapEndian_32(uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST; static inline uint32_t SwapEndian_32(uint32_t DWord) @@ -161,8 +161,8 @@ * * \ingroup Group_BitManip * - * \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed - * \param[in] Bytes Length of the data in bytes + * \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed. + * \param[in] Bytes Length of the data in bytes. */ static inline void SwapEndian_n(void* Data, uint8_t Bytes); static inline void SwapEndian_n(void* Data, uint8_t Bytes) diff --git a/LUFA/Doxygen.conf b/LUFA/Doxygen.conf index 24f8964e7..bb7679c8b 100644 --- a/LUFA/Doxygen.conf +++ b/LUFA/Doxygen.conf @@ -636,7 +636,7 @@ EXCLUDE_PATTERNS = # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = __* +EXCLUDE_SYMBOLS = _* __* # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see diff --git a/LUFA/Drivers/Board/Buttons.h b/LUFA/Drivers/Board/Buttons.h index ec25f5fd6..11c31910a 100644 --- a/LUFA/Drivers/Board/Buttons.h +++ b/LUFA/Drivers/Board/Buttons.h @@ -108,7 +108,7 @@ /** Returns a mask indicating which board buttons are currently pressed. * - * \return Mask indicating which board buttons are currently pressed + * \return Mask indicating which board buttons are currently pressed. */ static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; #endif diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h index 5281a1936..eb0bebd8c 100644 --- a/LUFA/Drivers/Board/Dataflash.h +++ b/LUFA/Drivers/Board/Dataflash.h @@ -218,8 +218,8 @@ /** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with * dataflash commands which require a complete 24-byte address. * - * \param[in] PageAddress Page address within the selected dataflash IC - * \param[in] BufferByte Address within the dataflash's buffer + * \param[in] PageAddress Page address within the selected dataflash IC. + * \param[in] BufferByte Address within the dataflash's buffer. */ static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte); diff --git a/LUFA/Drivers/Board/Joystick.h b/LUFA/Drivers/Board/Joystick.h index cbbaf0ea5..2953b72af 100644 --- a/LUFA/Drivers/Board/Joystick.h +++ b/LUFA/Drivers/Board/Joystick.h @@ -99,7 +99,7 @@ * currently facing in (multiple bits can be set). * * \return Mask indicating the joystick direction - see corresponding board specific Joystick.h file - * for direction masks + * for direction masks. */ static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; #endif diff --git a/LUFA/Drivers/Board/LEDs.h b/LUFA/Drivers/Board/LEDs.h index 85eced9f1..0aebbde5c 100644 --- a/LUFA/Drivers/Board/LEDs.h +++ b/LUFA/Drivers/Board/LEDs.h @@ -140,41 +140,41 @@ /** Turns on the LEDs specified in the given LED mask. * - * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file) + * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file). */ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask); /** Turns off the LEDs specified in the given LED mask. * - * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file) + * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file). */ static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask); /** Turns off all LEDs not specified in the given LED mask, and turns on all the LEDs in the given LED * mask. * - * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file) + * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file). */ static inline void LEDs_SetAllLEDs(const uint8_t LEDMask); /** Turns off all LEDs in the LED mask that are not set in the active mask, and turns on all the LEDs * specified in both the LED and active masks. * - * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file) - * \param[in] ActiveMask Mask of whether the LEDs in the LED mask should be turned on or off + * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file). + * \param[in] ActiveMask Mask of whether the LEDs in the LED mask should be turned on or off. */ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask); /** Toggles all LEDs in the LED mask, leaving all others in their current states. * - * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file) + * \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file). */ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask); /** Returns the status of all the board LEDs; set LED masks in the return value indicate that the * corresponding LED is on. * - * \return Mask of the board LEDs which are currently turned on + * \return Mask of the board LEDs which are currently turned on. */ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; #endif diff --git a/LUFA/Drivers/Board/Temperature.h b/LUFA/Drivers/Board/Temperature.h index 561f651c2..98bd23498 100644 --- a/LUFA/Drivers/Board/Temperature.h +++ b/LUFA/Drivers/Board/Temperature.h @@ -103,7 +103,7 @@ /** Performs a complete ADC on the temperature sensor channel, and converts the result into a * valid temperature between \ref TEMP_MIN_TEMP and \ref TEMP_MAX_TEMP in degrees Celsius. * - * \return Signed temperature in degrees Celsius + * \return Signed temperature value in degrees Celsius. */ int8_t Temperature_GetTemperature(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Misc/TerminalCodes.h b/LUFA/Drivers/Misc/TerminalCodes.h index 05762858d..ec35d1262 100644 --- a/LUFA/Drivers/Misc/TerminalCodes.h +++ b/LUFA/Drivers/Misc/TerminalCodes.h @@ -63,7 +63,10 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ #if !defined(DISABLE_TERMINAL_CODES) - /** Creates an ANSII escape sequence with the payload specified by "c". */ + /** Creates an ANSI escape sequence with the payload specified by "c". + * + * \param[in] c Payload to encode as an ANSI escape sequence, a ESC_* mask. + */ #define ANSI_ESCAPE_SEQUENCE(c) "\33[" c #else #define ANSI_ESCAPE_SEQUENCE(c) diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h index c4e7c1285..756ec649d 100644 --- a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h +++ b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h @@ -203,7 +203,7 @@ * The "mode" parameter should be a mask comprised of a conversion mode (free running or single) and * prescaler masks. * - * \param[in] Mode Mask of ADC settings, including adjustment, prescale, mode and reference + * \param[in] Mode Mask of ADC settings, including adjustment, prescale, mode and reference. */ static inline void ADC_Init(uint8_t Mode); @@ -221,14 +221,14 @@ /** Indicates if the current ADC conversion is completed, or still in progress. * * \return Boolean false if the reading is still taking place, or true if the conversion is - * complete and ready to be read out with \ref ADC_GetResult() + * complete and ready to be read out with \ref ADC_GetResult(). */ static inline bool ADC_IsReadingComplete(void); /** Retrieves the conversion value of the last completed ADC conversion and clears the reading * completion flag. * - * \return The result of the last ADC conversion + * \return The result of the last ADC conversion as an unsigned value. */ static inline uint16_t ADC_GetResult(void); #else @@ -254,7 +254,7 @@ * * \note The channel number must be specified as an integer, and NOT a ADC_CHANNELx mask. * - * \param[in] Channel ADC channel number to set up for conversions + * \param[in] Channel ADC channel number to set up for conversions. */ static inline void ADC_SetupChannel(const uint8_t Channel) { @@ -297,7 +297,7 @@ * * \note The channel number must be specified as an integer, and NOT a ADC_CHANNELx mask. * - * \param[in] Channel ADC channel number to set up for conversions + * \param[in] Channel ADC channel number to set up for conversions. */ static inline void ADC_DisableChannel(const uint8_t Channel) { @@ -338,7 +338,7 @@ * conversions. If the ADC is in single conversion mode (or the channel to convert from is to be changed), * this function must be called each time a conversion is to take place. * - * \param[in] MUXMask Mask comprising of an ADC channel mask, reference mask and adjustment mask + * \param[in] MUXMask Mask comprising of an ADC channel mask, reference mask and adjustment mask. */ static inline void ADC_StartReading(const uint16_t MUXMask) { @@ -361,7 +361,7 @@ * to \ref ADC_StartReading() to select the channel and begin the automated conversions, and * the results read directly from the \ref ADC_GetResult() instead to reduce overhead. * - * \param[in] MUXMask Mask comprising of an ADC channel mask, reference mask and adjustment mask + * \param[in] MUXMask Mask comprising of an ADC channel mask, reference mask and adjustment mask. */ static inline uint16_t ADC_GetChannelReading(const uint16_t MUXMask) ATTR_WARN_UNUSED_RESULT; static inline uint16_t ADC_GetChannelReading(const uint16_t MUXMask) diff --git a/LUFA/Drivers/Peripheral/SPI.h b/LUFA/Drivers/Peripheral/SPI.h index 195818a24..d66e9fe24 100644 --- a/LUFA/Drivers/Peripheral/SPI.h +++ b/LUFA/Drivers/Peripheral/SPI.h @@ -111,7 +111,7 @@ * SPI routines. * * \param[in] SPIOptions SPI Options, a mask consisting of one of each of the SPI_SPEED_*, - * SPI_SCK_*, SPI_SAMPLE_* and SPI_MODE_* masks + * SPI_SCK_*, SPI_SAMPLE_* and SPI_MODE_* masks. */ static inline void SPI_Init(const uint8_t SPIOptions) { @@ -138,9 +138,9 @@ /** Sends and receives a byte through the SPI interface, blocking until the transfer is complete. * - * \param[in] Byte Byte to send through the SPI interface + * \param[in] Byte Byte to send through the SPI interface. * - * \return Response byte from the attached SPI device + * \return Response byte from the attached SPI device. */ static inline uint8_t SPI_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; static inline uint8_t SPI_TransferByte(const uint8_t Byte) @@ -153,7 +153,7 @@ /** Sends a byte through the SPI interface, blocking until the transfer is complete. The response * byte sent to from the attached SPI device is ignored. * - * \param[in] Byte Byte to send through the SPI interface + * \param[in] Byte Byte to send through the SPI interface. */ static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; static inline void SPI_SendByte(const uint8_t Byte) @@ -165,7 +165,7 @@ /** Sends a dummy byte through the SPI interface, blocking until the transfer is complete. The response * byte from the attached SPI device is returned. * - * \return The response byte from the attached SPI device + * \return The response byte from the attached SPI device. */ static inline uint8_t SPI_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; static inline uint8_t SPI_ReceiveByte(void) diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h index 5abc6e00f..7501c61b9 100644 --- a/LUFA/Drivers/Peripheral/Serial.h +++ b/LUFA/Drivers/Peripheral/Serial.h @@ -80,7 +80,7 @@ #if defined(__DOXYGEN__) /** Indicates whether a character has been received through the USART. * - * \return Boolean true if a character has been received, false otherwise + * \return Boolean true if a character has been received, false otherwise. */ static inline bool Serial_IsCharReceived(void); #else @@ -90,13 +90,13 @@ /* Function Prototypes: */ /** Transmits a given string located in program space (FLASH) through the USART. * - * \param[in] FlashStringPtr Pointer to a string located in program space + * \param[in] FlashStringPtr Pointer to a string located in program space. */ void Serial_TxString_P(const char *FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1); /** Transmits a given string located in SRAM memory through the USART. * - * \param[in] StringPtr Pointer to a string located in SRAM space + * \param[in] StringPtr Pointer to a string located in SRAM space. */ void Serial_TxString(const char *StringPtr) ATTR_NON_NULL_PTR_ARG(1); @@ -104,8 +104,8 @@ /** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to * standard 8-bit, no parity, 1 stop bit settings suitable for most applications. * - * \param[in] BaudRate Serial baud rate, in bits per second - * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate + * \param[in] BaudRate Serial baud rate, in bits per second. + * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate. */ static inline void Serial_Init(const uint32_t BaudRate, const bool DoubleSpeed) { @@ -134,7 +134,7 @@ /** Transmits a given byte through the USART. * - * \param[in] DataByte Byte to transmit through the USART + * \param[in] DataByte Byte to transmit through the USART. */ static inline void Serial_TxByte(const char DataByte) { @@ -144,7 +144,7 @@ /** Receives a byte from the USART. * - * \return Byte received from the USART + * \return Byte received from the USART. */ static inline char Serial_RxByte(void) { diff --git a/LUFA/Drivers/Peripheral/SerialStream.h b/LUFA/Drivers/Peripheral/SerialStream.h index 83c3036d3..e5d4796be 100644 --- a/LUFA/Drivers/Peripheral/SerialStream.h +++ b/LUFA/Drivers/Peripheral/SerialStream.h @@ -84,8 +84,8 @@ /** Initializes the serial stream (and regular USART driver) so that both the stream and regular * USART driver functions can be used. Must be called before any stream or regular USART functions. * - * \param[in] BaudRate Baud rate to configure the USART to - * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate + * \param[in] BaudRate Baud rate to configure the USART to. + * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate. */ static inline void SerialStream_Init(const uint32_t BaudRate, const bool DoubleSpeed) { diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h index 7b9e9f5da..eb2e95b65 100644 --- a/LUFA/Drivers/USB/Class/Common/Audio.h +++ b/LUFA/Drivers/USB/Class/Common/Audio.h @@ -79,22 +79,22 @@ /** Descriptor header constant to indicate a Audio class endpoint descriptor. */ #define DTYPE_AudioEndpoint 0x25 - /** Audio class descriptor subtype value for a Audio class specific header descriptor. */ + /** Audio class descriptor subtype value for a Audio class-specific header descriptor. */ #define DSUBTYPE_Header 0x01 - /** Audio class descriptor subtype value for an Output Terminal Audio class specific descriptor. */ + /** Audio class descriptor subtype value for an Output Terminal Audio class-specific descriptor. */ #define DSUBTYPE_InputTerminal 0x02 - /** Audio class descriptor subtype value for an Input Terminal Audio class specific descriptor. */ + /** Audio class descriptor subtype value for an Input Terminal Audio class-specific descriptor. */ #define DSUBTYPE_OutputTerminal 0x03 - /** Audio class descriptor subtype value for a Feature Unit Audio class specific descriptor. */ + /** Audio class descriptor subtype value for a Feature Unit Audio class-specific descriptor. */ #define DSUBTYPE_FeatureUnit 0x06 - /** Audio class descriptor subtype value for a general Audio class specific descriptor. */ + /** Audio class descriptor subtype value for a general Audio class-specific descriptor. */ #define DSUBTYPE_General 0x01 - /** Audio class descriptor subtype value for an Audio class specific descriptor indicating the format of an audio stream. */ + /** Audio class descriptor subtype value for an Audio class-specific descriptor indicating the format of an audio stream. */ #define DSUBTYPE_Format 0x02 /** Supported channel mask for an Audio class terminal descriptor. See the Audio class specification for more details. */ @@ -225,175 +225,175 @@ */ #define AUDIO_SAMPLE_FREQ(freq) {LowWord: ((uint32_t)freq & 0x00FFFF), HighByte: (((uint32_t)freq >> 16) & 0x0000FF)} - /** Mask for the attributes parameter of an Audio class specific Endpoint descriptor, indicating that the endpoint + /** Mask for the attributes parameter of an Audio class-specific Endpoint descriptor, indicating that the endpoint * accepts only filled endpoint packets of audio samples. */ #define EP_ACCEPTS_ONLY_FULL_PACKETS (1 << 7) - /** Mask for the attributes parameter of an Audio class specific Endpoint descriptor, indicating that the endpoint + /** Mask for the attributes parameter of an Audio class-specific Endpoint descriptor, indicating that the endpoint * will accept partially filled endpoint packets of audio samples. */ #define EP_ACCEPTS_SMALL_PACKETS (0 << 7) /* Type Defines: */ - /** \brief Audio Class Specific Interface Descriptor. + /** \brief Audio class-specific Interface Descriptor. * - * Type define for an Audio class specific interface descriptor. This follows a regular interface descriptor to + * Type define for an Audio class-specific interface descriptor. This follows a regular interface descriptor to * supply extra information about the audio device's layout to the host. See the USB Audio specification for more * details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint16_t ACSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version */ - uint16_t TotalLength; /**< Total length of the Audio class specific descriptors, including this descriptor */ + uint16_t ACSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version. */ + uint16_t TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */ - uint8_t InCollection; /**< Total number of audio class interfaces within this device */ - uint8_t InterfaceNumbers[1]; /**< Interface numbers of each audio interface */ + uint8_t InCollection; /**< Total number of audio class interfaces within this device. */ + uint8_t InterfaceNumbers[1]; /**< Interface numbers of each audio interface. */ } USB_Audio_Interface_AC_t; - /** \brief Audio Class Specific Feature Unit Descriptor. + /** \brief Audio class-specific Feature Unit Descriptor. * - * Type define for an Audio class specific Feature Unit descriptor. This indicates to the host what features + * Type define for an Audio class-specific Feature Unit descriptor. This indicates to the host what features * are present in the device's audio stream for basic control, such as per-channel volume. See the USB Audio * specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t UnitID; /**< ID value of this feature unit - must be a unique value within the device */ - uint8_t SourceID; /**< Source ID value of the audio source input into this feature unit */ + uint8_t UnitID; /**< ID value of this feature unit - must be a unique value within the device. */ + uint8_t SourceID; /**< Source ID value of the audio source input into this feature unit. */ - uint8_t ControlSize; /**< Size of each element in the ChanelControlls array */ - uint8_t ChannelControls[3]; /**< Feature masks for the control channel, and each separate audio channel */ + uint8_t ControlSize; /**< Size of each element in the ChanelControlls array. */ + uint8_t ChannelControls[3]; /**< Feature masks for the control channel, and each separate audio channel. */ - uint8_t FeatureUnitStrIndex; /**< Index of a string descriptor describing this descriptor within the device */ + uint8_t FeatureUnitStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ } USB_Audio_FeatureUnit_t; - /** \brief Audio Class Specific Input Terminal Descriptor. + /** \brief Audio class-specific Input Terminal Descriptor. * - * Type define for an Audio class specific input terminal descriptor. This indicates to the host that the device + * Type define for an Audio class-specific input terminal descriptor. This indicates to the host that the device * contains an input audio source, either from a physical terminal on the device, or a logical terminal (for example, * a USB endpoint). See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t TerminalID; /**< ID value of this terminal unit - must be a unique value within the device */ - uint16_t TerminalType; /**< Type of terminal, a TERMINAL_* mask */ + uint8_t TerminalID; /**< ID value of this terminal unit - must be a unique value within the device. */ + uint16_t TerminalType; /**< Type of terminal, a TERMINAL_* mask. */ uint8_t AssociatedOutputTerminal; /**< ID of associated output terminal, for physically grouped terminals - * such as the speaker and microphone of a phone handset + * such as the speaker and microphone of a phone handset. */ uint8_t TotalChannels; /**< Total number of separate audio channels within this interface (right, left, etc.) */ - uint16_t ChannelConfig; /**< CHANNEL_* masks indicating what channel layout is supported by this terminal */ + uint16_t ChannelConfig; /**< CHANNEL_* masks indicating what channel layout is supported by this terminal. */ - uint8_t ChannelStrIndex; /**< Index of a string descriptor describing this channel within the device */ - uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */ + uint8_t ChannelStrIndex; /**< Index of a string descriptor describing this channel within the device. */ + uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ } USB_Audio_InputTerminal_t; - /** \brief Audio Class Specific Output Terminal Descriptor. + /** \brief Audio class-specific Output Terminal Descriptor. * - * Type define for an Audio class specific output terminal descriptor. This indicates to the host that the device + * Type define for an Audio class-specific output terminal descriptor. This indicates to the host that the device * contains an output audio sink, either to a physical terminal on the device, or a logical terminal (for example, * a USB endpoint). See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t TerminalID; /**< ID value of this terminal unit - must be a unique value within the device */ - uint16_t TerminalType; /**< Type of terminal, a TERMINAL_* mask */ + uint8_t TerminalID; /**< ID value of this terminal unit - must be a unique value within the device. */ + uint16_t TerminalType; /**< Type of terminal, a TERMINAL_* mask. */ uint8_t AssociatedInputTerminal; /**< ID of associated input terminal, for physically grouped terminals - * such as the speaker and microphone of a phone handset + * such as the speaker and microphone of a phone handset. */ - uint8_t SourceID; /**< ID value of the unit this terminal's audio is sourced from */ + uint8_t SourceID; /**< ID value of the unit this terminal's audio is sourced from. */ - uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */ + uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ } USB_Audio_OutputTerminal_t; - /** \brief Audio Class Specific Streaming Audio Interface Descriptor. + /** \brief Audio class-specific Streaming Audio Interface Descriptor. * - * Type define for an Audio class specific streaming interface descriptor. This indicates to the host + * Type define for an Audio class-specific streaming interface descriptor. This indicates to the host * how audio streams within the device are formatted. See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t TerminalLink; /**< ID value of the output terminal this descriptor is describing */ + uint8_t TerminalLink; /**< ID value of the output terminal this descriptor is describing. */ - uint8_t FrameDelay; /**< Delay in frames resulting from the complete sample processing from input to output */ - uint16_t AudioFormat; /**< Format of the audio stream, see Audio Device Formats specification */ + uint8_t FrameDelay; /**< Delay in frames resulting from the complete sample processing from input to output. */ + uint16_t AudioFormat; /**< Format of the audio stream, see Audio Device Formats specification. */ } USB_Audio_Interface_AS_t; /** \brief 24-Bit Audio Frequency Structure. * * Type define for a 24bit audio sample frequency structure. GCC does not contain a built in 24bit datatype, - * this this structure is used to build up the value instead. Fill this structure with the SAMPLE_FREQ() macro. + * this this structure is used to build up the value instead. Fill this structure with the \ref AUDIO_SAMPLE_FREQ() macro. */ typedef struct { - uint16_t LowWord; /**< Low 16 bits of the 24-bit value */ - uint8_t HighByte; /**< Upper 8 bits of the 24-bit value */ + uint16_t LowWord; /**< Low 16 bits of the 24-bit value. */ + uint8_t HighByte; /**< Upper 8 bits of the 24-bit value. */ } USB_Audio_SampleFreq_t; - /** \brief Audio Class Specific Format Descriptor. + /** \brief Audio class-specific Format Descriptor. * - * Type define for an Audio class specific audio format descriptor. This is used to give the host full details + * Type define for an Audio class-specific audio format descriptor. This is used to give the host full details * about the number of channels, the sample resolution, acceptable sample frequencies and encoding method used * in the device's audio streams. See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t FormatType; /**< Format of the audio stream, see Audio Device Formats specification */ - uint8_t Channels; /**< Total number of discrete channels in the stream */ + uint8_t FormatType; /**< Format of the audio stream, see Audio Device Formats specification. */ + uint8_t Channels; /**< Total number of discrete channels in the stream. */ - uint8_t SubFrameSize; /**< Size in bytes of each channel's sample data in the stream */ - uint8_t BitResolution; /**< Bits of resolution of each channel's samples in the stream */ + uint8_t SubFrameSize; /**< Size in bytes of each channel's sample data in the stream. */ + uint8_t BitResolution; /**< Bits of resolution of each channel's samples in the stream. */ - uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device */ - USB_Audio_SampleFreq_t SampleFrequencies[AUDIO_TOTAL_SAMPLE_RATES]; /**< Sample frequencies supported by the device */ + uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device. */ + USB_Audio_SampleFreq_t SampleFrequencies[AUDIO_TOTAL_SAMPLE_RATES]; /**< Sample frequencies supported by the device. */ } USB_Audio_Format_t; - /** \brief Audio Class Specific Streaming Endpoint Descriptor. + /** \brief Audio class-specific Streaming Endpoint Descriptor. * - * Type define for an Audio class specific endpoint descriptor. This contains a regular endpoint - * descriptor with a few Audio-class specific extensions. See the USB Audio specification for more details. + * Type define for an Audio class-specific endpoint descriptor. This contains a regular endpoint + * descriptor with a few Audio-class-specific extensions. See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Endpoint_t Endpoint; /**< Standard endpoint descriptor describing the audio endpoint */ + USB_Descriptor_Endpoint_t Endpoint; /**< Standard endpoint descriptor describing the audio endpoint. */ - uint8_t Refresh; /**< Always set to zero */ - uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronization information to, if needed (zero otherwise) */ + uint8_t Refresh; /**< Always set to zero for Audio class devices. */ + uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronization information to, if needed (zero otherwise). */ } USB_Audio_StreamEndpoint_Std_t; - /** \brief Audio Class Specific Extended Endpoint Descriptor. + /** \brief Audio class-specific Extended Endpoint Descriptor. * - * Type define for an Audio class specific extended endpoint descriptor. This contains extra information + * Type define for an Audio class-specific extended endpoint descriptor. This contains extra information * on the usage of endpoints used to stream audio in and out of the USB Audio device, and follows an Audio - * class specific extended endpoint descriptor. See the USB Audio specification for more details. + * class-specific extended endpoint descriptor. See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t Attributes; /**< Audio class specific endpoint attributes, such as ACCEPTS_SMALL_PACKETS */ + uint8_t Attributes; /**< Audio class-specific endpoint attributes, such as ACCEPTS_SMALL_PACKETS. */ - uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification */ - uint16_t LockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry */ + uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification. */ + uint16_t LockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry. */ } USB_Audio_StreamEndpoint_Spc_t; /* Disable C linkage for C++ Compilers: */ diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h index b6ab82a81..c41907f08 100644 --- a/LUFA/Drivers/USB/Class/Common/CDC.h +++ b/LUFA/Drivers/USB/Class/Common/CDC.h @@ -66,22 +66,22 @@ #endif /* Macros: */ - /** CDC Class specific request to get the current virtual serial port configuration settings. */ + /** CDC class-specific request to get the current virtual serial port configuration settings. */ #define REQ_GetLineEncoding 0x21 - /** CDC Class specific request to set the current virtual serial port configuration settings. */ + /** CDC class-specific request to set the current virtual serial port configuration settings. */ #define REQ_SetLineEncoding 0x20 - /** CDC Class specific request to set the current virtual serial port handshake line states. */ + /** CDC class-specific request to set the current virtual serial port handshake line states. */ #define REQ_SetControlLineState 0x22 - /** CDC Class specific request to send a break to the receiver via the carrier channel. */ + /** CDC class-specific request to send a break to the receiver via the carrier channel. */ #define REQ_SendBreak 0x23 - /** CDC Class specific request to send an encapsulated command to the device. */ + /** CDC class-specific request to send an encapsulated command to the device. */ #define REQ_SendEncapsulatedCommand 0x00 - /** CDC Class specific request to retrieve an encapsulated command response from the device. */ + /** CDC class-specific request to retrieve an encapsulated command response from the device. */ #define REQ_GetEncapsulatedResponse 0x01 /** Notification type constant for a change in the virtual serial port handshake line states, for @@ -90,47 +90,47 @@ */ #define NOTIF_SerialState 0x20 - /** Mask for the DTR handshake line for use with the REQ_SetControlLineState class specific request + /** Mask for the DTR handshake line for use with the REQ_SetControlLineState class-specific request * from the host, to indicate that the DTR line state should be high. */ #define CDC_CONTROL_LINE_OUT_DTR (1 << 0) - /** Mask for the RTS handshake line for use with the REQ_SetControlLineState class specific request + /** Mask for the RTS handshake line for use with the REQ_SetControlLineState class-specific request * from the host, to indicate that theRTS line state should be high. */ #define CDC_CONTROL_LINE_OUT_RTS (1 << 1) - /** Mask for the DCD handshake line for use with the a NOTIF_SerialState class specific notification + /** Mask for the DCD handshake line for use with the a NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the DCD line state is currently high. */ #define CDC_CONTROL_LINE_IN_DCD (1 << 0) - /** Mask for the DSR handshake line for use with the a NOTIF_SerialState class specific notification + /** Mask for the DSR handshake line for use with the a NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the DSR line state is currently high. */ #define CDC_CONTROL_LINE_IN_DSR (1 << 1) - /** Mask for the BREAK handshake line for use with the a NOTIF_SerialState class specific notification + /** Mask for the BREAK handshake line for use with the a NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the BREAK line state is currently high. */ #define CDC_CONTROL_LINE_IN_BREAK (1 << 2) - /** Mask for the RING handshake line for use with the a NOTIF_SerialState class specific notification + /** Mask for the RING handshake line for use with the a NOTIF_SerialState class-specific notification * from the device to the host, to indicate that the RING line state is currently high. */ #define CDC_CONTROL_LINE_IN_RING (1 << 3) - /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host, + /** Mask for use with the a NOTIF_SerialState class-specific notification from the device to the host, * to indicate that a framing error has occurred on the virtual serial port. */ #define CDC_CONTROL_LINE_IN_FRAMEERROR (1 << 4) - /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host, + /** Mask for use with the a NOTIF_SerialState class-specific notification from the device to the host, * to indicate that a parity error has occurred on the virtual serial port. */ #define CDC_CONTROL_LINE_IN_PARITYERROR (1 << 5) - /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host, + /** Mask for use with the a NOTIF_SerialState class-specific notification from the device to the host, * to indicate that a data overrun error has occurred on the virtual serial port. */ #define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6) @@ -140,7 +140,7 @@ * a single typedef struct. A macro is used instead so that functional descriptors can be created * easily by specifying the size of the payload. This allows sizeof() to work correctly. * - * \param[in] DataSize Size in bytes of the CDC functional descriptor's data payload + * \param[in] DataSize Size in bytes of the CDC functional descriptor's data payload. */ #define CDC_FUNCTIONAL_DESCRIPTOR(DataSize) \ struct \ @@ -152,21 +152,21 @@ /* Enums: */ /** Enum for the possible line encoding formats of a virtual serial port. */ - enum CDC_LineCodingFormats_t + enum CDC_LineEncodingFormats_t { - CDC_LINEENCODING_OneStopBit = 0, /**< Each frame contains one stop bit */ - CDC_LINEENCODING_OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits */ - CDC_LINEENCODING_TwoStopBits = 2, /**< Each frame contains two stop bits */ + CDC_LINEENCODING_OneStopBit = 0, /**< Each frame contains one stop bit. */ + CDC_LINEENCODING_OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits. */ + CDC_LINEENCODING_TwoStopBits = 2, /**< Each frame contains two stop bits. */ }; /** Enum for the possible line encoding parity settings of a virtual serial port. */ - enum CDC_LineCodingParity_t + enum CDC_LineEncodingParity_t { - CDC_PARITY_None = 0, /**< No parity bit mode on each frame */ - CDC_PARITY_Odd = 1, /**< Odd parity bit mode on each frame */ - CDC_PARITY_Even = 2, /**< Even parity bit mode on each frame */ - CDC_PARITY_Mark = 3, /**< Mark parity bit mode on each frame */ - CDC_PARITY_Space = 4, /**< Space parity bit mode on each frame */ + CDC_PARITY_None = 0, /**< No parity bit mode on each frame. */ + CDC_PARITY_Odd = 1, /**< Odd parity bit mode on each frame. */ + CDC_PARITY_Even = 2, /**< Even parity bit mode on each frame. */ + CDC_PARITY_Mark = 3, /**< Mark parity bit mode on each frame. */ + CDC_PARITY_Space = 4, /**< Space parity bit mode on each frame. */ }; /* Disable C linkage for C++ Compilers: */ diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h index d7b6983b6..739a7ab33 100644 --- a/LUFA/Drivers/USB/Class/Common/HID.h +++ b/LUFA/Drivers/USB/Class/Common/HID.h @@ -61,22 +61,22 @@ #endif /* Macros: */ - /** HID Class Specific Request to get the current HID report from the device. */ + /** HID class-specific Request to get the current HID report from the device. */ #define REQ_GetReport 0x01 - /** HID Class Specific Request to get the current device idle count. */ + /** HID class-specific Request to get the current device idle count. */ #define REQ_GetIdle 0x02 - /** HID Class Specific Request to set the current HID report to the device. */ + /** HID class-specific Request to set the current HID report to the device. */ #define REQ_SetReport 0x09 - /** HID Class Specific Request to set the device's idle count. */ + /** HID class-specific Request to set the device's idle count. */ #define REQ_SetIdle 0x0A - /** HID Class Specific Request to get the current HID report protocol mode. */ + /** HID class-specific Request to get the current HID report protocol mode. */ #define REQ_GetProtocol 0x03 - /** HID Class Specific Request to set the current HID report protocol mode. */ + /** HID class-specific Request to set the current HID report protocol mode. */ #define REQ_SetProtocol 0x0B /** Descriptor header type value, to indicate a HID class HID descriptor. */ @@ -145,22 +145,22 @@ REPORT_ITEM_TYPE_Feature = 2, /**< Indicates that the item is a FEATURE report type. */ }; - /** \brief HID Class Specific HID Descriptor. + /** \brief HID class-specific HID Descriptor. * - * Type define for the HID class specific HID descriptor, to describe the HID device's specifications. Refer to the HID + * Type define for the HID class-specific HID descriptor, to describe the HID device's specifications. Refer to the HID * specification for details on the structure elements. */ typedef struct { - USB_Descriptor_Header_t Header; + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ - uint16_t HIDSpec; - uint8_t CountryCode; + uint16_t HIDSpec; /**< BCD encoded version that the HID descriptor and device complies to. */ + uint8_t CountryCode; /**< Country code of the localized device, or zero if universal. */ - uint8_t TotalReportDescriptors; + uint8_t TotalReportDescriptors; /**< Total number of HID report descriptors for the interface. */ - uint8_t HIDReportType; - uint16_t HIDReportLength; + uint8_t HIDReportType; /**< Type of HID report, set to \ref DTYPE_Report. */ + uint16_t HIDReportLength; /**< Length of the associated HID report descriptor, in bytes. */ } USB_HID_Descriptor_t; /** \brief Standard HID Boot Protocol Mouse Report. @@ -169,9 +169,9 @@ */ typedef struct { - uint8_t Button; /**< Button mask for currently pressed buttons in the mouse */ - int8_t X; /**< Current delta X movement of the mouse */ - int8_t Y; /**< Current delta Y movement on the mouse */ + uint8_t Button; /**< Button mask for currently pressed buttons in the mouse. */ + int8_t X; /**< Current delta X movement of the mouse. */ + int8_t Y; /**< Current delta Y movement on the mouse. */ } USB_MouseReport_Data_t; /** \brief Standard HID Boot Protocol Keyboard Report. @@ -181,10 +181,10 @@ typedef struct { uint8_t Modifier; /**< Keyboard modifier byte, indicating pressed modifier keys (a combination of - * HID_KEYBOARD_MODIFER_* masks) + * HID_KEYBOARD_MODIFER_* masks). */ - uint8_t Reserved; /**< Reserved for OEM use, always set to 0 */ - uint8_t KeyCode[6]; /**< Key codes of the currently pressed keys */ + uint8_t Reserved; /**< Reserved for OEM use, always set to 0. */ + uint8_t KeyCode[6]; /**< Key codes of the currently pressed keys. */ } USB_KeyboardReport_Data_t; /** Type define for the data type used to store HID report descriptor elements. */ diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h index 3ef523c69..688ef09b3 100644 --- a/LUFA/Drivers/USB/Class/Common/MIDI.h +++ b/LUFA/Drivers/USB/Class/Common/MIDI.h @@ -70,10 +70,10 @@ #endif /* Macros: */ - /** Audio class descriptor subtype value for a Audio class specific MIDI input jack descriptor. */ + /** Audio class descriptor subtype value for a Audio class-specific MIDI input jack descriptor. */ #define DSUBTYPE_InputJack 0x02 - /** Audio class descriptor subtype value for a Audio class specific MIDI output jack descriptor. */ + /** Audio class descriptor subtype value for a Audio class-specific MIDI output jack descriptor. */ #define DSUBTYPE_OutputJack 0x03 /** Audio class descriptor jack type value for an embedded (logical) MIDI input or output jack. */ @@ -94,75 +94,77 @@ /** Convenience macro. MIDI channels are numbered from 1-10 (natural numbers) however the logical channel * addresses are zero-indexed. This converts a natural MIDI channel number into the logical channel address. * - * \param[in] channel MIDI channel number to address + * \param[in] channel MIDI channel number to address. */ #define MIDI_CHANNEL(channel) ((channel) - 1) /* Type Defines: */ - /** \brief MIDI Class Specific Streaming Interface Descriptor. + /** \brief MIDI class-specific Streaming Interface Descriptor. * - * Type define for an Audio class specific MIDI streaming interface descriptor. This indicates to the host - * how MIDI the specification compliance of the device and the total length of the Audio class specific descriptors. + * Type define for an Audio class-specific MIDI streaming interface descriptor. This indicates to the host + * how MIDI the specification compliance of the device and the total length of the Audio class-specific descriptors. * See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint16_t AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version */ - uint16_t TotalLength; /**< Total length of the Audio class specific descriptors, including this descriptor */ + uint16_t AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class + * specification version. + */ + uint16_t TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */ } USB_MIDI_AudioInterface_AS_t; - /** \brief MIDI Class Specific Input Jack Descriptor. + /** \brief MIDI class-specific Input Jack Descriptor. * - * Type define for an Audio class specific MIDI IN jack. This gives information to the host on a MIDI input, either + * Type define for an Audio class-specific MIDI IN jack. This gives information to the host on a MIDI input, either * a physical input jack, or a logical jack (receiving input data internally, or from the host via an endpoint). */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t JackType; /**< Type of jack, one of the JACKTYPE_* mask values */ - uint8_t JackID; /**< ID value of this jack - must be a unique value within the device */ + uint8_t JackType; /**< Type of jack, one of the JACKTYPE_* mask values. */ + uint8_t JackID; /**< ID value of this jack - must be a unique value within the device. */ - uint8_t JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device */ + uint8_t JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ } USB_MIDI_In_Jack_t; - /** \brief MIDI Class Specific Output Jack Descriptor. + /** \brief MIDI class-specific Output Jack Descriptor. * - * Type define for an Audio class specific MIDI OUT jack. This gives information to the host on a MIDI output, either + * Type define for an Audio class-specific MIDI OUT jack. This gives information to the host on a MIDI output, either * a physical output jack, or a logical jack (sending output data internally, or to the host via an endpoint). */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t JackType; /**< Type of jack, one of the JACKTYPE_* mask values */ - uint8_t JackID; /**< ID value of this jack - must be a unique value within the device */ + uint8_t JackType; /**< Type of jack, one of the JACKTYPE_* mask values. */ + uint8_t JackID; /**< ID value of this jack - must be a unique value within the device. */ - uint8_t NumberOfPins; /**< Number of output channels within the jack, either physical or logical */ - uint8_t SourceJackID[1]; /**< ID of each output pin's source data jack */ - uint8_t SourcePinID[1]; /**< Pin number in the input jack of each output pin's source data */ + uint8_t NumberOfPins; /**< Number of output channels within the jack, either physical or logical. */ + uint8_t SourceJackID[1]; /**< ID of each output pin's source data jack. */ + uint8_t SourcePinID[1]; /**< Pin number in the input jack of each output pin's source data. */ - uint8_t JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device */ + uint8_t JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */ } USB_MIDI_Out_Jack_t; - /** \brief Audio Class Specific Jack Endpoint Descriptor. + /** \brief Audio class-specific Jack Endpoint Descriptor. * - * Type define for an Audio class specific extended MIDI jack endpoint descriptor. This contains extra information + * Type define for an Audio class-specific extended MIDI jack endpoint descriptor. This contains extra information * on the usage of MIDI endpoints used to stream MIDI events in and out of the USB Audio device, and follows an Audio - * class specific extended MIDI endpoint descriptor. See the USB Audio specification for more details. + * class-specific extended MIDI endpoint descriptor. See the USB Audio specification for more details. */ typedef struct { - USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length */ - uint8_t Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */ + USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */ + uint8_t Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */ - uint8_t TotalEmbeddedJacks; /**< Total number of jacks inside this endpoint */ - uint8_t AssociatedJackID[1]; /**< IDs of each jack inside the endpoint */ + uint8_t TotalEmbeddedJacks; /**< Total number of jacks inside this endpoint. */ + uint8_t AssociatedJackID[1]; /**< IDs of each jack inside the endpoint. */ } USB_MIDI_Jack_Endpoint_t; /** \brief MIDI Class Driver Event Packet. @@ -171,12 +173,12 @@ */ typedef struct { - unsigned char Command : 4; /**< Upper nibble of the MIDI command being sent or received in the event packet */ - unsigned char CableNumber : 4; /**< Virtual cable number of the event being sent or received in the given MIDI interface */ + unsigned char Command : 4; /**< Upper nibble of the MIDI command being sent or received in the event packet. */ + unsigned char CableNumber : 4; /**< Virtual cable number of the event being sent or received in the given MIDI interface. */ - uint8_t Data1; /**< First byte of data in the MIDI event */ - uint8_t Data2; /**< Second byte of data in the MIDI event */ - uint8_t Data3; /**< Third byte of data in the MIDI event */ + uint8_t Data1; /**< First byte of data in the MIDI event. */ + uint8_t Data2; /**< Second byte of data in the MIDI event. */ + uint8_t Data3; /**< Third byte of data in the MIDI event. */ } MIDI_EventPacket_t; /* Disable C linkage for C++ Compilers: */ diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h index 7bbb863dc..ade71a205 100644 --- a/LUFA/Drivers/USB/Class/Common/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h @@ -66,10 +66,10 @@ #endif /* Macros: */ - /** Mass Storage Class specific request to reset the Mass Storage interface, ready for the next command. */ + /** Mass Storage class-specific request to reset the Mass Storage interface, ready for the next command. */ #define REQ_MassStorageReset 0xFF - /** Mass Storage Class specific request to retrieve the total number of Logical Units (drives) in the SCSI device. */ + /** Mass Storage class-specific request to retrieve the total number of Logical Units (drives) in the SCSI device. */ #define REQ_GetMaxLUN 0xFE /** Magic signature for a Command Block Wrapper used in the Mass Storage Bulk-Only transport protocol. */ @@ -211,13 +211,13 @@ * Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */ typedef struct { - uint32_t Signature; /**< Command block signature, must be CBW_SIGNATURE to indicate a valid Command Block */ - uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper */ - uint32_t DataTransferLength; /**< Length of the optional data portion of the issued command, in bytes */ - uint8_t Flags; /**< Command block flags, indicating command data direction */ - uint8_t LUN; /**< Logical Unit number this command is issued to */ - uint8_t SCSICommandLength; /**< Length of the issued SCSI command within the SCSI command data array */ - uint8_t SCSICommandData[16]; /**< Issued SCSI command in the Command Block */ + uint32_t Signature; /**< Command block signature, must be CBW_SIGNATURE to indicate a valid Command Block. */ + uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper. */ + uint32_t DataTransferLength; /**< Length of the optional data portion of the issued command, in bytes. */ + uint8_t Flags; /**< Command block flags, indicating command data direction. */ + uint8_t LUN; /**< Logical Unit number this command is issued to. */ + uint8_t SCSICommandLength; /**< Length of the issued SCSI command within the SCSI command data array. */ + uint8_t SCSICommandData[16]; /**< Issued SCSI command in the Command Block. */ } MS_CommandBlockWrapper_t; /** \brief Mass Storage Class Command Status Wrapper. @@ -226,10 +226,10 @@ */ typedef struct { - uint32_t Signature; /**< Status block signature, must be CSW_SIGNATURE to indicate a valid Command Status */ - uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper */ - uint32_t DataTransferResidue; /**< Number of bytes of data not processed in the SCSI command */ - uint8_t Status; /**< Status code of the issued command - a value from the MassStorage_CommandStatusCodes_t enum */ + uint32_t Signature; /**< Status block signature, must be CSW_SIGNATURE to indicate a valid Command Status. */ + uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper. */ + uint32_t DataTransferResidue; /**< Number of bytes of data not processed in the SCSI command. */ + uint8_t Status; /**< Status code of the issued command - a value from the MassStorage_CommandStatusCodes_t enum. */ } MS_CommandStatusWrapper_t; /** \brief Mass Storage Class SCSI Sense Structure @@ -306,8 +306,10 @@ enum MassStorage_CommandStatusCodes_t { SCSI_Command_Pass = 0, /**< Command completed with no error */ - SCSI_Command_Fail = 1, /**< Command failed to complete - host may check the exact error via a SCSI REQUEST SENSE command */ - SCSI_Phase_Error = 2 /**< Command failed due to being invalid in the current phase */ + SCSI_Command_Fail = 1, /**< Command failed to complete - host may check the exact error via a + * SCSI REQUEST SENSE command. + */ + SCSI_Phase_Error = 2 /**< Command failed due to being invalid in the current phase. */ }; /* Disable C linkage for C++ Compilers: */ diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h index 9424b26a2..a6549c5e3 100644 --- a/LUFA/Drivers/USB/Class/Common/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h @@ -96,25 +96,25 @@ /** Enum for the possible NDIS adapter states. */ enum RNDIS_States_t { - RNDIS_Uninitialized = 0, /**< Adapter currently uninitialized */ - RNDIS_Initialized = 1, /**< Adapter currently initialized but not ready for data transfers */ - RNDIS_Data_Initialized = 2, /**< Adapter currently initialized and ready for data transfers */ + RNDIS_Uninitialized = 0, /**< Adapter currently uninitialized. */ + RNDIS_Initialized = 1, /**< Adapter currently initialized but not ready for data transfers. */ + RNDIS_Data_Initialized = 2, /**< Adapter currently initialized and ready for data transfers. */ }; /** Enum for the NDIS hardware states. */ enum NDIS_Hardware_Status_t { - NDIS_HardwareStatus_Ready, /**< Hardware Ready to accept commands from the host */ - NDIS_HardwareStatus_Initializing, /**< Hardware busy initializing */ - NDIS_HardwareStatus_Reset, /**< Hardware reset */ - NDIS_HardwareStatus_Closing, /**< Hardware currently closing */ - NDIS_HardwareStatus_NotReady /**< Hardware not ready to accept commands from the host */ + NDIS_HardwareStatus_Ready, /**< Hardware Ready to accept commands from the host. */ + NDIS_HardwareStatus_Initializing, /**< Hardware busy initializing. */ + NDIS_HardwareStatus_Reset, /**< Hardware reset. */ + NDIS_HardwareStatus_Closing, /**< Hardware currently closing. */ + NDIS_HardwareStatus_NotReady /**< Hardware not ready to accept commands from the host. */ }; /* Type Defines: */ /** \brief MAC Address Structure. * - * Type define for a physical MAC address of a device on a network + * Type define for a physical MAC address of a device on a network. */ typedef struct { @@ -127,9 +127,9 @@ */ typedef struct { - uint8_t FrameData[ETHERNET_FRAME_SIZE_MAX]; /**< Ethernet frame contents */ - uint16_t FrameLength; /**< Length in bytes of the Ethernet frame stored in the buffer */ - bool FrameInBuffer; /**< Indicates if a frame is currently stored in the buffer */ + uint8_t FrameData[ETHERNET_FRAME_SIZE_MAX]; /**< Ethernet frame contents. */ + uint16_t FrameLength; /**< Length in bytes of the Ethernet frame stored in the buffer. */ + bool FrameInBuffer; /**< Indicates if a frame is currently stored in the buffer. */ } Ethernet_Frame_Info_t; /** \brief RNDIS Common Message Header Structure. diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h index 7be75067d..434d65a1e 100644 --- a/LUFA/Drivers/USB/Class/Common/StillImage.h +++ b/LUFA/Drivers/USB/Class/Common/StillImage.h @@ -66,58 +66,58 @@ #endif /* Macros: */ - /** Length in bytes of a given Unicode string's character length + /** Length in bytes of a given Unicode string's character length. * - * \param[in] chars Total number of Unicode characters in the string + * \param[in] Chars Total number of Unicode characters in the string. * - * \return Number of bytes of the given unicode string + * \return Number of bytes of the given unicode string. */ - #define UNICODE_STRING_LENGTH(chars) ((chars) << 1) + #define UNICODE_STRING_LENGTH(Chars) ((Chars) << 1) /** Used in the DataLength field of a PIMA container, to give the total container size in bytes for * a command container. * - * \param[in] params Number of parameters which are to be sent in the Param field of the container + * \param[in] Params Number of parameters which are to be sent in the Param field of the container. */ - #define PIMA_COMMAND_SIZE(params) ((sizeof(SI_PIMA_Container_t) - 12) + \ - ((params) * sizeof(uint32_t))) + #define PIMA_COMMAND_SIZE(Params) ((sizeof(SI_PIMA_Container_t) - 12) + \ + ((Params) * sizeof(uint32_t))) /** Used in the DataLength field of a PIMA container, to give the total container size in bytes for * a data container. * - * \param[in] datalen Length in bytes of the data in the container + * \param[in] DataLen Length in bytes of the data in the container. */ - #define PIMA_DATA_SIZE(datalen) ((sizeof(SI_PIMA_Container_t) - 12) + \ - (datalen)) + #define PIMA_DATA_SIZE(DataLen) ((sizeof(SI_PIMA_Container_t) - 12) + \ + (DataLen)) /* Enums: */ /** Enum for the possible PIMA contains types. */ enum SI_PIMA_Container_Types_t { - CType_Undefined = 0, /**< Undefined container type */ - CType_CommandBlock = 1, /**< Command Block container type */ - CType_DataBlock = 2, /**< Data Block container type */ - CType_ResponseBlock = 3, /**< Response container type */ - CType_EventBlock = 4, /**< Event Block container type */ + CType_Undefined = 0, /**< Undefined container type. */ + CType_CommandBlock = 1, /**< Command Block container type. */ + CType_DataBlock = 2, /**< Data Block container type. */ + CType_ResponseBlock = 3, /**< Response container type. */ + CType_EventBlock = 4, /**< Event Block container type. */ }; /* Enums: */ /** Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device. */ enum SI_PIMA_ResponseCodes_t { - PIMA_RESPONSE_OK = 1, /**< Response code indicating no error in the issued command */ + PIMA_RESPONSE_OK = 1, /**< Response code indicating no error in the issued command. */ PIMA_RESPONSE_GeneralError = 2, /**< Response code indicating a general error while processing the - * issued command + * issued command. */ PIMA_RESPONSE_SessionNotOpen = 3, /**< Response code indicating that the sent command requires an open - * session before being issued + * session before being issued. */ - PIMA_RESPONSE_InvalidTransaction = 4, /**< Response code indicating an invalid transaction occurred */ + PIMA_RESPONSE_InvalidTransaction = 4, /**< Response code indicating an invalid transaction occurred. */ PIMA_RESPONSE_OperationNotSupported = 5, /**< Response code indicating that the issued command is not supported - * by the attached device + * by the attached device. */ PIMA_RESPONSE_ParameterNotSupported = 6, /**< Response code indicating that one or more of the issued command's - * parameters are not supported by the device + * parameters are not supported by the device. */ }; @@ -129,11 +129,11 @@ */ typedef struct { - uint32_t DataLength; /**< Length of the container and data, in bytes */ - uint16_t Type; /**< Container type, a value from the PIMA_Container_Types_t enum */ - uint16_t Code; /**< Command, event or response code of the container */ - uint32_t TransactionID; /**< Unique container ID to link blocks together */ - uint32_t Params[3]; /**< Block parameters to be issued along with the block code (command blocks only) */ + uint32_t DataLength; /**< Length of the container and data, in bytes. */ + uint16_t Type; /**< Container type, a value from the \ref SI_PIMA_Container_Types_t enum. */ + uint16_t Code; /**< Command, event or response code of the container. */ + uint32_t TransactionID; /**< Unique container ID to link blocks together. */ + uint32_t Params[3]; /**< Block parameters to be issued along with the block code (command blocks only). */ } SI_PIMA_Container_t; /* Disable C linkage for C++ Compilers: */ diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h index 73c293469..b51a8a025 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.h +++ b/LUFA/Drivers/USB/Class/Device/Audio.h @@ -82,21 +82,21 @@ const struct { uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this - * structure controls + * structure controls. */ uint8_t DataINEndpointNumber; /**< Endpoint number of the incoming Audio Streaming data, if available - * (zero if unused) + * (zero if unused). */ uint16_t DataINEndpointSize; /**< Size in bytes of the incoming Audio Streaming data endpoint, if available - * (zero if unused) + * (zero if unused). */ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing Audio Streaming data, if available - * (zero if unused) + * (zero if unused). */ uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing Audio Streaming data endpoint, if available - * (zero if unused) + * (zero if unused). */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. @@ -116,16 +116,16 @@ * \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration containing the * given Audio interface is selected. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. * - * \return Boolean true if the endpoints were successfully configured, false otherwise + * \return Boolean true if the endpoints were successfully configured, false otherwise. */ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Processes incoming control requests from the host, that are directed to the given Audio class interface. This should be * linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. */ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -133,7 +133,7 @@ /** General management task for a given Audio class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. */ static inline void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -148,9 +148,9 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. * - * \return Boolean true if the given Audio interface has a sample to be read, false otherwise + * \return Boolean true if the given Audio interface has a sample to be read, false otherwise. */ static inline bool Audio_Device_IsSampleReceived(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -169,9 +169,9 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. * - * \return Boolean true if the given Audio interface is ready to accept the next sample, false otherwise + * \return Boolean true if the given Audio interface is ready to accept the next sample, false otherwise. */ static inline bool Audio_Device_IsReadyForNextSample(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -189,9 +189,9 @@ * \pre This should be preceded immediately by a call to the \ref Audio_Device_IsSampleReceived() function to ensure * ensure the correct endpoint is selected and ready for data. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. * - * \return Signed 8-bit audio sample from the audio interface + * \return Signed 8-bit audio sample from the audio interface. */ static inline int8_t Audio_Device_ReadSample8(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -214,9 +214,9 @@ * \pre This should be preceded immediately by a call to the \ref Audio_Device_IsSampleReceived() function to ensure * that the correct endpoint is selected and ready for data. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. * - * \return Signed 16-bit audio sample from the audio interface + * \return Signed 16-bit audio sample from the audio interface. */ static inline int16_t Audio_Device_ReadSample16(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -239,9 +239,9 @@ * \pre This should be preceded immediately by a call to the \ref Audio_Device_IsSampleReceived() function to ensure * that the correct endpoint is selected and ready for data. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. * - * \return Signed 24-bit audio sample from the audio interface + * \return Signed 24-bit audio sample from the audio interface. */ static inline int32_t Audio_Device_ReadSample24(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -264,8 +264,8 @@ * \pre This should be preceded immediately by a call to the \ref Audio_Device_IsReadyForNextSample() function to * ensure that the correct endpoint is selected and ready for data. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state - * \param[in] Sample Signed 8-bit audio sample + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. + * \param[in] Sample Signed 8-bit audio sample. */ static inline void Audio_Device_WriteSample8(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, const int8_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -283,8 +283,8 @@ * \pre This should be preceded immediately by a call to the \ref Audio_Device_IsReadyForNextSample() function to * ensure that the correct endpoint is selected and ready for data. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state - * \param[in] Sample Signed 16-bit audio sample + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. + * \param[in] Sample Signed 16-bit audio sample. */ static inline void Audio_Device_WriteSample16(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, const int16_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; @@ -302,8 +302,8 @@ * \pre This should be preceded immediately by a call to the \ref Audio_Device_IsReadyForNextSample() function to * ensure that the correct endpoint is selected and ready for data. * - * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state - * \param[in] Sample Signed 24-bit audio sample + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. + * \param[in] Sample Signed 24-bit audio sample. */ static inline void Audio_Device_WriteSample24(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, const int32_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index bf08ecd39..37d940092 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -99,19 +99,19 @@ { const struct { - uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */ + uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */ - uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */ - uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */ - bool DataINEndpointDoubleBank; /**< Indicates if the CDC interface's IN data endpoint should use double banking */ + uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint. */ + uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint. */ + bool DataINEndpointDoubleBank; /**< Indicates if the CDC interface's IN data endpoint should use double banking. */ - uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */ - uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */ - bool DataOUTEndpointDoubleBank; /**< Indicates if the CDC interface's OUT data endpoint should use double banking */ + uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint. */ + uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint. */ + bool DataOUTEndpointDoubleBank; /**< Indicates if the CDC interface's OUT data endpoint should use double banking. */ - uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */ - uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */ - bool NotificationEndpointDoubleBank; /**< Indicates if the CDC interface's notification endpoint should use double banking */ + uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used. */ + uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used. */ + bool NotificationEndpointDoubleBank; /**< Indicates if the CDC interface's notification endpoint should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -130,14 +130,14 @@ struct { - uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */ + uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second. */ uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the - * CDCDevice_CDC_LineCodingFormats_t enum + * \ref CDC_LineEncodingFormats_t enum. */ uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the - * CDCDevice_LineCodingParity_t enum + * \ref CDC_LineEncodingParity_t enum. */ - uint8_t DataBits; /**< Bits of data per character of the virtual serial port */ + uint8_t DataBits; /**< Bits of data per character of the virtual serial port. */ } LineEncoding; /** Line encoding used in the virtual serial port, for the device's information. This is generally * only used if the virtual serial port data is to be reconstructed on a physical UART. */ @@ -151,23 +151,23 @@ * \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration containing * the given CDC interface is selected. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. * - * \return Boolean true if the endpoints were successfully configured, false otherwise + * \return Boolean true if the endpoints were successfully configured, false otherwise. */ bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Processes incoming control requests from the host, that are directed to the given CDC class interface. This should be * linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. */ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** General management task for a given CDC class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. */ void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -176,7 +176,7 @@ * user program by declaring a handler function with the same name and parameters listed here. The new line encoding * settings are available in the LineEncoding structure inside the CDC interface structure passed as a parameter. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. */ void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -186,15 +186,15 @@ * are available in the ControlLineStates.HostToDevice value inside the CDC interface structure passed as a parameter, set as * a mask of CDC_CONTROL_LINE_OUT_* masks. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. */ void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** CDC class driver event for a send break request sent to the device from the host. This is generally used to separate * data or to indicate a special condition to the receiving device. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in] Duration Duration of the break that has been sent by the host, in milliseconds + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in] Duration Duration of the break that has been sent by the host, in milliseconds. */ void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1); @@ -206,11 +206,11 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in] Data Pointer to the string to send to the host - * \param[in] Length Size in bytes of the string to send to the host + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in] Data Pointer to the string to send to the host. + * \param[in] Length Size in bytes of the string to send to the host. * - * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, char* const Data, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -223,10 +223,10 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in] Data Byte of data to send to the host + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in] Data Byte of data to send to the host. * - * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum + * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum. */ uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1); @@ -235,9 +235,9 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. * - * \return Total number of buffered bytes received from the host + * \return Total number of buffered bytes received from the host. */ uint16_t CDC_Device_BytesReceived(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -248,9 +248,9 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. * - * \return Next received byte from the host, or 0 if no data received + * \return Next received byte from the host, or 0 if no data received. */ uint8_t CDC_Device_ReceiveByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -259,9 +259,9 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. * - * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum + * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum. */ uint8_t CDC_Device_Flush(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -273,7 +273,7 @@ * \pre This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or * the call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. */ void CDC_Device_SendControlLineStateChange(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -289,8 +289,8 @@ * \note The created stream can be given as stdout if desired to direct the standard output from all functions * to the given CDC interface. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed. */ void CDC_Device_CreateStream(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo, FILE* Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -298,8 +298,8 @@ /** Identical to CDC_Device_CreateStream(), except that reads are blocking until the calling stream function terminates * the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed. */ void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo, FILE* Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h index d5194d12c..f26b325ba 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.h +++ b/LUFA/Drivers/USB/Class/Device/HID.h @@ -85,11 +85,11 @@ { const struct { - uint8_t InterfaceNumber; /**< Interface number of the HID interface within the device */ + uint8_t InterfaceNumber; /**< Interface number of the HID interface within the device. */ - uint8_t ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint */ - uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint */ - bool ReportINEndpointDoubleBank; /**< Indicates if the HID interface's IN report endpoint should use double banking */ + uint8_t ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint. */ + uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint. */ + bool ReportINEndpointDoubleBank; /**< Indicates if the HID interface's IN report endpoint should use double banking. */ void* PrevReportINBuffer; /**< Pointer to a buffer where the previously created HID input report can be * stored by the driver, for comparison purposes to detect report changes that @@ -114,10 +114,10 @@ */ struct { - bool UsingReportProtocol; /**< Indicates if the HID interface is set to Boot or Report protocol mode */ - uint16_t IdleCount; /**< Report idle period, in milliseconds, set by the host */ + bool UsingReportProtocol; /**< Indicates if the HID interface is set to Boot or Report protocol mode. */ + uint16_t IdleCount; /**< Report idle period, in milliseconds, set by the host. */ uint16_t IdleMSRemaining; /**< Total number of milliseconds remaining before the idle period elapsed - this - * should be decremented by the user application if non-zero each millisecond */ + * should be decremented by the user application if non-zero each millisecond. */ } State; /**< State data for the USB class interface within the device. All elements in this section * are reset to their defaults when the interface is enumerated. */ @@ -128,23 +128,23 @@ * \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration * containing the given HID interface is selected. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. * - * \return Boolean true if the endpoints were successfully configured, false otherwise + * \return Boolean true if the endpoints were successfully configured, false otherwise. */ bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Processes incoming control requests from the host, that are directed to the given HID class interface. This should be * linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. */ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** General management task for a given HID class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. */ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -152,16 +152,16 @@ * HID class control requests from the host, or by the normal HID endpoint polling procedure. Inside this callback the * user is responsible for the creation of the next HID input report to be sent to the host. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. * \param[in,out] ReportID If preset to a non-zero value, this is the report ID being requested by the host. If zero, * this should be set to the report ID of the generated HID input report (if any). If multiple * reports are not sent via the given HID interface, this parameter should be ignored. - * \param[in] ReportType Type of HID report to generate, either \ref REPORT_ITEM_TYPE_In or \ref REPORT_ITEM_TYPE_Feature - * \param[out] ReportData Pointer to a buffer where the generated HID report should be stored - * \param[out] ReportSize Number of bytes in the generated input report, or zero if no report is to be sent + * \param[in] ReportType Type of HID report to generate, either \ref REPORT_ITEM_TYPE_In or \ref REPORT_ITEM_TYPE_Feature. + * \param[out] ReportData Pointer to a buffer where the generated HID report should be stored. + * \param[out] ReportSize Number of bytes in the generated input report, or zero if no report is to be sent. * * \return Boolean true to force the sending of the report even if it is identical to the previous report and still within - * the idle period (useful for devices which report relative movement), false otherwise + * the idle period (useful for devices which report relative movement), false otherwise. */ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, const uint8_t ReportType, void* ReportData, uint16_t* ReportSize) ATTR_NON_NULL_PTR_ARG(1) @@ -171,10 +171,10 @@ * either HID class control requests from the host, or by the normal HID endpoint polling procedure. Inside this callback * the user is responsible for the processing of the received HID output report from the host. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. * \param[in] ReportID Report ID of the received output report. If multiple reports are not received via the given HID * interface, this parameter should be ignored. - * \param[in] ReportType Type of received HID report, either \ref REPORT_ITEM_TYPE_Out or \ref REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of received HID report, either \ref REPORT_ITEM_TYPE_Out or \ref REPORT_ITEM_TYPE_Feature. * \param[in] ReportData Pointer to a buffer where the received HID report is stored. * \param[in] ReportSize Size in bytes of the received report from the host. */ @@ -186,9 +186,9 @@ /** Indicates that a millisecond of idle time has elapsed on the given HID interface, and the interface's idle count should be * decremented. This should be called once per millisecond so that hardware key-repeats function correctly. It is recommended * that this be called by the \ref EVENT_USB_Device_StartOfFrame() event, once SOF events have been enabled via - * \ref USB_Device_EnableSOFEvents();. + * \ref USB_Device_EnableSOFEvents(). * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. */ static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1); static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index b365b55fd..5f7f101be 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -81,15 +81,15 @@ { const struct { - uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls */ + uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls. */ - uint8_t DataINEndpointNumber; /**< Endpoint number of the incoming MIDI data, if available (zero if unused) */ - uint16_t DataINEndpointSize; /**< Size in bytes of the incoming MIDI data endpoint, if available (zero if unused) */ - bool DataINEndpointDoubleBank; /**< Indicates if the MIDI interface's IN data endpoint should use double banking */ + uint8_t DataINEndpointNumber; /**< Endpoint number of the incoming MIDI data, if available (zero if unused). */ + uint16_t DataINEndpointSize; /**< Size in bytes of the incoming MIDI data endpoint, if available (zero if unused). */ + bool DataINEndpointDoubleBank; /**< Indicates if the MIDI interface's IN data endpoint should use double banking. */ - uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused) */ - uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused) */ - bool DataOUTEndpointDoubleBank; /**< Indicates if the MIDI interface's IN data endpoint should use double banking */ + uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused). */ + uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused). */ + bool DataOUTEndpointDoubleBank; /**< Indicates if the MIDI interface's IN data endpoint should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -106,9 +106,9 @@ * \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration * containing the given MIDI interface is selected. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. * - * \return Boolean true if the endpoints were successfully configured, false otherwise + * \return Boolean true if the endpoints were successfully configured, false otherwise. */ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -119,10 +119,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state - * \param[in] Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. + * \param[in] Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send. * - * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -131,9 +131,9 @@ /** Flushes the MIDI send buffer, sending any queued MIDI events to the host. This should be called to override the * \ref MIDI_Device_SendEventPacket() function's packing behavior, to flush queued events. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. * - * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum + * \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum. */ uint8_t MIDI_Device_Flush(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -143,10 +143,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state - * \param[out] Event Pointer to a USB_MIDI_EventPacket_t structure where the received MIDI event is to be placed + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. + * \param[out] Event Pointer to a USB_MIDI_EventPacket_t structure where the received MIDI event is to be placed. * - * \return Boolean true if a MIDI event packet was received, false otherwise + * \return Boolean true if a MIDI event packet was received, false otherwise. */ bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -155,7 +155,7 @@ /** General management task for a given MIDI class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. */ static inline void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); static inline void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) @@ -166,7 +166,7 @@ /** Processes incoming control requests from the host, that are directed to the given MIDI class interface. This should be * linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. */ static inline void MIDI_Device_ProcessControlRequest(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); static inline void MIDI_Device_ProcessControlRequest(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h index 6b8558b82..4a9450e53 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h @@ -81,30 +81,30 @@ { const struct { - uint8_t InterfaceNumber; /**< Interface number of the Mass Storage interface within the device */ + uint8_t InterfaceNumber; /**< Interface number of the Mass Storage interface within the device. */ - uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint */ - uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint */ - bool DataINEndpointDoubleBank; /**< Indicates if the Mass Storage interface's IN data endpoint should use double banking */ + uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint. */ + uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint. */ + bool DataINEndpointDoubleBank; /**< Indicates if the Mass Storage interface's IN data endpoint should use double banking. */ - uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint */ - uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint */ - bool DataOUTEndpointDoubleBank; /**< Indicates if the Mass Storage interface's OUT data endpoint should use double banking */ + uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint. */ + uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint. */ + bool DataOUTEndpointDoubleBank; /**< Indicates if the Mass Storage interface's OUT data endpoint should use double banking. */ - uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface */ + uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ struct { MS_CommandBlockWrapper_t CommandBlock; /**< Mass Storage class command block structure, stores the received SCSI - * command from the host which is to be processed + * command from the host which is to be processed. */ MS_CommandStatusWrapper_t CommandStatus; /**< Mass Storage class command status structure, set elements to indicate - * the issued command's success or failure to the host + * the issued command's success or failure to the host. */ volatile bool IsMassStoreReset; /**< Flag indicating that the host has requested that the Mass Storage interface be reset - * and that all current Mass Storage operations should immediately abort + * and that all current Mass Storage operations should immediately abort. */ } State; /**< State data for the USB class interface within the device. All elements in this section * are reset to their defaults when the interface is enumerated. @@ -116,23 +116,23 @@ * \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration * containing the given Mass Storage interface is selected. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state. * - * \return Boolean true if the endpoints were successfully configured, false otherwise + * \return Boolean true if the endpoints were successfully configured, false otherwise. */ bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Processes incoming control requests from the host, that are directed to the given Mass Storage class interface. This should be * linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state. */ void MS_Device_ProcessControlRequest(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** General management task for a given Mass Storage class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage configuration and state + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage configuration and state. */ void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -141,9 +141,9 @@ * for the processing of the received SCSI command from the host. The SCSI command is available in the CommandBlock structure * inside the Mass Storage class state structure passed as a parameter to the callback function. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state. * - * \return Boolean true if the SCSI command was successfully processed, false otherwise + * \return Boolean true if the SCSI command was successfully processed, false otherwise. */ bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h index 93a799863..0d80ee706 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h @@ -81,38 +81,38 @@ { const struct { - uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */ + uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */ - uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */ - uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */ - bool DataINEndpointDoubleBank; /**< Indicates if the RNDIS interface's IN data endpoint should use double banking */ + uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint. */ + uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint. */ + bool DataINEndpointDoubleBank; /**< Indicates if the RNDIS interface's IN data endpoint should use double banking. */ - uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */ - uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */ - bool DataOUTEndpointDoubleBank; /**< Indicates if the RNDIS interface's OUT data endpoint should use double banking */ + uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint. */ + uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint. */ + bool DataOUTEndpointDoubleBank; /**< Indicates if the RNDIS interface's OUT data endpoint should use double banking. */ - uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */ - uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */ - bool NotificationEndpointDoubleBank; /**< Indicates if the RNDIS interface's notification endpoint should use double banking */ + uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used. */ + uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used. */ + bool NotificationEndpointDoubleBank; /**< Indicates if the RNDIS interface's notification endpoint should use double banking. */ - char* AdapterVendorDescription; /**< String description of the adapter vendor */ - MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */ - } Config; /**< Config data for the USB class interface within the device. All elements in this section + char* AdapterVendorDescription; /**< String description of the adapter vendor. */ + MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter. */ + } Config; /**< Config data for the USB class interface within the device. All elements in this section. * must be set or the interface will fail to enumerate and operate correctly. */ struct { uint8_t RNDISMessageBuffer[RNDIS_MESSAGE_BUFFER_SIZE]; /**< Buffer to hold RNDIS messages to and from the host, - * managed by the class driver + * managed by the class driver. */ - bool ResponseReady; /**< Internal flag indicating if a RNDIS message is waiting to be returned to the host */ - uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the RNDIS_States_t enum */ - uint32_t CurrPacketFilter; /**< Current packet filter mode, used internally by the class driver */ + bool ResponseReady; /**< Internal flag indicating if a RNDIS message is waiting to be returned to the host. */ + uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the RNDIS_States_t enum. */ + uint32_t CurrPacketFilter; /**< Current packet filter mode, used internally by the class driver. */ Ethernet_Frame_Info_t FrameIN; /**< Structure holding the last received Ethernet frame from the host, for user - * processing + * processing. */ Ethernet_Frame_Info_t FrameOUT; /**< Structure holding the next Ethernet frame to send to the host, populated by the - * user application + * user application. */ } State; /**< State data for the USB class interface within the device. All elements in this section * are reset to their defaults when the interface is enumerated. @@ -124,23 +124,23 @@ * \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration * containing the given HID interface is selected. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing a RNDIS Class configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing a RNDIS Class configuration and state. * - * \return Boolean true if the endpoints were successfully configured, false otherwise + * \return Boolean true if the endpoints were successfully configured, false otherwise. */ bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Processes incoming control requests from the host, that are directed to the given RNDIS class interface. This should be * linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing a RNDIS Class configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing a RNDIS Class configuration and state. */ void RNDIS_Device_ProcessControlRequest(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** General management task for a given HID class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing a RNDIS Class configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing a RNDIS Class configuration and state. */ void RNDIS_Device_USBTask(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h index 72148faad..77d3edc82 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.h +++ b/LUFA/Drivers/USB/Class/Host/CDC.h @@ -82,14 +82,14 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the CDC interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the CDC interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the CDC interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the CDC interface's OUT data pipe should use double banking. */ - uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used */ - bool NotificationPipeDoubleBank; /**< Indicates if the CDC interface's notification pipe should use double banking */ + uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used. */ + bool NotificationPipeDoubleBank; /**< Indicates if the CDC interface's notification pipe should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -97,13 +97,13 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref CDC_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint8_t ControlInterfaceNumber; /**< Interface index of the CDC-ACM control interface within the attached device */ + uint8_t ControlInterfaceNumber; /**< Interface index of the CDC-ACM control interface within the attached device. */ - uint16_t DataINPipeSize; /**< Size in bytes of the CDC interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the CDC interface's OUT data pipe */ - uint16_t NotificationPipeSize; /**< Size in bytes of the CDC interface's IN notification pipe, if used */ + uint16_t DataINPipeSize; /**< Size in bytes of the CDC interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the CDC interface's OUT data pipe. */ + uint16_t NotificationPipeSize; /**< Size in bytes of the CDC interface's IN notification pipe, if used. */ struct { @@ -118,14 +118,14 @@ struct { - uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */ + uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second. */ uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the - * CDCDevice_CDC_LineCodingFormats_t enum + * \ref CDC_LineEncodingFormats_t enum. */ uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the - * CDCDevice_LineCodingParity_t enum + * \ref CDC_LineEncodingParity_t enum. */ - uint8_t DataBits; /**< Bits of data per character of the virtual serial port */ + uint8_t DataBits; /**< Bits of data per character of the virtual serial port. */ } LineEncoding; /**< Line encoding used in the virtual serial port, for the device's information. This is generally * only used if the virtual serial port data is to be reconstructed on a physical UART. When set * by the host application, the \ref CDC_Host_SetLineEncoding() function must be called to push @@ -141,17 +141,17 @@ /** Enum for the possible error codes returned by the \ref CDC_Host_ConfigurePipes() function. */ enum CDCHost_EnumerationFailure_ErrorCodes_t { - CDC_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - CDC_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ - CDC_ENUMERROR_NoCDCInterfaceFound = 2, /**< A compatible CDC interface was not found in the device's Configuration Descriptor */ - CDC_ENUMERROR_EndpointsNotFound = 3, /**< Compatible CDC endpoints were not found in the device's CDC interface */ + CDC_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + CDC_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ + CDC_ENUMERROR_NoCDCInterfaceFound = 2, /**< A compatible CDC interface was not found in the device's Configuration Descriptor. */ + CDC_ENUMERROR_EndpointsNotFound = 3, /**< Compatible CDC endpoints were not found in the device's CDC interface. */ }; /* Function Prototypes: */ /** General management task for a given CDC host class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing an CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing an CDC Class host configuration and state. */ void CDC_Host_USBTask(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -161,11 +161,11 @@ * This should be called once after the stack has enumerated the attached device, while the host state machine is in * the Addressed state. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing an CDC Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing an CDC Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref CDCHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref CDCHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -173,9 +173,9 @@ /** Sets the line encoding for the attached device's virtual serial port. This should be called when the LineEncoding * values of the interface have been changed to push the new settings to the USB device. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t CDC_Host_SetLineEncoding(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -184,19 +184,19 @@ * notification. This should be called each time the CDC class driver's ControlLineStates.HostToDevice value is updated * to push the new states to the USB device. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t CDC_Host_SendControlLineStateChange(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Sends a Send Break request to the device. This is generally used to separate data data or to indicate a special condition * to the receiving device. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state - * \param[in] Duration Duration of the break, in milliseconds + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. + * \param[in] Duration Duration of the break, in milliseconds. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1); @@ -208,11 +208,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state - * \param[in] Data Pointer to the string to send to the device - * \param[in] Length Size in bytes of the string to send to the device + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. + * \param[in] Data Pointer to the string to send to the device. + * \param[in] Length Size in bytes of the string to send to the device. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, char* Data, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -225,10 +225,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state - * \param[in] Data Byte of data to send to the device + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. + * \param[in] Data Byte of data to send to the device. * - * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum + * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum. */ uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1); @@ -237,9 +237,9 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. * - * \return Total number of buffered bytes received from the device + * \return Total number of buffered bytes received from the device. */ uint16_t CDC_Host_BytesReceived(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -250,9 +250,9 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. * - * \return Next received byte from the device, or 0 if no data received + * \return Next received byte from the device, or 0 if no data received. */ uint8_t CDC_Host_ReceiveByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -261,9 +261,9 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. * - * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum + * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum. */ uint8_t CDC_Host_Flush(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -274,16 +274,16 @@ * \note The created stream can be given as stdout if desired to direct the standard output from all functions * to the given CDC interface. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed. */ void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, FILE* Stream); /** Identical to CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates * the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state - * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed. */ void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, FILE* Stream); @@ -293,7 +293,7 @@ * are available in the ControlLineStates.DeviceToHost value inside the CDC host interface structure passed as a parameter, set as * a mask of CDC_CONTROL_LINE_IN_* masks. * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class host configuration and state. */ void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h index 82ff3baca..70728d80a 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.h +++ b/LUFA/Drivers/USB/Class/Host/HID.h @@ -85,20 +85,20 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the HID interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the HID interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the HID interface's OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the HID interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the HID interface's OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the HID interface's OUT data pipe should use double banking. */ uint8_t HIDInterfaceProtocol; /**< HID interface protocol value to match against if a specific * boot subclass protocol is required, either \ref HID_BOOT_MOUSE_PROTOCOL, * \ref HID_BOOT_KEYBOARD_PROTOCOL or \ref HID_NON_BOOT_PROTOCOL if any - * HID device should be enumerated by the interface + * HID device should be enumerated by the interface. */ #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) HID_ReportInfo_t* HIDParserData; /**< HID parser data to store the parsed HID report data, when boot protocol - * is not used + * is not used. * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, * this method is unavailable. @@ -111,23 +111,23 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref HID_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint8_t InterfaceNumber; /**< Interface index of the HID interface within the attached device */ + uint8_t InterfaceNumber; /**< Interface index of the HID interface within the attached device. */ - uint16_t DataINPipeSize; /**< Size in bytes of the HID interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the HID interface's OUT data pipe */ + uint16_t DataINPipeSize; /**< Size in bytes of the HID interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the HID interface's OUT data pipe. */ bool SupportsBootProtocol; /**< Indicates if the current interface instance supports the HID Boot - * Protocol when enabled via \ref HID_Host_SetBootProtocol() + * Protocol when enabled via \ref HID_Host_SetBootProtocol(). */ bool DeviceUsesOUTPipe; /**< Indicates if the current interface instance uses a separate OUT data pipe for * OUT reports, or if OUT reports are sent via the control pipe instead. */ bool UsingBootProtocol; /**< Indicates that the interface is currently initialized in Boot Protocol mode */ - uint16_t HIDReportSize; /**< Size in bytes of the HID report descriptor in the device */ + uint16_t HIDReportSize; /**< Size in bytes of the HID report descriptor in the device. */ - uint8_t LargestReportSize; /**< Largest report the device will send, in bytes */ + uint8_t LargestReportSize; /**< Largest report the device will send, in bytes. */ } State; /**< State data for the USB class interface within the device. All elements in this section * may be set to initial values, but may also be ignored to default to sane values when * the interface is enumerated. @@ -138,11 +138,11 @@ /** Enum for the possible error codes returned by the \ref HID_Host_ConfigurePipes() function. */ enum HIDHost_EnumerationFailure_ErrorCodes_t { - HID_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - HID_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ - HID_ENUMERROR_NoHIDInterfaceFound = 2, /**< A compatible HID interface was not found in the device's Configuration Descriptor */ - HID_ENUMERROR_NoHIDDescriptorFound = 3, /**< The HID descriptor was not found in the device's HID interface */ - HID_ENUMERROR_EndpointsNotFound = 4, /**< Compatible HID endpoints were not found in the device's HID interface */ + HID_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + HID_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ + HID_ENUMERROR_NoHIDInterfaceFound = 2, /**< A compatible HID interface was not found in the device's Configuration Descriptor. */ + HID_ENUMERROR_NoHIDDescriptorFound = 3, /**< The HID descriptor was not found in the device's HID interface. */ + HID_ENUMERROR_EndpointsNotFound = 4, /**< Compatible HID endpoints were not found in the device's HID interface. */ }; /* Function Prototypes: */ @@ -155,11 +155,11 @@ * \note Once the device pipes are configured, the HID device's reporting protocol must be set via a call * to either the \ref HID_Host_SetBootProtocol() or \ref HID_Host_SetReportProtocol() function. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref HIDHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref HIDHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -167,16 +167,16 @@ /** Receives a HID IN report from the attached HID device, when a report has been received on the HID IN Data pipe. * - * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the * call will fail. * * \note The destination buffer should be large enough to accommodate the largest report that the attached device * can generate. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state - * \param[in] Buffer Buffer to store the received report into + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. + * \param[in] Buffer Buffer to store the received report into. * - * \return An error code from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return An error code from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, void* Buffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -189,11 +189,11 @@ * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method is unavailable. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state - * \param[in] ReportID Report ID of the received report if ControlRequest is false, set by the to the Report ID to fetch - * \param[in] Buffer Buffer to store the received report into + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. + * \param[in] ReportID Report ID of the received report if ControlRequest is false, set by the to the Report ID to fetch. + * \param[in] Buffer Buffer to store the received report into. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, const uint8_t ReportID, void* Buffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -208,14 +208,14 @@ * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, the ReportID parameter is removed * from the parameter list of this function. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state - * \param[in] ReportID Report ID of the report to send to the device, or 0 if the device does not use report IDs - * \param[in] ReportType Type of report to issue to the device, either \ref REPORT_ITEM_TYPE_Out or \ref REPORT_ITEM_TYPE_Feature - * \param[in] Buffer Buffer containing the report to send to the attached device - * \param[in] ReportSize Report size in bytes to send to the attached device + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. + * \param[in] ReportID Report ID of the report to send to the device, or 0 if the device does not use report IDs. + * \param[in] ReportType Type of report to issue to the device, either \ref REPORT_ITEM_TYPE_Out or \ref REPORT_ITEM_TYPE_Feature. + * \param[in] Buffer Buffer containing the report to send to the attached device. + * \param[in] ReportSize Report size in bytes to send to the attached device. * * \return An error code from the \ref USB_Host_SendControlErrorCodes_t enum if the DeviceUsesOUTPipe flag is set in - * the interface's state structure, a value from the \ref Pipe_Stream_RW_ErrorCodes_t enum otherwise + * the interface's state structure, a value from the \ref Pipe_Stream_RW_ErrorCodes_t enum otherwise. */ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) @@ -233,9 +233,9 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. * - * \return Boolean true if a report has been received, false otherwise + * \return Boolean true if a report has been received, false otherwise. */ bool HID_Host_IsReportReceived(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -244,10 +244,10 @@ * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method must still be called * to explicitly place the attached device into boot protocol mode before use. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. * * \return \ref HID_ERROR_LOGICAL if the device does not support Boot Protocol mode, a value from the - * \ref USB_Host_SendControlErrorCodes_t enum otherwise + * \ref USB_Host_SendControlErrorCodes_t enum otherwise. */ uint8_t HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -261,12 +261,12 @@ * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method is unavailable. * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. * * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum if an error occurs while retrieving the HID * Report descriptor or the setting of the Report protocol, \ref HID_ERROR_LOGICAL if the HID interface does * not have a valid \ref HID_ReportInfo_t structure set in its configuration, a mask of \ref HID_ERROR_LOGICAL - * and a value from the \ref HID_Parse_ErrorCodes_t otherwise + * and a value from the \ref HID_Parse_ErrorCodes_t otherwise. */ uint8_t HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); #endif @@ -276,7 +276,7 @@ * the interface. This should be called frequently in the main program loop, before the master USB management task * \ref USB_USBTask(). * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state. */ static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo); static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.h b/LUFA/Drivers/USB/Class/Host/HIDParser.h index e8717d058..393c4166f 100644 --- a/LUFA/Drivers/USB/Class/Host/HIDParser.h +++ b/LUFA/Drivers/USB/Class/Host/HIDParser.h @@ -133,12 +133,12 @@ * left-aligned to the given data type. This allows for signed data to be interpreted correctly, by shifting the data * leftwards until the data's sign bit is in the correct position. * - * \param[in] reportitem HID Report Item whose retrieved value is to be aligned - * \param[in] type Data type to align the HID report item's value to + * \param[in] ReportItem HID Report Item whose retrieved value is to be aligned. + * \param[in] Type Data type to align the HID report item's value to. * - * \return Left-aligned data of the given report item's pre-retrieved value for the given datatype + * \return Left-aligned data of the given report item's pre-retrieved value for the given datatype. */ - #define HID_ALIGN_DATA(reportitem, type) ((type)(reportitem->Value << ((8 * sizeof(type)) - reportitem->Attributes.BitSize))) + #define HID_ALIGN_DATA(ReportItem, Type) ((Type)(ReportItem->Value << ((8 * sizeof(Type)) - ReportItem->Attributes.BitSize))) /* Public Interface - May be used in end-application: */ /* Enums: */ @@ -239,9 +239,9 @@ */ typedef struct { - uint8_t ReportID; /**< Report ID of the report within the HID interface */ + uint8_t ReportID; /**< Report ID of the report within the HID interface. */ uint16_t ReportSizeBits[3]; /**< Total number of bits in each report type for the given Report ID, - * indexed by the \ref HID_ReportItemTypes_t enum + * indexed by the \ref HID_ReportItemTypes_t enum. */ } HID_ReportSizeInfo_t; @@ -272,11 +272,11 @@ /** Function to process a given HID report returned from an attached device, and store it into a given * \ref HID_ReportInfo_t structure. * - * \param[in] ReportData Buffer containing the device's HID report table - * \param[in] ReportSize Size in bytes of the HID report table - * \param[out] ParserData Pointer to a \ref HID_ReportInfo_t instance for the parser output + * \param[in] ReportData Buffer containing the device's HID report table. + * \param[in] ReportSize Size in bytes of the HID report table. + * \param[out] ParserData Pointer to a \ref HID_ReportInfo_t instance for the parser output. * - * \return A value in the \ref HID_Parse_ErrorCodes_t enum + * \return A value in the \ref HID_Parse_ErrorCodes_t enum. */ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID_ReportInfo_t* const ParserData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -287,10 +287,10 @@ * When called, this copies the report item's Value element to it's PreviousValue element for easy * checking to see if an item's value has changed before processing a report. * - * \param[in] ReportData Buffer containing an IN or FEATURE report from an attached device - * \param[in,out] ReportItem Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array + * \param[in] ReportData Buffer containing an IN or FEATURE report from an attached device. + * \param[in,out] ReportItem Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array. * - * \returns Boolean true if the item to retrieve was located in the given report, false otherwise + * \returns Boolean true if the item to retrieve was located in the given report, false otherwise. */ bool USB_GetHIDReportItemInfo(const uint8_t* ReportData, HID_ReportItem_t* const ReportItem) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -305,20 +305,20 @@ * * If the device has multiple HID reports, the first byte in the report is set to the report ID of the given item. * - * \param[out] ReportData Buffer holding the current OUT or FEATURE report data - * \param[in] ReportItem Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array + * \param[out] ReportData Buffer holding the current OUT or FEATURE report data. + * \param[in] ReportItem Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array. */ void USB_SetHIDReportItemInfo(uint8_t* ReportData, HID_ReportItem_t* const ReportItem) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); /** Retrieves the size of a given HID report in bytes from it's Report ID. * - * \param[in] ParserData Pointer to a \ref HID_ReportInfo_t instance containing the parser output - * \param[in] ReportID Report ID of the report whose size is to be retrieved + * \param[in] ParserData Pointer to a \ref HID_ReportInfo_t instance containing the parser output. + * \param[in] ReportID Report ID of the report whose size is to be retrieved. * \param[in] ReportType Type of the report whose size is to be determined, a valued from the - * \ref HID_ReportItemTypes_t enum + * \ref HID_ReportItemTypes_t enum. * - * \return Size of the report in bytes, or 0 if the report does not exist + * \return Size of the report in bytes, or 0 if the report does not exist. */ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, const uint8_t ReportID, const uint8_t ReportType) ATTR_CONST ATTR_NON_NULL_PTR_ARG(1); @@ -328,9 +328,9 @@ * HID_ReportInfo_t structure. This can be used to filter only those items the application will be using, so that * no RAM is wasted storing the attributes for report items which will never be referenced by the application. * - * \param[in] CurrentItem Pointer to the current report item for user checking + * \param[in] CurrentItem Pointer to the current report item for user checking. * - * \return Boolean true if the item should be stored into the HID_ReportInfo_t structure, false if it should be ignored + * \return Boolean true if the item should be stored into the HID_ReportInfo_t structure, false if it should be ignored. */ bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem); diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.h b/LUFA/Drivers/USB/Class/Host/MIDI.h index 8c711ccf9..644785f05 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDI.h +++ b/LUFA/Drivers/USB/Class/Host/MIDI.h @@ -79,11 +79,11 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the MIDI interface's streaming IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the MIDI interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the MIDI interface's streaming IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the MIDI interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the MIDI interface's streaming OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the MIDI interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the MIDI interface's streaming OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the MIDI interface's OUT data pipe should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -91,11 +91,11 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref MIDI_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint16_t DataINPipeSize; /**< Size in bytes of the MIDI Streaming Data interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the MIDI Streaming Data interface's OUT data pipe */ + uint16_t DataINPipeSize; /**< Size in bytes of the MIDI Streaming Data interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the MIDI Streaming Data interface's OUT data pipe. */ } State; /**< State data for the USB class interface within the device. All elements in this section * may be set to initial values, but may also be ignored to default to sane values when * the interface is enumerated. @@ -106,10 +106,10 @@ /** Enum for the possible error codes returned by the \ref MIDI_Host_ConfigurePipes() function. */ enum MIDIHost_EnumerationFailure_ErrorCodes_t { - MIDI_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - MIDI_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ - MIDI_ENUMERROR_NoStreamingInterfaceFound = 2, /**< A compatible MIDI interface was not found in the device's Configuration Descriptor */ - MIDI_ENUMERROR_EndpointsNotFound = 3, /**< Compatible MIDI data endpoints were not found in the device's MIDI interface */ + MIDI_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + MIDI_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ + MIDI_ENUMERROR_NoStreamingInterfaceFound = 2, /**< A compatible MIDI interface was not found in the device's Configuration Descriptor. */ + MIDI_ENUMERROR_EndpointsNotFound = 3, /**< Compatible MIDI data endpoints were not found in the device's MIDI interface. */ }; /* Function Prototypes: */ @@ -119,11 +119,11 @@ * This should be called once after the stack has enumerated the attached device, while the host state machine is in * the Addressed state. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing an MIDI Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing an MIDI Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref MIDIHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref MIDIHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -133,10 +133,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state - * \param[in] Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. + * \param[in] Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -146,9 +146,9 @@ * pipe bank until either the pipe bank is full, or \ref MIDI_Host_Flush() is called. This allows for multiple MIDI * events to be packed into a single pipe packet, increasing data throughput. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. * - * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum + * \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum. */ uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -157,10 +157,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state - * \param[out] Event Pointer to a USB_MIDI_EventPacket_t structure where the received MIDI event is to be placed + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state. + * \param[out] Event Pointer to a USB_MIDI_EventPacket_t structure where the received MIDI event is to be placed. * - * \return Boolean true if a MIDI event packet was received, false otherwise + * \return Boolean true if a MIDI event packet was received, false otherwise. */ bool MIDI_Host_ReceiveEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -169,7 +169,7 @@ /** General management task for a given MIDI host class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing an MIDI Class host configuration and state + * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing an MIDI Class host configuration and state. */ static inline void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); static inline void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h index 9b67c7fc4..47a6fdb12 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -83,11 +83,11 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the Mass Storage interface's IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the Mass Storage interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the Mass Storage interface's IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the Mass Storage interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the Mass Storage interface's OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the Mass Storage interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the Mass Storage interface's OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the Mass Storage interface's OUT data pipe should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -95,14 +95,14 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref MS_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint8_t InterfaceNumber; /**< Interface index of the Mass Storage interface within the attached device */ + uint8_t InterfaceNumber; /**< Interface index of the Mass Storage interface within the attached device. */ - uint16_t DataINPipeSize; /**< Size in bytes of the Mass Storage interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the Mass Storage interface's OUT data pipe */ + uint16_t DataINPipeSize; /**< Size in bytes of the Mass Storage interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the Mass Storage interface's OUT data pipe. */ - uint32_t TransactionTag; /**< Current transaction tag for data synchronizing of packets */ + uint32_t TransactionTag; /**< Current transaction tag for data synchronizing of packets. */ } State; /**< State data for the USB class interface within the device. All elements in this section * may be set to initial values, but may also be ignored to default to sane values when * the interface is enumerated. @@ -117,17 +117,17 @@ */ typedef struct { - uint32_t Blocks; /**< Number of blocks in the addressed LUN of the device */ - uint32_t BlockSize; /**< Number of bytes in each block in the addressed LUN */ + uint32_t Blocks; /**< Number of blocks in the addressed LUN of the device. */ + uint32_t BlockSize; /**< Number of bytes in each block in the addressed LUN. */ } SCSI_Capacity_t; /* Enums: */ enum MSHost_EnumerationFailure_ErrorCodes_t { - MS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - MS_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ - MS_ENUMERROR_NoMSInterfaceFound = 2, /**< A compatible Mass Storage interface was not found in the device's Configuration Descriptor */ - MS_ENUMERROR_EndpointsNotFound = 3, /**< Compatible Mass Storage endpoints were not found in the device's interfaces */ + MS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + MS_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ + MS_ENUMERROR_NoMSInterfaceFound = 2, /**< A compatible Mass Storage interface was not found in the device's Configuration Descriptor. */ + MS_ENUMERROR_EndpointsNotFound = 3, /**< Compatible Mass Storage endpoints were not found in the device's interfaces. */ }; /* Function Prototypes: */ @@ -137,11 +137,11 @@ * is found within the device. This should be called once after the stack has enumerated the attached device, while * the host state machine is in the Addressed state. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref MSHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref MSHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -149,9 +149,9 @@ /** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface * and readying it for the next Mass Storage command. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -163,10 +163,10 @@ * on unsupported devices the max LUN index will be reported as zero and no error will be returned * if the device STALLs the request. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[out] MaxLUNIndex Pointer to a location where the highest LUN index value should be stored + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[out] MaxLUNIndex Pointer to a location where the highest LUN index value should be stored. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_t* const MaxLUNIndex) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -177,11 +177,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to - * \param[out] InquiryData Location where the read inquiry data should be stored + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. + * \param[out] InquiryData Location where the read inquiry data should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED. */ uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, SCSI_Inquiry_Response_t* const InquiryData) ATTR_NON_NULL_PTR_ARG(1) @@ -189,10 +189,10 @@ /** Sends a TEST UNIT READY command to the device, to determine if it is ready to accept other SCSI commands. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex) ATTR_NON_NULL_PTR_ARG(1); @@ -202,11 +202,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to - * \param[out] DeviceCapacity Pointer to the location where the capacity information should be stored + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. + * \param[out] DeviceCapacity Pointer to the location where the capacity information should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, SCSI_Capacity_t* const DeviceCapacity) ATTR_NON_NULL_PTR_ARG(1) @@ -218,11 +218,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to - * \param[out] SenseData Pointer to the location where the sense information should be stored + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. + * \param[out] SenseData Pointer to the location where the sense information should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, SCSI_Request_Sense_Response_t* const SenseData) ATTR_NON_NULL_PTR_ARG(1) @@ -234,11 +234,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to - * \param[in] PreventRemoval Boolean true if the device should be locked from removal, false otherwise + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. + * \param[in] PreventRemoval Boolean true if the device should be locked from removal, false otherwise. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, const bool PreventRemoval) ATTR_NON_NULL_PTR_ARG(1); @@ -248,14 +248,14 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to - * \param[in] BlockAddress Starting block address within the device to read from - * \param[in] Blocks Total number of blocks to read - * \param[in] BlockSize Size in bytes of each block within the device - * \param[out] BlockBuffer Pointer to where the read data from the device should be stored + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. + * \param[in] BlockAddress Starting block address within the device to read from. + * \param[in] Blocks Total number of blocks to read. + * \param[in] BlockSize Size in bytes of each block within the device. + * \param[out] BlockBuffer Pointer to where the read data from the device should be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize, @@ -266,14 +266,14 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state - * \param[in] LUNIndex LUN index within the device the command is being issued to - * \param[in] BlockAddress Starting block address within the device to write to - * \param[in] Blocks Total number of blocks to read - * \param[in] BlockSize Size in bytes of each block within the device - * \param[in] BlockBuffer Pointer to where the data to write should be sourced from + * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state. + * \param[in] LUNIndex LUN index within the device the command is being issued to. + * \param[in] BlockAddress Starting block address within the device to write to. + * \param[in] Blocks Total number of blocks to read. + * \param[in] BlockSize Size in bytes of each block within the device. + * \param[in] BlockBuffer Pointer to where the data to write should be sourced from. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready. */ uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize, @@ -284,7 +284,7 @@ * the interface. This should be called frequently in the main program loop, before the master USB management task * \ref USB_USBTask(). * - * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state + * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state. */ static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo); static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h index 89f229975..5c6f74a6d 100644 --- a/LUFA/Drivers/USB/Class/Host/Printer.h +++ b/LUFA/Drivers/USB/Class/Host/Printer.h @@ -79,11 +79,11 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the Printer interface's IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the Printer interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the Printer interface's IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the Printer interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the Printer interface's OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the Printer interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the Printer interface's OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the Printer interface's OUT data pipe should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -91,13 +91,13 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref PRNT_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint8_t InterfaceNumber; /**< Interface index of the Printer interface within the attached device */ - uint8_t AlternateSetting; /**< Alternate setting within the Printer Interface in the attached device */ + uint8_t InterfaceNumber; /**< Interface index of the Printer interface within the attached device. */ + uint8_t AlternateSetting; /**< Alternate setting within the Printer Interface in the attached device. */ - uint16_t DataINPipeSize; /**< Size in bytes of the Printer interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the Printer interface's OUT data pipe */ + uint16_t DataINPipeSize; /**< Size in bytes of the Printer interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the Printer interface's OUT data pipe. */ } State; /**< State data for the USB class interface within the device. All elements in this section * may be set to initial values, but may also be ignored to default to sane values when * the interface is enumerated. @@ -107,10 +107,10 @@ /* Enums: */ enum PRNTHost_EnumerationFailure_ErrorCodes_t { - PRNT_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - PRNT_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ - PRNT_ENUMERROR_NoPrinterInterfaceFound = 2, /**< A compatible Printer interface was not found in the device's Configuration Descriptor */ - PRNT_ENUMERROR_EndpointsNotFound = 3, /**< Compatible Printer endpoints were not found in the device's interfaces */ + PRNT_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + PRNT_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ + PRNT_ENUMERROR_NoPrinterInterfaceFound = 2, /**< A compatible Printer interface was not found in the device's Configuration Descriptor. */ + PRNT_ENUMERROR_EndpointsNotFound = 3, /**< Compatible Printer endpoints were not found in the device's interfaces. */ }; /* Function Prototypes: */ @@ -120,11 +120,11 @@ * the device. This should be called once after the stack has enumerated the attached device, while the host state * machine is in the Addressed state. * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref PRNTHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref PRNTHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -132,28 +132,28 @@ /** Configures the printer to enable Bidirectional mode, if it is not already in this mode. This should be called * once the connected device's configuration has been set, to ensure the printer is ready to accept commands. * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Retrieves the status of the virtual Printer port's inbound status lines. The result can then be masked against the * PRNT_PORTSTATUS_* macros to determine the printer port's status. * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state - * \param[out] PortStatus Location where the retrieved port status should be stored + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. + * \param[out] PortStatus Location where the retrieved port status should be stored. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint8_t* const PortStatus) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); /** Soft-resets the attached printer, readying it for new commands. * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. * - * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum. */ uint8_t PRNT_Host_SoftReset(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -164,11 +164,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state - * \param[in] PrinterCommands Pointer to a buffer containing the raw command stream to send to the printer - * \param[in] CommandSize Size in bytes of the command stream to be sent + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. + * \param[in] PrinterCommands Pointer to a buffer containing the raw command stream to send to the printer. + * \param[in] CommandSize Size in bytes of the command stream to be sent. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, void* PrinterCommands, uint16_t CommandSize) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -180,11 +180,11 @@ * * This string, when supported, contains the model, manufacturer and acceptable printer languages for the attached device. * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state - * \param[out] DeviceIDString Pointer to a buffer where the Device ID string should be stored, in ASCII format - * \param[in] BufferSize Size in bytes of the buffer allocated for the Device ID string + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. + * \param[out] DeviceIDString Pointer to a buffer where the Device ID string should be stored, in ASCII format. + * \param[in] BufferSize Size in bytes of the buffer allocated for the Device ID string. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, char* DeviceIDString, uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -194,7 +194,7 @@ * the interface. This should be called frequently in the main program loop, before the master USB management task * \ref USB_USBTask(). * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state. */ static inline void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); static inline void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.h b/LUFA/Drivers/USB/Class/Host/RNDIS.h index f39be799f..e6d4e974a 100644 --- a/LUFA/Drivers/USB/Class/Host/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Host/RNDIS.h @@ -83,16 +83,16 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the RNDIS interface's IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the RNDIS interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the RNDIS interface's IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the RNDIS interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the RNDIS interface's OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the RNDIS interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the RNDIS interface's OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the RNDIS interface's OUT data pipe should use double banking. */ - uint8_t NotificationPipeNumber; /**< Pipe number of the RNDIS interface's IN notification endpoint, if used */ - bool NotificationPipeDoubleBank; /**< Indicates if the RNDIS interface's notification pipe should use double banking */ + uint8_t NotificationPipeNumber; /**< Pipe number of the RNDIS interface's IN notification endpoint, if used. */ + bool NotificationPipeDoubleBank; /**< Indicates if the RNDIS interface's notification pipe should use double banking. */ - uint32_t HostMaxPacketSize; /**< Maximum size of a packet which can be buffered by the host */ + uint32_t HostMaxPacketSize; /**< Maximum size of a packet which can be buffered by the host. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -100,17 +100,17 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref RNDIS_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint8_t ControlInterfaceNumber; /**< Interface index of the RNDIS control interface within the attached device */ + uint8_t ControlInterfaceNumber; /**< Interface index of the RNDIS control interface within the attached device. */ - uint16_t DataINPipeSize; /**< Size in bytes of the RNDIS interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the RNDIS interface's OUT data pipe */ - uint16_t NotificationPipeSize; /**< Size in bytes of the RNDIS interface's IN notification pipe, if used */ + uint16_t DataINPipeSize; /**< Size in bytes of the RNDIS interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the RNDIS interface's OUT data pipe. */ + uint16_t NotificationPipeSize; /**< Size in bytes of the RNDIS interface's IN notification pipe, if used. */ - uint32_t DeviceMaxPacketSize; /**< Maximum size of a packet which can be buffered by the attached RNDIS device */ + uint32_t DeviceMaxPacketSize; /**< Maximum size of a packet which can be buffered by the attached RNDIS device. */ - uint32_t RequestID; /**< Request ID counter to give a unique ID for each command/response pair */ + uint32_t RequestID; /**< Request ID counter to give a unique ID for each command/response pair. */ } State; /**< State data for the USB class interface within the device. All elements in this section * may be set to initial values, but may also be ignored to default to sane values when * the interface is enumerated. @@ -121,10 +121,10 @@ /** Enum for the possible error codes returned by the \ref RNDIS_Host_ConfigurePipes() function. */ enum RNDISHost_EnumerationFailure_ErrorCodes_t { - RNDIS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - RNDIS_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ - RNDIS_ENUMERROR_NoRNDISInterfaceFound = 2, /**< A compatible RNDIS interface was not found in the device's Configuration Descriptor */ - RNDIS_ENUMERROR_EndpointsNotFound = 3, /**< Compatible RNDIS endpoints were not found in the device's RNDIS interface */ + RNDIS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + RNDIS_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ + RNDIS_ENUMERROR_NoRNDISInterfaceFound = 2, /**< A compatible RNDIS interface was not found in the device's Configuration Descriptor. */ + RNDIS_ENUMERROR_EndpointsNotFound = 3, /**< Compatible RNDIS endpoints were not found in the device's RNDIS interface. */ }; /* Macros: */ @@ -138,11 +138,11 @@ * This should be called once after the stack has enumerated the attached device, while the host state machine is in * the Addressed state. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref RNDISHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref RNDISHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -150,45 +150,45 @@ /** Sends a RNDIS KEEPALIVE command to the device, to ensure that it does not enter standby mode after periods * of long inactivity. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a - * logical command failure + * logical command failure. */ uint8_t RNDIS_Host_SendKeepAlive(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Initializes the attached RNDIS device's RNDIS interface. This should be called after the device's pipes have been * configured via the call to \ref RNDIS_Host_ConfigurePipes(). * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a - * logical command failure + * logical command failure. */ uint8_t RNDIS_Host_InitializeDevice(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); /** Sets a given RNDIS property of an attached RNDIS device. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state - * \param[in] Oid OID number of the parameter to set - * \param[in] Buffer Pointer to where the property data is to be sourced from - * \param[in] Length Length in bytes of the property data to sent to the device + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. + * \param[in] Oid OID number of the parameter to set. + * \param[in] Buffer Pointer to where the property data is to be sourced from. + * \param[in] Length Length in bytes of the property data to sent to the device. * * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a - * logical command failure + * logical command failure. */ uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, uint32_t Oid, void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); /** Gets a given RNDIS property of an attached RNDIS device. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state - * \param[in] Oid OID number of the parameter to get - * \param[in] Buffer Pointer to where the property data is to be written to - * \param[in] MaxLength Length in bytes of the destination buffer size + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. + * \param[in] Oid OID number of the parameter to get. + * \param[in] Buffer Pointer to where the property data is to be written to. + * \param[in] MaxLength Length in bytes of the destination buffer size. * * \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a - * logical command failure + * logical command failure. */ uint8_t RNDIS_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, uint32_t Oid, void* Buffer, uint16_t MaxLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -198,9 +198,9 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. * - * \return Boolean true if a packet is waiting to be read in by the host, false otherwise + * \return Boolean true if a packet is waiting to be read in by the host, false otherwise. */ bool RNDIS_Host_IsPacketReceived(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -210,11 +210,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state - * \param[out] Buffer Pointer to a buffer where the packer data is to be written to - * \param[out] PacketLength Pointer to where the length in bytes of the read packet is to be stored + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. + * \param[out] Buffer Pointer to a buffer where the packer data is to be written to. + * \param[out] PacketLength Pointer to where the length in bytes of the read packet is to be stored. * - * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t* PacketLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3); @@ -224,11 +224,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state - * \param[in] Buffer Pointer to a buffer where the packer data is to be read from - * \param[in] PacketLength Length in bytes of the packet to send + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. + * \param[in] Buffer Pointer to a buffer where the packer data is to be read from. + * \param[in] PacketLength Length in bytes of the packet to send. * - * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t PacketLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -237,7 +237,7 @@ /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask(). * - * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state + * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state. */ static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h index b737e3672..551f1cb2f 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.h +++ b/LUFA/Drivers/USB/Class/Host/StillImage.h @@ -83,14 +83,14 @@ { const struct { - uint8_t DataINPipeNumber; /**< Pipe number of the Still Image interface's IN data pipe */ - bool DataINPipeDoubleBank; /**< Indicates if the Still Image interface's IN data pipe should use double banking */ + uint8_t DataINPipeNumber; /**< Pipe number of the Still Image interface's IN data pipe. */ + bool DataINPipeDoubleBank; /**< Indicates if the Still Image interface's IN data pipe should use double banking. */ - uint8_t DataOUTPipeNumber; /**< Pipe number of the Still Image interface's OUT data pipe */ - bool DataOUTPipeDoubleBank; /**< Indicates if the Still Image interface's OUT data pipe should use double banking */ + uint8_t DataOUTPipeNumber; /**< Pipe number of the Still Image interface's OUT data pipe. */ + bool DataOUTPipeDoubleBank; /**< Indicates if the Still Image interface's OUT data pipe should use double banking. */ - uint8_t EventsPipeNumber; /**< Pipe number of the Still Image interface's IN events endpoint, if used */ - bool EventsPipeDoubleBank; /**< Indicates if the Still Image interface's events data pipe should use double banking */ + uint8_t EventsPipeNumber; /**< Pipe number of the Still Image interface's IN events endpoint, if used. */ + bool EventsPipeDoubleBank; /**< Indicates if the Still Image interface's events data pipe should use double banking. */ } Config; /**< Config data for the USB class interface within the device. All elements in this section * must be set or the interface will fail to enumerate and operate correctly. */ @@ -98,15 +98,15 @@ { bool IsActive; /**< Indicates if the current interface instance is connected to an attached device, valid * after \ref SImage_Host_ConfigurePipes() is called and the Host state machine is in the - * Configured state + * Configured state. */ - uint16_t DataINPipeSize; /**< Size in bytes of the Still Image interface's IN data pipe */ - uint16_t DataOUTPipeSize; /**< Size in bytes of the Still Image interface's OUT data pipe */ - uint16_t EventsPipeSize; /**< Size in bytes of the Still Image interface's IN events pipe */ + uint16_t DataINPipeSize; /**< Size in bytes of the Still Image interface's IN data pipe. */ + uint16_t DataOUTPipeSize; /**< Size in bytes of the Still Image interface's OUT data pipe. */ + uint16_t EventsPipeSize; /**< Size in bytes of the Still Image interface's IN events pipe. */ - bool IsSessionOpen; /**< Indicates if a PIMA session is currently open with the attached device */ - uint32_t TransactionID; /**< Transaction ID for the next transaction to send to the device */ + bool IsSessionOpen; /**< Indicates if a PIMA session is currently open with the attached device. */ + uint32_t TransactionID; /**< Transaction ID for the next transaction to send to the device. */ } State; /**< State data for the USB class interface within the device. All elements in this section * may be set to initial values, but may also be ignored to default to sane values when * the interface is enumerated. @@ -117,13 +117,13 @@ /** Enum for the possible error codes returned by the \ref SImage_Host_ConfigurePipes() function. */ enum SIHost_EnumerationFailure_ErrorCodes_t { - SI_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */ - SI_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor */ + SI_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */ + SI_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */ SI_ENUMERROR_NoSIInterfaceFound = 2, /**< A compatible Still Image interface was not found in the device's - * Configuration Descriptor + * Configuration Descriptor. */ SI_ENUMERROR_EndpointsNotFound = 3, /**< Compatible Still Image data endpoints were not found in the - * device's Still Image interface + * device's Still Image interface. */ }; @@ -134,11 +134,11 @@ * found within the device. This should be called once after the stack has enumerated the attached device, while * the host state machine is in the Addressed state. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor - * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor. + * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor. * - * \return A value from the \ref SIHost_EnumerationFailure_ErrorCodes_t enum + * \return A value from the \ref SIHost_EnumerationFailure_ErrorCodes_t enum. */ uint8_t SImage_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, uint16_t ConfigDescriptorSize, void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3); @@ -149,10 +149,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device - * returned a logical command failure + * returned a logical command failure. */ uint8_t SImage_Host_OpenSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -162,10 +162,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device - * returned a logical command failure + * returned a logical command failure. */ uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -175,10 +175,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[in] PIMAHeader Pointer to a PIMA container structure that is to be sent + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[in] PIMAHeader Pointer to a PIMA container structure that is to be sent. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1) @@ -190,10 +190,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[out] PIMAHeader Pointer to a PIMA container structure where the received block is to be stored + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[out] PIMAHeader Pointer to a PIMA container structure where the received block is to be stored. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t SImage_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1) @@ -204,13 +204,13 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[in] Operation PIMA operation code to issue to the device - * \param[in] TotalParams Total number of 32-bit parameters to send to the device in the issued command block - * \param[in] Params Pointer to an array of 32-bit values containing the parameters to send in the command block + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[in] Operation PIMA operation code to issue to the device. + * \param[in] TotalParams Total number of 32-bit parameters to send to the device in the issued command block. + * \param[in] Params Pointer to an array of 32-bit values containing the parameters to send in the command block. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device - * returned a logical command failure + * returned a logical command failure. */ uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, const uint16_t Operation, const uint8_t TotalParams, uint32_t* Params) ATTR_NON_NULL_PTR_ARG(1); @@ -221,10 +221,10 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device - * returned a logical command failure + * returned a logical command failure. */ uint8_t SImage_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -233,9 +233,9 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. * - * \return Boolean true if an event is waiting to be read, false otherwise + * \return Boolean true if an event is waiting to be read, false otherwise. */ bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); @@ -244,11 +244,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[out] PIMAHeader Pointer to a PIMA container structure where the event should be stored + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[out] PIMAHeader Pointer to a PIMA container structure where the event should be stored. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device - * returned a logical command failure + * returned a logical command failure. */ uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1) @@ -260,11 +260,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[in] Buffer Pointer to a buffer where the data to send has been stored - * \param[in] Bytes Length in bytes of the data in the buffer to send to the attached device + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[in] Buffer Pointer to a buffer where the data to send has been stored. + * \param[in] Bytes Length in bytes of the data in the buffer to send to the attached device. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer, const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -275,11 +275,11 @@ * \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the * call will fail. * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state - * \param[out] Buffer Pointer to a buffer where the received data is to be stored - * \param[in] Bytes Length in bytes of the data to read + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. + * \param[out] Buffer Pointer to a buffer where the received data is to be stored. + * \param[in] Bytes Length in bytes of the data to read. * - * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum + * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer, const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); @@ -289,7 +289,7 @@ * interface. This should be called frequently in the main program loop, before the master USB management task * \ref USB_USBTask(). * - * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state + * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state. */ static inline void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); static inline void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h index 90e36a4cd..14457ca2a 100644 --- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h +++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h @@ -116,7 +116,7 @@ /** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array * of type void, returning a uint8_t value). * - * \see \ref USB_GetNextDescriptorComp function for more details + * \see \ref USB_GetNextDescriptorComp function for more details. */ typedef uint8_t (* ConfigComparatorPtr_t)(void*); @@ -124,19 +124,19 @@ /** Enum for the possible return codes of the \ref USB_Host_GetDeviceConfigDescriptor() function. */ enum USB_Host_GetConfigDescriptor_ErrorCodes_t { - HOST_GETCONFIG_Successful = 0, /**< No error occurred while retrieving the configuration descriptor */ + HOST_GETCONFIG_Successful = 0, /**< No error occurred while retrieving the configuration descriptor. */ HOST_GETCONFIG_DeviceDisconnect = 1, /**< The attached device was disconnected while retrieving the configuration - * descriptor + * descriptor. */ - HOST_GETCONFIG_PipeError = 2, /**< An error occurred in the pipe while sending the request */ + HOST_GETCONFIG_PipeError = 2, /**< An error occurred in the pipe while sending the request. */ HOST_GETCONFIG_SetupStalled = 3, /**< The attached device stalled the request to retrieve the configuration - * descriptor + * descriptor. */ - HOST_GETCONFIG_SoftwareTimeOut = 4, /**< The request or data transfer timed out */ + HOST_GETCONFIG_SoftwareTimeOut = 4, /**< The request or data transfer timed out. */ HOST_GETCONFIG_BuffOverflow = 5, /**< The device's configuration descriptor is too large to fit into the allocated - * buffer + * buffer. */ - HOST_GETCONFIG_InvalidData = 6, /**< The device returned invalid configuration descriptor data */ + HOST_GETCONFIG_InvalidData = 6, /**< The device returned invalid configuration descriptor data. */ }; /** Enum for return values of a descriptor comparator function. */ @@ -161,12 +161,12 @@ * including validity and size checking to prevent a buffer overflow. * * \param[in] ConfigNumber Device configuration descriptor number to fetch from the device (usually set to 1 for - * single configuration devices) - * \param[in,out] ConfigSizePtr Pointer to a uint16_t for storing the retrieved configuration descriptor size + * single configuration devices). + * \param[in,out] ConfigSizePtr Pointer to a uint16_t for storing the retrieved configuration descriptor size. * \param[out] BufferPtr Pointer to the buffer for storing the configuration descriptor data. - * \param[out] BufferSize Size of the allocated buffer where the configuration descriptor is to be stored + * \param[out] BufferSize Size of the allocated buffer where the configuration descriptor is to be stored. * - * \return A value from the \ref USB_Host_GetConfigDescriptor_ErrorCodes_t enum + * \return A value from the \ref USB_Host_GetConfigDescriptor_ErrorCodes_t enum. */ uint8_t USB_Host_GetDeviceConfigDescriptor(uint8_t ConfigNumber, uint16_t* const ConfigSizePtr, void* BufferPtr, uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3); @@ -174,9 +174,9 @@ /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value. * The bytes remaining value is automatically decremented. * - * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor - * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor - * \param[in] Type Descriptor type value to search for + * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor. + * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor. + * \param[in] Type Descriptor type value to search for. */ void USB_GetNextDescriptorOfType(uint16_t* const BytesRem, void** const CurrConfigLoc, @@ -188,10 +188,10 @@ * descriptor is reached first, the number of bytes remaining to process is set to zero and the * function exits. The bytes remaining value is automatically decremented. * - * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor - * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor - * \param[in] Type Descriptor type value to search for - * \param[in] BeforeType Descriptor type value which must not be reached before the given Type descriptor + * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor. + * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor. + * \param[in] Type Descriptor type value to search for. + * \param[in] BeforeType Descriptor type value which must not be reached before the given Type descriptor. */ void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem, void** const CurrConfigLoc, @@ -203,10 +203,10 @@ * which must come after a descriptor of the second given type value. The bytes remaining value is * automatically decremented. * - * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor - * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor - * \param[in] Type Descriptor type value to search for - * \param[in] AfterType Descriptor type value which must be reached before the given Type descriptor + * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor. + * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor. + * \param[in] Type Descriptor type value to search for. + * \param[in] AfterType Descriptor type value which must be reached before the given Type descriptor. */ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem, void** const CurrConfigLoc, @@ -227,11 +227,11 @@ * * \note This function is available in USB Host mode only. * - * \param[in,out] BytesRem Pointer to an int storing the remaining bytes in the configuration descriptor - * \param[in,out] CurrConfigLoc Pointer to the current position in the configuration descriptor - * \param[in] ComparatorRoutine Name of the comparator search function to use on the configuration descriptor + * \param[in,out] BytesRem Pointer to an int storing the remaining bytes in the configuration descriptor. + * \param[in,out] CurrConfigLoc Pointer to the current position in the configuration descriptor. + * \param[in] ComparatorRoutine Name of the comparator search function to use on the configuration descriptor. * - * \return Value of one of the members of the \ref DSearch_Comp_Return_ErrorCodes_t enum + * \return Value of one of the members of the \ref DSearch_Comp_Return_ErrorCodes_t enum. * * Usage Example: * \code @@ -260,8 +260,8 @@ /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then points to the next sub-descriptor. The bytes remaining value is automatically decremented. * - * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor - * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor + * \param[in,out] BytesRem Pointer to the number of bytes remaining of the configuration descriptor. + * \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor. */ static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, void** CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/HighLevel/Events.h index 7e82ff36d..d88c47123 100644 --- a/LUFA/Drivers/USB/HighLevel/Events.h +++ b/LUFA/Drivers/USB/HighLevel/Events.h @@ -92,7 +92,7 @@ * * \note This event only exists on USB AVR models which support dual role modes. * - * \param[in] ErrorCode Error code indicating the failure reason, a value in \ref USB_InitErrorCodes_t + * \param[in] ErrorCode Error code indicating the failure reason, a value in \ref USB_InitErrorCodes_t. */ void EVENT_USB_InitFailure(const uint8_t ErrorCode); @@ -112,7 +112,7 @@ /** Event for USB host error. This event fires when a hardware fault has occurred whilst the USB * interface is in host mode. * - * \param[in] ErrorCode Error code indicating the failure reason, a value in \ref USB_Host_ErrorCodes_t + * \param[in] ErrorCode Error code indicating the failure reason, a value in \ref USB_Host_ErrorCodes_t. * * \note This event only exists on USB AVR models which supports host mode. * \n\n @@ -155,7 +155,7 @@ * in host mode, and an attached USB device has failed to enumerate completely. * * \param[in] ErrorCode Error code indicating the failure reason, a value in - * \ref USB_Host_EnumerationErrorCodes_t + * \ref USB_Host_EnumerationErrorCodes_t. * * \param[in] SubErrorCode Sub error code indicating the reason for failure - for example, if the * ErrorCode parameter indicates a control error, this will give the error diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h index 0b849bf19..2ff162286 100644 --- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h +++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h @@ -219,7 +219,7 @@ * Type define for all descriptors' standard header, indicating the descriptor's length and type. This structure * uses LUFA-specific element names to make each element's purpose clearer. * - * \see \ref USB_StdDescriptor_Header_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_Header_t for the version of this define with standard element names. */ typedef struct { @@ -234,7 +234,7 @@ * Type define for all descriptors' standard header, indicating the descriptor's length and type. This structure * uses the relevant standard's given element names to ensure compatibility with the standard. * - * \see \ref USB_Descriptor_Header_t for the version of this define with non-standard LUFA specific element names + * \see \ref USB_Descriptor_Header_t for the version of this define with non-standard LUFA specific element names. */ typedef struct { @@ -249,7 +249,7 @@ * Type define for a standard Device Descriptor. This structure uses LUFA-specific element names to make each * element's purpose clearer. * - * \see \ref USB_StdDescriptor_Device_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_Device_t for the version of this define with standard element names. */ typedef struct { @@ -298,7 +298,7 @@ * Type define for a standard Device Descriptor. This structure uses the relevant standard's given element names * to ensure compatibility with the standard. * - * \see \ref USB_Descriptor_Device_t for the version of this define with non-standard LUFA specific element names + * \see \ref USB_Descriptor_Device_t for the version of this define with non-standard LUFA specific element names. */ typedef struct { @@ -346,7 +346,7 @@ * Type define for a standard Configuration Descriptor header. This structure uses LUFA-specific element names * to make each element's purpose clearer. * - * \see \ref USB_StdDescriptor_Configuration_Header_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_Configuration_Header_t for the version of this define with standard element names. */ typedef struct { @@ -375,7 +375,7 @@ * Type define for a standard Configuration Descriptor header. This structure uses the relevant standard's given element names * to ensure compatibility with the standard. * - * \see \ref USB_Descriptor_Device_t for the version of this define with non-standard LUFA specific element names + * \see \ref USB_Descriptor_Device_t for the version of this define with non-standard LUFA specific element names. */ typedef struct { @@ -403,7 +403,7 @@ * Type define for a standard Interface Descriptor. This structure uses LUFA-specific element names * to make each element's purpose clearer. * - * \see \ref USB_StdDescriptor_Interface_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_Interface_t for the version of this define with standard element names. */ typedef struct { @@ -431,7 +431,7 @@ * Type define for a standard Interface Descriptor. This structure uses the relevant standard's given element names * to ensure compatibility with the standard. * - * \see \ref USB_Descriptor_Interface_t for the version of this define with non-standard LUFA specific element names + * \see \ref USB_Descriptor_Interface_t for the version of this define with non-standard LUFA specific element names. */ typedef struct { @@ -465,7 +465,7 @@ * together at the point of enumeration, loading one generic driver for all the interfaces in the single * function. Read the ECN for more information. * - * \see \ref USB_StdDescriptor_Interface_Association_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_Interface_Association_t for the version of this define with standard element names. */ typedef struct { @@ -495,7 +495,7 @@ * function. Read the ECN for more information. * * \see \ref USB_Descriptor_Interface_Association_t for the version of this define with non-standard LUFA specific - * element names + * element names. */ typedef struct { @@ -518,7 +518,7 @@ * Type define for a standard Endpoint Descriptor. This structure uses LUFA-specific element names * to make each element's purpose clearer. * - * \see \ref USB_StdDescriptor_Endpoint_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_Endpoint_t for the version of this define with standard element names. */ typedef struct { @@ -547,7 +547,7 @@ * element names to ensure compatibility with the standard. * * \see \ref USB_Descriptor_Endpoint_t for the version of this define with non-standard LUFA specific - * element names + * element names. */ typedef struct { @@ -582,7 +582,7 @@ * * This structure uses LUFA-specific element names to make each element's purpose clearer. * - * \see \ref USB_StdDescriptor_String_t for the version of this define with standard element names + * \see \ref USB_StdDescriptor_String_t for the version of this define with standard element names. */ typedef struct { @@ -613,7 +613,7 @@ * This structure uses the relevant standard's given element names to ensure compatibility with the standard. * * \see \ref USB_Descriptor_String_t for the version of this define with with non-standard LUFA specific - * element names + * element names. */ typedef struct { diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/HighLevel/USBTask.h index 1637fb416..cce7bb29e 100644 --- a/LUFA/Drivers/USB/HighLevel/USBTask.h +++ b/LUFA/Drivers/USB/HighLevel/USBTask.h @@ -107,7 +107,7 @@ * * \note This global is only present if the user application can be a USB host. * - * \see \ref USB_Host_States_t for a list of possible device states + * \see \ref USB_Host_States_t for a list of possible device states. * * \ingroup Group_Host */ @@ -140,7 +140,7 @@ * \note This variable should be treated as read-only in the user application, and never manually * changed in value except in the circumstances outlined above. * - * \see \ref USB_Device_States_t for a list of possible device states + * \see \ref USB_Device_States_t for a list of possible device states. * * \ingroup Group_Device */ diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h index 8568cff25..ab62c535a 100644 --- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h +++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h @@ -80,9 +80,9 @@ */ enum USB_DescriptorMemorySpaces_t { - MEMSPACE_FLASH = 0, /**< Indicates the requested descriptor is located in FLASH memory */ - MEMSPACE_EEPROM = 1, /**< Indicates the requested descriptor is located in EEPROM memory */ - MEMSPACE_RAM = 2, /**< Indicates the requested descriptor is located in RAM memory */ + MEMSPACE_FLASH = 0, /**< Indicates the requested descriptor is located in FLASH memory. */ + MEMSPACE_EEPROM = 1, /**< Indicates the requested descriptor is located in EEPROM memory. */ + MEMSPACE_RAM = 2, /**< Indicates the requested descriptor is located in RAM memory. */ }; #endif diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index cc2af15c0..7cd2d8b06 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -205,7 +205,7 @@ * USE_EEPROM_DESCRIPTORS tokens may be defined in the project makefile and passed to the compiler by the -D * switch. * - * \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise + * \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress #if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS) diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index 60e1018f6..daf3d814b 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -186,7 +186,7 @@ * * \ingroup Group_EndpointRW * - * \return Total number of bytes in the currently selected Endpoint's FIFO buffer + * \return Total number of bytes in the currently selected Endpoint's FIFO buffer. */ static inline uint16_t Endpoint_BytesInEndpoint(void); @@ -194,7 +194,7 @@ * the currently selected endpoint number so that it can be restored after another endpoint has * been manipulated. * - * \return Index of the currently selected endpoint + * \return Index of the currently selected endpoint. */ static inline uint8_t Endpoint_GetCurrentEndpoint(void); @@ -205,14 +205,14 @@ * Any endpoint operations which do not require the endpoint number to be indicated will operate on * the currently selected endpoint. * - * \param[in] EndpointNumber Endpoint number to select + * \param[in] EndpointNumber Endpoint number to select. */ static inline void Endpoint_SelectEndpoint(uint8_t EndpointNumber); /** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's * In and Out pointers to the bank's contents. * - * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset + * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset. */ static inline void Endpoint_ResetFIFO(uint8_t EndpointNumber); @@ -230,7 +230,7 @@ /** Determines if the currently selected endpoint is enabled, but not necessarily configured. * - * \return Boolean True if the currently selected endpoint is enabled, false otherwise + * \return Boolean True if the currently selected endpoint is enabled, false otherwise. */ static inline bool Endpoint_IsEnabled(void); @@ -242,13 +242,13 @@ * * \ingroup Group_EndpointPacketManagement * - * \return Boolean true if the currently selected endpoint may be read from or written to, depending on its direction + * \return Boolean true if the currently selected endpoint may be read from or written to, depending on its direction. */ static inline bool Endpoint_IsReadWriteAllowed(void); /** Determines if the currently selected endpoint is configured. * - * \return Boolean true if the currently selected endpoint has been configured, false otherwise + * \return Boolean true if the currently selected endpoint has been configured, false otherwise. */ static inline bool Endpoint_IsConfigured(void); @@ -256,16 +256,16 @@ * interrupt duration has elapsed. Which endpoints have interrupted can be determined by * masking the return value against (1 << {Endpoint Number}). * - * \return Mask whose bits indicate which endpoints have interrupted + * \return Mask whose bits indicate which endpoints have interrupted. */ static inline uint8_t Endpoint_GetEndpointInterrupts(void); /** Determines if the specified endpoint number has interrupted (valid only for INTERRUPT type * endpoints). * - * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested + * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested. * - * \return Boolean true if the specified endpoint has interrupted, false otherwise + * \return Boolean true if the specified endpoint has interrupted, false otherwise. */ static inline bool Endpoint_HasEndpointInterrupted(uint8_t EndpointNumber); @@ -339,7 +339,7 @@ * * \ingroup Group_EndpointPacketManagement * - * \return Boolean true if the currently selected endpoint is stalled, false otherwise + * \return Boolean true if the currently selected endpoint is stalled, false otherwise. */ static inline bool Endpoint_IsStalled(void); @@ -501,7 +501,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \return Next byte in the currently selected endpoint's FIFO buffer + * \return Next byte in the currently selected endpoint's FIFO buffer. */ static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_Read_Byte(void) @@ -513,7 +513,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \param[in] Byte Next byte to write into the the currently selected endpoint's FIFO buffer + * \param[in] Byte Next byte to write into the the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_Byte(const uint8_t Byte) @@ -538,7 +538,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \return Next word in the currently selected endpoint's FIFO buffer + * \return Next word in the currently selected endpoint's FIFO buffer. */ static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint16_t Endpoint_Read_Word_LE(void) @@ -560,7 +560,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \return Next word in the currently selected endpoint's FIFO buffer + * \return Next word in the currently selected endpoint's FIFO buffer. */ static inline uint16_t Endpoint_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint16_t Endpoint_Read_Word_BE(void) @@ -582,7 +582,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer + * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_Word_LE(const uint16_t Word) @@ -596,7 +596,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer + * \param[in] Word Next word to write to the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_Word_BE(const uint16_t Word) @@ -623,7 +623,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \return Next double word in the currently selected endpoint's FIFO buffer + * \return Next double word in the currently selected endpoint's FIFO buffer. */ static inline uint32_t Endpoint_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint32_t Endpoint_Read_DWord_LE(void) @@ -647,7 +647,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \return Next double word in the currently selected endpoint's FIFO buffer + * \return Next double word in the currently selected endpoint's FIFO buffer. */ static inline uint32_t Endpoint_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint32_t Endpoint_Read_DWord_BE(void) @@ -671,7 +671,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer + * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) @@ -687,7 +687,7 @@ * * \ingroup Group_EndpointPrimitiveRW * - * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer + * \param[in] DWord Next double word to write to the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) @@ -763,7 +763,7 @@ * \note This routine will select the specified endpoint, and the endpoint will remain selected * once the routine completes regardless of if the endpoint configuration succeeds. * - * \return Boolean true if the configuration succeeded, false otherwise + * \return Boolean true if the configuration succeeded, false otherwise. */ bool Endpoint_ConfigureEndpoint(const uint8_t Number, const uint8_t Type, const uint8_t Direction, const uint16_t Size, const uint8_t Banks); @@ -801,7 +801,7 @@ * \ingroup Group_EndpointStreamRW * * \param[in] Length Number of bytes to send via the currently selected endpoint. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -824,7 +824,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -836,7 +836,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -850,7 +850,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -873,7 +873,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -885,7 +885,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -899,7 +899,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected endpoint into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -922,7 +922,7 @@ * * \param[out] Buffer Pointer to the destination data buffer to write to. * \param[in] Length Number of bytes to send via the currently selected endpoint. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -934,7 +934,7 @@ * * \param[out] Buffer Pointer to the destination data buffer to write to, located in EEPROM memory space. * \param[in] Length Number of bytes to send via the currently selected endpoint. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -957,7 +957,7 @@ * * \param[out] Buffer Pointer to the destination data buffer to write to. * \param[in] Length Number of bytes to send via the currently selected endpoint. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ @@ -969,7 +969,7 @@ * * \param[out] Buffer Pointer to the destination data buffer to write to, located in EEPROM memory space. * \param[in] Length Number of bytes to send via the currently selected endpoint. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h index 736ed87cf..04d702eea 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.h +++ b/LUFA/Drivers/USB/LowLevel/Host.h @@ -134,21 +134,21 @@ * false otherwise. While suspended, no USB communications can occur until the bus is resumed, * except for the Remote Wakeup event from the device if supported. * - * \return Boolean true if the bus is currently suspended, false otherwise + * \return Boolean true if the bus is currently suspended, false otherwise. */ static inline bool USB_Host_IsBusSuspended(void); /** Determines if the attached device is currently enumerated in Full Speed mode (12Mb/s), or * false if the attached device is enumerated in Low Speed mode (1.5Mb/s). * - * \return Boolean true if the attached device is enumerated in Full Speed mode, false otherwise + * \return Boolean true if the attached device is enumerated in Full Speed mode, false otherwise. */ static inline bool USB_Host_IsDeviceFullSpeed(void); /** Determines if the attached device is currently issuing a Remote Wakeup request, requesting * that the host resume the USB bus and wake up the device, false otherwise. * - * \return Boolean true if the attached device has sent a Remote Wakeup request, false otherwise + * \return Boolean true if the attached device has sent a Remote Wakeup request, false otherwise. */ static inline bool USB_Host_IsRemoteWakeupSent(void); @@ -164,7 +164,7 @@ /** Determines if a resume from Remote Wakeup request is currently being sent to an attached * device. * - * \return Boolean true if no resume request is currently being sent, false otherwise + * \return Boolean true if no resume request is currently being sent, false otherwise. */ static inline bool USB_Host_IsResumeFromWakeupRequestSent(void); #else @@ -196,7 +196,7 @@ * * \note After this routine returns, the control pipe will be selected. * - * \param[in] ConfigNumber Configuration index to send to the device + * \param[in] ConfigNumber Configuration index to send to the device. * * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. */ @@ -209,7 +209,7 @@ * \note After this routine returns, the control pipe will be selected. * * \param[out] DeviceDescriptorPtr Pointer to the destination device descriptor structure where - * the read data is to be stored + * the read data is to be stored. * * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. */ @@ -222,10 +222,10 @@ * * \note After this routine returns, the control pipe will be selected. * - * \param[in] Index Index of the string index to retrieve + * \param[in] Index Index of the string index to retrieve. * \param[out] Buffer Pointer to the destination buffer where the retrieved string descriptor is - * to be stored - * \param[in] BufferLength Maximum size of the string descriptor which can be stored into the buffer + * to be stored. + * \param[in] BufferLength Maximum size of the string descriptor which can be stored into the buffer. * * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. */ @@ -235,7 +235,7 @@ * * \note After this routine returns, the control pipe will be selected. * - * \param[in] EndpointIndex Index of the endpoint to clear + * \param[in] EndpointIndex Index of the endpoint to clear. * * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. */ diff --git a/LUFA/Drivers/USB/LowLevel/OTG.h b/LUFA/Drivers/USB/LowLevel/OTG.h index 944fd72ac..021899803 100644 --- a/LUFA/Drivers/USB/LowLevel/OTG.h +++ b/LUFA/Drivers/USB/LowLevel/OTG.h @@ -66,13 +66,13 @@ /* Macros: */ /** Mask for the VBUS pulsing method of SRP, supported by some OTG devices. * - * \see USB_OTG_DEV_Initiate_SRP() + * \see \ref USB_OTG_Device_InitiateSRP(). */ #define USB_OTG_SRP_VBUS (1 << SRPSEL) /** Mask for the Data + pulsing method of SRP, supported by some OTG devices. * - * \see USB_OTG_DEV_Initiate_SRP() + * \see \ref USB_OTG_Device_InitiateSRP(). */ #define USB_OTG_STP_DATA 0 @@ -94,6 +94,18 @@ */ static inline bool USB_OTG_Device_IsSendingHNP(void); + /** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB + * interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in + * host mode indicates that VBUS should be applied and a session started. + * + * There are two different methods of sending a SRP - either pulses on the VBUS line, or by + * pulsing the Data + line via the internal pull-up resistor. + * + * \param[in] SRPTypeMask Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or + * \ref USB_OTG_STP_DATA. + */ + static inline void USB_OTG_Device_InitiateSRP(uint8_t SRPTypeMask); + /** Accepts a HNP from a connected device, indicating that both devices should exchange * device/host roles. */ @@ -109,17 +121,6 @@ * \return Boolean true if a HNP is currently being issued by the connected device, false otherwise. */ static inline bool USB_OTG_Host_IsHNPReceived(void); - - /** Initiates a Session Request Protocol request. Most OTG devices turn off VBUS when the USB - * interface is not in use, to conserve power. Sending a SRP to a USB OTG device running in - * host mode indicates that VBUS should be applied and a session started. - * - * There are two different methods of sending a SRP - either pulses on the VBUS line, or by - * pulsing the Data + line via the internal pull-up resistor. - * - * \param[in] SRPTypeMask Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or \ref USB_OTG_STP_DATA. - */ - static inline void USB_OTG_Dev_InitiateSRP(uint8_t SRPTypeMask); #else #define USB_OTG_Device_RequestHNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE @@ -127,13 +128,13 @@ #define USB_OTG_Device_IsSendingHNP() ((OTGCON & (1 << HNPREQ)) ? true : false) + #define USB_OTG_Device_InitiateSRP(type) MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | ((type) | (1 << SRPREQ))); }MACROE + #define USB_OTG_Host_AcceptHNP() MACROS{ OTGCON |= (1 << HNPREQ); }MACROE #define USB_OTG_Host_RejectHNP() MACROS{ OTGCON &= ~(1 << HNPREQ); }MACROE - #define USB_OTG_Host_IsHNPReceived() ((OTGCON & (1 << HNPREQ)) ? true : false) - - #define USB_OTG_Device_InitiateSRP(type) MACROS{ OTGCON = ((OTGCON & ~(1 << SRPSEL)) | ((type) | (1 << SRPREQ))); }MACROE + #define USB_OTG_Host_IsHNPReceived() ((OTGCON & (1 << HNPREQ)) ? true : false) #endif #endif diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 7283fc820..05e393ec8 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -204,27 +204,27 @@ * * \ingroup Group_PipeRW * - * \return Total number of bytes in the currently selected Pipe's FIFO buffer + * \return Total number of bytes in the currently selected Pipe's FIFO buffer. */ static inline uint16_t Pipe_BytesInPipe(void); /** Returns the pipe address of the currently selected pipe. This is typically used to save the * currently selected pipe number so that it can be restored after another pipe has been manipulated. * - * \return Index of the currently selected pipe + * \return Index of the currently selected pipe. */ static inline uint8_t Pipe_GetCurrentPipe(void); /** Selects the given pipe number. Any pipe operations which do not require the pipe number to be * indicated will operate on the currently selected pipe. * - * \param[in] PipeNumber Index of the pipe to select + * \param[in] PipeNumber Index of the pipe to select. */ static inline void Pipe_SelectPipe(uint8_t PipeNumber); /** Resets the desired pipe, including the pipe banks and flags. * - * \param[in] PipeNumber Index of the pipe to reset + * \param[in] PipeNumber Index of the pipe to reset. */ static inline void Pipe_ResetPipe(uint8_t PipeNumber); @@ -242,13 +242,13 @@ /** Determines if the currently selected pipe is enabled, but not necessarily configured. * - * \return Boolean True if the currently selected pipe is enabled, false otherwise + * \return Boolean True if the currently selected pipe is enabled, false otherwise. */ static inline bool Pipe_IsEnabled(void); /** Gets the current pipe token, indicating the pipe's data direction and type. * - * \return The current pipe token, as a PIPE_TOKEN_* mask + * \return The current pipe token, as a PIPE_TOKEN_* mask. */ static inline uint8_t Pipe_GetPipeToken(void); @@ -257,7 +257,7 @@ * control requests, or on regular pipes to allow for half-duplex bidirectional data transfer to devices * which have two endpoints of opposite direction sharing the same endpoint address within the device. * - * \param[in] Token New pipe token to set the selected pipe to, as a PIPE_TOKEN_* mask + * \param[in] Token New pipe token to set the selected pipe to, as a PIPE_TOKEN_* mask. */ static inline void Pipe_SetPipeToken(uint8_t Token); @@ -267,42 +267,42 @@ /** Configures the currently selected pipe to only allow the specified number of IN requests to be * accepted by the pipe before it is automatically frozen. * - * \param[in] TotalINRequests Total number of IN requests that the pipe may receive before freezing + * \param[in] TotalINRequests Total number of IN requests that the pipe may receive before freezing. */ static inline void Pipe_SetFiniteINRequests(uint8_t TotalINRequests); /** Determines if the currently selected pipe is configured. * - * \return Boolean true if the selected pipe is configured, false otherwise + * \return Boolean true if the selected pipe is configured, false otherwise. */ static inline bool Pipe_IsConfigured(void); /** Retrieves the endpoint number of the endpoint within the attached device that the currently selected * pipe is bound to. * - * \return Endpoint number the currently selected pipe is bound to + * \return Endpoint number the currently selected pipe is bound to. */ static inline uint8_t Pipe_BoundEndpointNumber(void); /** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds. * - * \param[in] Milliseconds Number of milliseconds between each pipe poll + * \param[in] Milliseconds Number of milliseconds between each pipe poll. */ static inline void Pipe_SetInterruptPeriod(uint8_t Milliseconds); /** Returns a mask indicating which pipe's interrupt periods have elapsed, indicating that the pipe should * be serviced. * - * \return Mask whose bits indicate which pipes have interrupted + * \return Mask whose bits indicate which pipes have interrupted. */ static inline uint8_t Pipe_GetPipeInterrupts(void); /** Determines if the specified pipe number has interrupted (valid only for INTERRUPT type * pipes). * - * \param[in] PipeNumber Index of the pipe whose interrupt flag should be tested + * \param[in] PipeNumber Index of the pipe whose interrupt flag should be tested. * - * \return Boolean true if the specified pipe has interrupted, false otherwise + * \return Boolean true if the specified pipe has interrupted, false otherwise. */ static inline bool Pipe_HasPipeInterrupted(uint8_t PipeNumber); @@ -314,7 +314,7 @@ /** 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 + * \return Boolean true if the currently selected pipe is frozen, false otherwise. */ static inline bool Pipe_IsFrozen(void); @@ -326,7 +326,7 @@ * * \see \ref Pipe_GetErrorFlags() macro for information on retrieving the exact error flag. * - * \return Boolean true if an error has occurred on the selected pipe, false otherwise + * \return Boolean true if an error has occurred on the selected pipe, false otherwise. */ static inline bool Pipe_IsError(void); @@ -338,7 +338,7 @@ /** Gets a mask of the hardware error flags which have occurred on the currently selected pipe. This * value can then be masked against the PIPE_ERRORFLAG_* masks to determine what error has occurred. * - * \return Mask comprising of PIPE_ERRORFLAG_* bits indicating what error has occurred on the selected pipe + * \return Mask comprising of PIPE_ERRORFLAG_* bits indicating what error has occurred on the selected pipe. */ static inline uint8_t Pipe_GetErrorFlags(void); @@ -352,7 +352,7 @@ * * \ingroup Group_PipePacketManagement * - * \return Boolean true if the currently selected pipe may be read from or written to, depending on its direction + * \return Boolean true if the currently selected pipe may be read from or written to, depending on its direction. */ static inline bool Pipe_IsReadWriteAllowed(void); @@ -409,7 +409,7 @@ * * \ingroup Group_PipePacketManagement * - * \return Boolean true if an NAK has been received on the current pipe, false otherwise + * \return Boolean true if an NAK has been received on the current pipe, false otherwise. */ static inline bool Pipe_IsNAKReceived(void); @@ -425,7 +425,7 @@ * * \ingroup Group_PipePacketManagement * - * \return Boolean true if the current pipe has been stalled by the attached device, false otherwise + * \return Boolean true if the current pipe has been stalled by the attached device, false otherwise. */ static inline bool Pipe_IsStalled(void); @@ -509,13 +509,13 @@ #endif /* Enums: */ - /** Enum for the possible error return codes of the Pipe_WaitUntilReady function + /** Enum for the possible error return codes of the Pipe_WaitUntilReady function. * * \ingroup Group_PipeRW */ enum Pipe_WaitUntilReady_ErrorCodes_t { - PIPE_READYWAIT_NoError = 0, /**< Pipe ready for next packet, no error */ + PIPE_READYWAIT_NoError = 0, /**< Pipe ready for next packet, no error. */ PIPE_READYWAIT_PipeStalled = 1, /**< The device stalled the pipe while waiting. */ PIPE_READYWAIT_DeviceDisconnected = 2, /**< Device was disconnected from the host while waiting. */ PIPE_READYWAIT_Timeout = 3, /**< The device failed to accept or send the next packet @@ -549,7 +549,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \return Next byte in the currently selected pipe's FIFO buffer + * \return Next byte in the currently selected pipe's FIFO buffer. */ static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Pipe_Read_Byte(void) @@ -561,7 +561,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \param[in] Byte Next byte to write into the the currently selected pipe's FIFO buffer + * \param[in] Byte Next byte to write into the the currently selected pipe's FIFO buffer. */ static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE; static inline void Pipe_Write_Byte(const uint8_t Byte) @@ -586,7 +586,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \return Next word in the currently selected pipe's FIFO buffer + * \return Next word in the currently selected pipe's FIFO buffer. */ static inline uint16_t Pipe_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint16_t Pipe_Read_Word_LE(void) @@ -608,7 +608,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \return Next word in the currently selected pipe's FIFO buffer + * \return Next word in the currently selected pipe's FIFO buffer. */ static inline uint16_t Pipe_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint16_t Pipe_Read_Word_BE(void) @@ -630,7 +630,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer + * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer. */ static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE; static inline void Pipe_Write_Word_LE(const uint16_t Word) @@ -644,7 +644,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer + * \param[in] Word Next word to write to the currently selected pipe's FIFO buffer. */ static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE; static inline void Pipe_Write_Word_BE(const uint16_t Word) @@ -671,7 +671,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \return Next double word in the currently selected pipe's FIFO buffer + * \return Next double word in the currently selected pipe's FIFO buffer. */ static inline uint32_t Pipe_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint32_t Pipe_Read_DWord_LE(void) @@ -695,7 +695,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \return Next double word in the currently selected pipe's FIFO buffer + * \return Next double word in the currently selected pipe's FIFO buffer. */ static inline uint32_t Pipe_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint32_t Pipe_Read_DWord_BE(void) @@ -719,7 +719,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer + * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer. */ static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE; static inline void Pipe_Write_DWord_LE(const uint32_t DWord) @@ -735,7 +735,7 @@ * * \ingroup Group_PipePrimitiveRW * - * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer + * \param[in] DWord Next double word to write to the currently selected pipe's FIFO buffer. */ static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE; static inline void Pipe_Write_DWord_BE(const uint32_t DWord) @@ -806,7 +806,7 @@ * \note This routine will select the specified pipe, and the pipe will remain selected once the * routine completes regardless of if the pipe configuration succeeds. * - * \return Boolean true if the configuration is successful, false otherwise + * \return Boolean true if the configuration is successful, false otherwise. */ bool Pipe_ConfigurePipe(const uint8_t Number, const uint8_t Type, const uint8_t Token, const uint8_t EndpointNumber, const uint16_t Size, const uint8_t Banks); @@ -823,10 +823,10 @@ /** Determines if a pipe has been bound to the given device endpoint address. If a pipe which is bound to the given * endpoint is found, it is automatically selected. * - * \param[in] EndpointAddress Address and direction mask of the endpoint within the attached device to check + * \param[in] EndpointAddress Address and direction mask of the endpoint within the attached device to check. * * \return Boolean true if a pipe bound to the given endpoint address of the specified direction is found, false - * otherwise + * otherwise. */ bool Pipe_IsEndpointBound(const uint8_t EndpointAddress); @@ -846,7 +846,7 @@ * \ingroup Group_PipeStreamRW * * \param[in] Length Number of bytes to send via the currently selected pipe. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -869,7 +869,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected pipe into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -881,7 +881,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected pipe into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -895,7 +895,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected pipe into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -918,7 +918,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected pipe into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -930,7 +930,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected pipe into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -944,7 +944,7 @@ * * \param[in] Buffer Pointer to the source data buffer to read from. * \param[in] Length Number of bytes to read for the currently selected pipe into the buffer. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -967,7 +967,7 @@ * * \param[out] Buffer Pointer to the source data buffer to write to. * \param[in] Length Number of bytes to read for the currently selected pipe to read from. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -979,7 +979,7 @@ * * \param[out] Buffer Pointer to the source data buffer to write to. * \param[in] Length Number of bytes to read for the currently selected pipe to read from. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -1002,7 +1002,7 @@ * * \param[out] Buffer Pointer to the source data buffer to write to. * \param[in] Length Number of bytes to read for the currently selected pipe to read from. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ @@ -1014,7 +1014,7 @@ * * \param[out] Buffer Pointer to the source data buffer to write to. * \param[in] Length Number of bytes to read for the currently selected pipe to read from. - * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback + * \param[in] Callback Name of a callback routine to call between successive USB packet transfers, NULL if no callback. * * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h index 8b151b59f..234d6f9e3 100644 --- a/LUFA/Drivers/USB/USB.h +++ b/LUFA/Drivers/USB/USB.h @@ -37,7 +37,7 @@ * including any headers in the USB/LowLevel/ or USB/HighLevel/ subdirectories. */ -/** @defgroup Group_USB USB - LUFA/Drivers/USB/USB.h +/** @defgroup Group_USB USB Core - LUFA/Drivers/USB/USB.h * * \section Sec_Dependencies Module Source Dependencies * The following files must be built with any user project that uses this module: @@ -67,8 +67,7 @@ * of USB management functions found \ref Group_USBManagement. */ -/** \ingroup Group_USB - * @defgroup Group_USBClassDrivers USB Class Drivers +/** @defgroup Group_USBClassDrivers USB Class Drivers * * Drivers for both host and device mode of the standard USB classes, for rapid application development. * Class drivers give a framework which sits on top of the low level library API, allowing for standard diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index e97c515a6..01e219e57 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -20,6 +20,7 @@ * - Changed over the AVRISP-MKII and TemperatureDataLogger projects to use eeprom_update_byte() when writing non-volatile * parameters to EEPROM to preserve its lifespan * - Removed unused line encoding data and control requests from the CDC Bootloader code, to save space + * - Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT() * * Fixed: * - Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h index 71be82bee..a5aa942eb 100644 --- a/LUFA/Scheduler/Scheduler.h +++ b/LUFA/Scheduler/Scheduler.h @@ -128,14 +128,14 @@ #define TASK_LIST TaskEntry_t Scheduler_TaskList[] = /** Constant, giving the maximum delay in scheduler ticks which can be stored in a variable of type - * SchedulerDelayCounter_t. + * \ref SchedulerDelayCounter_t. */ #define TASK_MAX_DELAY (MAX_DELAYCTR_COUNT - 1) - /** Task status mode constant, for passing to Scheduler_SetTaskMode() or Scheduler_SetGroupTaskMode(). */ + /** Task status mode constant, for passing to \ref Scheduler_SetTaskMode() or \ref Scheduler_SetGroupTaskMode(). */ #define TASK_RUN true - /** Task status mode constant, for passing to Scheduler_SetTaskMode() or Scheduler_SetGroupTaskMode(). */ + /** Task status mode constant, for passing to \ref Scheduler_SetTaskMode() or \ref Scheduler_SetGroupTaskMode(). */ #define TASK_STOP false /* Pseudo-Function Macros: */ @@ -152,7 +152,6 @@ void Scheduler_Init(void); #else #define Scheduler_Start() Scheduler_GoSchedule(TOTAL_TASKS); - #define Scheduler_Init() Scheduler_InitScheduler(TOTAL_TASKS); #endif @@ -184,7 +183,7 @@ exter TaskEntry_t Scheduler_TaskList[]; /** Contains the total number of tasks in the task list, irrespective of if the task's status is set to - * TASK_RUN or TASK_STOP. + * \ref TASK_RUN or \ref TASK_STOP. * * \note This value should be treated as read-only, and never altered in user-code. */ @@ -213,12 +212,12 @@ } /* Function Prototypes: */ - /** Determines if the given tick delay has elapsed, based on the given . + /** Determines if the given tick delay has elapsed, based on the given delay period and tick counter value. * - * \param[in] Delay The delay to test for, measured in ticks - * \param[in] DelayCounter The counter which is storing the starting tick value for the delay + * \param[in] Delay The delay to test for, measured in ticks. + * \param[in] DelayCounter The counter which is storing the starting tick value for the delay. * - * \return Boolean true if the delay has elapsed, false otherwise + * \return Boolean true if the delay has elapsed, false otherwise. * * Usage Example: * \code @@ -237,16 +236,16 @@ /** Sets the task mode for a given task. * - * \param[in] Task Name of the task whose status is to be changed - * \param[in] TaskStatus New task status for the task (TASK_RUN or TASK_STOP) + * \param[in] Task Name of the task whose status is to be changed. + * \param[in] TaskStatus New task status for the task (\ref TASK_RUN or \ref TASK_STOP). */ void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus); /** Sets the task mode for a given task group ID, allowing for an entire group of tasks to have their * statuses changed at once. * - * \param[in] GroupID Value of the task group ID whose status is to be changed - * \param[in] TaskStatus New task status for tasks in the specified group (TASK_RUN or TASK_STOP) + * \param[in] GroupID Value of the task group ID whose status is to be changed. + * \param[in] TaskStatus New task status for tasks in the specified group (\ref TASK_RUN or \ref TASK_STOP). */ void Scheduler_SetGroupTaskMode(const uint8_t GroupID, const bool TaskStatus); -- cgit v1.2.3