Commit deed746d authored by Dean Camera's avatar Dean Camera

Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT().

Minor tweaks to the library documentation.
parent 69dc32c5
......@@ -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
/** @} */
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
{
......
......@@ -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)
{
......
This diff is collapsed.
......@@ -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: */
......
......@@ -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. */
......
......@@ -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.