Commit deed746d authored by Dean Camera's avatar Dean Camera
Browse files

Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT().

Minor tweaks to the library documentation.
parent 69dc32c5
...@@ -124,15 +124,15 @@ ...@@ -124,15 +124,15 @@
/** Places the function in one of the initialization sections, which execute before the main function /** 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. * 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. /** 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 #endif
/** @} */ /** @} */
...@@ -99,17 +99,17 @@ ...@@ -99,17 +99,17 @@
*/ */
#define JTAG_DEBUG_ASSERT(x) MACROS{ if (!(x)) { JTAG_DEBUG_BREAK(); } }MACROE #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 /** Macro for testing condition "x" and writing debug data to the stdout stream if false. The stdout stream
* prerequisite for this macro, the serial stream should be configured via the Peripheral/SerialStream driver. * 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 * The output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion {x} failed."
* {x} failed."
* *
* \ingroup Group_Debugging * \ingroup Group_Debugging
*/ */
#define SERIAL_STREAM_ASSERT(x) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \ #define STDOUT_ASSERT(x) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \
"Assertion \"%s\" failed.\r\n"), \ "Assertion \"%s\" failed.\r\n"), \
__FILE__, __func__, __LINE__, #x); } \ __FILE__, __func__, __LINE__, #x); } \
}MACROE }MACROE
/* Inline Functions: */ /* Inline Functions: */
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
* *
* \ingroup Group_BitManip * \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) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint8_t BitReverse(uint8_t Byte) static inline uint8_t BitReverse(uint8_t Byte)
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
* *
* \ingroup Group_BitManip * \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) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint16_t SwapEndian_16(uint16_t Word) static inline uint16_t SwapEndian_16(uint16_t Word)
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
* *
* \ingroup Group_BitManip * \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) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint32_t SwapEndian_32(uint32_t DWord) static inline uint32_t SwapEndian_32(uint32_t DWord)
...@@ -161,8 +161,8 @@ ...@@ -161,8 +161,8 @@
* *
* \ingroup Group_BitManip * \ingroup Group_BitManip
* *
* \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed * \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] 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);
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 = ...@@ -636,7 +636,7 @@ EXCLUDE_PATTERNS =
# wildcard * is used, a substring. Examples: ANamespace, AClass, # wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test # AClass::ANamespace, ANamespace::*Test
EXCLUDE_SYMBOLS = __* EXCLUDE_SYMBOLS = _* __*
# The EXAMPLE_PATH tag can be used to specify one or more files or # The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see # directories that contain example code fragments that are included (see
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
/** Returns a mask indicating which board buttons are currently pressed. /** 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; static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
#endif #endif
......
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
/** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with /** 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. * dataflash commands which require a complete 24-byte address.
* *
* \param[in] PageAddress Page address within the selected dataflash IC * \param[in] PageAddress Page address within the selected dataflash IC.
* \param[in] BufferByte Address within the dataflash's buffer * \param[in] BufferByte Address within the dataflash's buffer.
*/ */
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte); static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte);
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
* currently facing in (multiple bits can be set). * currently facing in (multiple bits can be set).
* *
* \return Mask indicating the joystick direction - see corresponding board specific Joystick.h file * \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; static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
#endif #endif
......
...@@ -140,41 +140,41 @@ ...@@ -140,41 +140,41 @@
/** Turns on the LEDs specified in the given LED mask. /** 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); static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask);
/** Turns off the LEDs specified in the given LED mask. /** 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); 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 /** Turns off all LEDs not specified in the given LED mask, and turns on all the LEDs in the given LED
* mask. * 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); 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 /** 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. * 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] 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] 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); 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. /** 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); 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 /** Returns the status of all the board LEDs; set LED masks in the return value indicate that the
* corresponding LED is on. * 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; static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
#endif #endif
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
/** Performs a complete ADC on the temperature sensor channel, and converts the result into a /** 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. * 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; int8_t Temperature_GetTemperature(void) ATTR_WARN_UNUSED_RESULT;
......
...@@ -63,7 +63,10 @@ ...@@ -63,7 +63,10 @@
/* Public Interface - May be used in end-application: */ /* Public Interface - May be used in end-application: */
/* Macros: */ /* Macros: */
#if !defined(DISABLE_TERMINAL_CODES) #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 #define ANSI_ESCAPE_SEQUENCE(c) "\33[" c
#else #else
#define ANSI_ESCAPE_SEQUENCE(c) #define ANSI_ESCAPE_SEQUENCE(c)
......
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
* The "mode" parameter should be a mask comprised of a conversion mode (free running or single) and * The "mode" parameter should be a mask comprised of a conversion mode (free running or single) and
* prescaler masks. * 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); static inline void ADC_Init(uint8_t Mode);
...@@ -221,14 +221,14 @@ ...@@ -221,14 +221,14 @@
/** Indicates if the current ADC conversion is completed, or still in progress. /** 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 * \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); static inline bool ADC_IsReadingComplete(void);
/** Retrieves the conversion value of the last completed ADC conversion and clears the reading /** Retrieves the conversion value of the last completed ADC conversion and clears the reading
* completion flag. * 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); static inline uint16_t ADC_GetResult(void);
#else #else
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
* *
* \note The channel number must be specified as an integer, and NOT a ADC_CHANNELx mask. * \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) static inline void ADC_SetupChannel(const uint8_t Channel)
{ {
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
* *
* \note The channel number must be specified as an integer, and NOT a ADC_CHANNELx mask. * \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) static inline void ADC_DisableChannel(const uint8_t Channel)
{ {
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
* conversions. If the ADC is in single conversion mode (or the channel to convert from is to be changed), * 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. * 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) static inline void ADC_StartReading(const uint16_t MUXMask)
{ {
...@@ -361,7 +361,7 @@ ...@@ -361,7 +361,7 @@
* to \ref ADC_StartReading() to select the channel and begin the automated conversions, and * 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. * 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) ATTR_WARN_UNUSED_RESULT;
static inline uint16_t ADC_GetChannelReading(const uint16_t MUXMask) static inline uint16_t ADC_GetChannelReading(const uint16_t MUXMask)
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
* SPI routines. * SPI routines.
* *
* \param[in] SPIOptions SPI Options, a mask consisting of one of each of the SPI_SPEED_*, * \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) static inline void SPI_Init(const uint8_t SPIOptions)
{ {
...@@ -138,9 +138,9 @@ ...@@ -138,9 +138,9 @@
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete. /** 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) ATTR_ALWAYS_INLINE;
static inline uint8_t SPI_TransferByte(const uint8_t Byte) static inline uint8_t SPI_TransferByte(const uint8_t Byte)
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
/** Sends a byte through the SPI interface, blocking until the transfer is complete. The response /** 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. * 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) ATTR_ALWAYS_INLINE;
static inline void SPI_SendByte(const uint8_t Byte) static inline void SPI_SendByte(const uint8_t Byte)
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
/** Sends a dummy byte through the SPI interface, blocking until the transfer is complete. The response /** Sends a dummy byte through the SPI interface, blocking until the transfer is complete. The response
* byte from the attached SPI device is returned. * 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) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint8_t SPI_ReceiveByte(void) static inline uint8_t SPI_ReceiveByte(void)
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#if defined(__DOXYGEN__) #if defined(__DOXYGEN__)
/** Indicates whether a character has been received through the USART. /** 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); static inline bool Serial_IsCharReceived(void);
#else #else
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
/* Function Prototypes: */ /* Function Prototypes: */
/** Transmits a given string located in program space (FLASH) through the USART. /** 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); void Serial_TxString_P(const char *FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);
/** Transmits a given string located in SRAM memory through the USART. /** 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); void Serial_TxString(const char *StringPtr) ATTR_NON_NULL_PTR_ARG(1);
...@@ -104,8 +104,8 @@ ...@@ -104,8 +104,8 @@
/** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to /** 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. * 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] 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] 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) static inline void Serial_Init(const uint32_t BaudRate, const bool DoubleSpeed)
{ {
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
/** Transmits a given byte through the USART. /** 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) static inline void Serial_TxByte(const char DataByte)
{ {
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
/** Receives a byte from the USART. /** Receives a byte from the USART.
* *
* \return Byte received from the USART * \return Byte received from the USART.
*/ */
static inline char Serial_RxByte(void) static inline char Serial_RxByte(void)
{ {
......
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
/** Initializes the serial stream (and regular USART driver) so that both the stream and regular /** 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. * 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] 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] 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) static inline void SerialStream_Init(const uint32_t BaudRate, const bool DoubleSpeed)
{ {
......
This diff is collapsed.
...@@ -66,22 +66,22 @@ ...@@ -66,22 +66,22 @@
#endif #endif
/* Macros: */ /* 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 #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 #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 #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 #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 #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 #define REQ_GetEncapsulatedResponse 0x01
/** Notification type constant for a change in the virtual serial port handshake line states, for /** Notification type constant for a change in the virtual serial port handshake line states, for
...@@ -90,47 +90,47 @@ ...@@ -90,47 +90,47 @@
*/ */
#define NOTIF_SerialState 0x20 #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. * from the host, to indicate that the DTR line state should be high.
*/ */
#define CDC_CONTROL_LINE_OUT_DTR (1 << 0) #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. * from the host, to indicate that theRTS line state should be high.
*/ */
#define CDC_CONTROL_LINE_OUT_RTS (1 << 1) #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. * from the device to the host, to indicate that the DCD line state is currently high.
*/ */
#define CDC_CONTROL_LINE_IN_DCD (1 << 0) #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. * from the device to the host, to indicate that the DSR line state is currently high.
*/ */
#define CDC_CONTROL_LINE_IN_DSR (1 << 1) #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. * from the device to the host, to indicate that the BREAK line state is currently high.
*/ */
#define CDC_CONTROL_LINE_IN_BREAK (1 << 2)