diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-20 15:43:51 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-20 15:43:51 +0000 |
commit | 063474561de084fbdd8c1ddc02fcce5b8abebe3e (patch) | |
tree | 831ba5778a2b6adf6f05be487f91d87ab1c18f2c /LUFA | |
parent | 666088a38818e371cc8ad89360c960d86b311a49 (diff) | |
parent | b181cf4fb87c289b2aed93e44d03b20b6b9ba623 (diff) | |
download | lufa-063474561de084fbdd8c1ddc02fcce5b8abebe3e.tar.gz lufa-063474561de084fbdd8c1ddc02fcce5b8abebe3e.tar.bz2 lufa-063474561de084fbdd8c1ddc02fcce5b8abebe3e.zip |
Merge in latest trunk.
Diffstat (limited to 'LUFA')
45 files changed, 289 insertions, 220 deletions
diff --git a/LUFA/CodeTemplates/makefile_template.avr8 b/LUFA/CodeTemplates/makefile_template.avr8 index cee6f527d..bdae557b5 100644 --- a/LUFA/CodeTemplates/makefile_template.avr8 +++ b/LUFA/CodeTemplates/makefile_template.avr8 @@ -683,7 +683,7 @@ clean_list : doxygen: @echo Generating Project Documentation \($(TARGET)\)... - @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \ + @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \ exit 1; \ fi; @echo Documentation Generation Complete. diff --git a/LUFA/CodeTemplates/makefile_template.uc3 b/LUFA/CodeTemplates/makefile_template.uc3 index 982576064..1a9dff952 100644 --- a/LUFA/CodeTemplates/makefile_template.uc3 +++ b/LUFA/CodeTemplates/makefile_template.uc3 @@ -188,7 +188,7 @@ CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -masm-addr-pseudos -CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) +#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) CFLAGS += $(CSTANDARD) @@ -211,7 +211,7 @@ CPPFLAGS += -fno-exceptions CPPFLAGS += -masm-addr-pseudos CPPFLAGS += -Wall CPPFLAGS += -Wundef -CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) +#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) #CPPFLAGS += $(CSTANDARD) @@ -225,7 +225,8 @@ CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) # files -- see avr-libc docs [FIXME: not yet described there] # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. -ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 +ASFLAGS = $(ADEFS) +#ASFLAGS += -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 #---------------- Linker Options ---------------- @@ -456,7 +457,7 @@ clean_list : doxygen: @echo Generating Project Documentation \($(TARGET)\)... - @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \ + @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \ exit 1; \ fi; @echo Documentation Generation Complete. diff --git a/LUFA/CodeTemplates/makefile_template.xmega b/LUFA/CodeTemplates/makefile_template.xmega index ee9561032..4f10f84cd 100644 --- a/LUFA/CodeTemplates/makefile_template.xmega +++ b/LUFA/CodeTemplates/makefile_template.xmega @@ -675,7 +675,7 @@ clean_list : doxygen: @echo Generating Project Documentation \($(TARGET)\)... - @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \ + @if ( ( cat Doxygen.conf ; echo "HTML_STYLESHEET=$(LUFA_PATH)/LUFA/DoxygenPages/Style/Style.css" ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \ exit 1; \ fi; @echo Documentation Generation Complete. diff --git a/LUFA/Doxygen.conf b/LUFA/Doxygen.conf index 0edee54cd..5c3bf65b8 100644 --- a/LUFA/Doxygen.conf +++ b/LUFA/Doxygen.conf @@ -1,4 +1,4 @@ -# Doxyfile 1.8.0 +# Doxyfile 1.8.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -563,12 +563,6 @@ MAX_INITIALIZER_LINES = 15 SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = YES - # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. @@ -960,12 +954,6 @@ HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = NO -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports @@ -974,6 +962,17 @@ HTML_ALIGN_MEMBERS = YES HTML_DYNAMIC_SECTIONS = YES +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of +# entries shown in the various tree structured indices initially; the user +# can expand and collapse entries dynamically later on. Doxygen will expand +# the tree to such a level that at most the specified number of entries are +# visible (unless a fully collapsed tree already exceeds this amount). +# So setting the number of entries 1 will produce a full collapsed tree by +# default. 0 is a special value representing an infinite number of entries +# and will result in a full expanded tree by default. + +HTML_INDEX_NUM_ENTRIES = 100 + # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). @@ -1152,11 +1151,6 @@ GENERATE_TREEVIEW = YES ENUM_VALUES_PER_LINE = 1 -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = YES - # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. @@ -1727,7 +1721,7 @@ CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = NO -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index ffc4dfee7..7758f8b94 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -22,6 +22,7 @@ * - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices * - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use * - Added new SerialToLCD user project contributed by Simon Foster + * - Added new RESET_TOGGLES_LIBUSB_COMPAT compile time option to the AVRISP-MKII clone programmer project (thanks to Robert Spitzenpfeil) * * <b>Changed:</b> * - Core: diff --git a/LUFA/DoxygenPages/SoftwareBootloaderJump.txt b/LUFA/DoxygenPages/SoftwareBootloaderJump.txt index 1fad85fb7..09de9234d 100644 --- a/LUFA/DoxygenPages/SoftwareBootloaderJump.txt +++ b/LUFA/DoxygenPages/SoftwareBootloaderJump.txt @@ -25,15 +25,15 @@ * #include <avr/wdt.h> * #include <avr/io.h> * #include <util/delay.h> - * + * * #include <LUFA/Common/Common.h> * #include <LUFA/Drivers/USB/USB.h> - * + * * uint32_t Boot_Key ATTR_NO_INIT; - * + * * #define MAGIC_BOOT_KEY 0xDC42ACCA * #define BOOTLOADER_START_ADDRESS (FLASH_SIZE_BYTES - BOOTLOADER_SEC_SIZE_BYTES) - * + * * void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3); * void Bootloader_Jump_Check(void) * { @@ -44,18 +44,18 @@ * ((void (*)(void))BOOTLOADER_START_ADDRESS)(); * } * } - * + * * void Jump_To_Bootloader(void) * { * // If USB is used, detach from the bus and reset it * USB_Disable(); - * + * * // Disable all interrupts * cli(); - * + * * // Wait two seconds for the USB detachment to register on the host * Delay_MS(2000); - * + * * // Set the bootloader key to the magic value and force a reset * Boot_Key = MAGIC_BOOT_KEY; * wdt_enable(WDTO_250MS); diff --git a/LUFA/DoxygenPages/Style/Footer.htm b/LUFA/DoxygenPages/Style/Footer.htm index 70bce5313..a72c5bdd2 100644 --- a/LUFA/DoxygenPages/Style/Footer.htm +++ b/LUFA/DoxygenPages/Style/Footer.htm @@ -1,15 +1,35 @@ <!--BEGIN GENERATE_TREEVIEW--> - <span style="margin-right: 20px; float: right;"> + <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> + <ul> + <li class="footer" style="float:left !important;"> + $generatedby + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="$relpath$doxygen.png" alt="doxygen"/> + </a> + $doxygenversion + </li> + + <li class="footer"> <a href="http://www.lufa-lib.org" title="LUFA Project Page">LUFA Project Page</a> | <a href="http://www.lufa-lib.org/support" title="LUFA Support List">Support Mailing List</a> | <a href="http://www.lufa-lib.org/donate" title="Donate to Support LUFA">Donate</a> | <a href="http://www.fourwalledcubicle.com" title="Four Walled Cubicle Website">Four Walled Cubicle</a> - LUFA, the Lightweight USB Framework for AVRs - </span> + </li> </ul> </div> <!--END GENERATE_TREEVIEW--> <!--BEGIN !GENERATE_TREEVIEW--> <hr class="footer"/> - <span style="margin-right: 20px; float: right;"> - <a href="http://www.lufa-lib.org" title="LUFA Project Page">LUFA Project Page</a> | <a href="http://www.lufa-lib.org/support" title="LUFA Support List">Support Mailing List</a> | <a href="http://www.lufa-lib.org/donate" title="Donate to Support LUFA">Donate</a> | <a href="http://www.fourwalledcubicle.com" title="Four Walled Cubicle Website">Four Walled Cubicle</a> - LUFA, the Lightweight USB Framework for AVRs - </span> + <div class="footer"> + <span style="float: left;"> + $generatedby + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="$relpath$doxygen.png" alt="doxygen"/> + </a> + $doxygenversion + </span> + + <span style="margin-right: 20px; float: right;"> + <a href="http://www.lufa-lib.org" title="LUFA Project Page">LUFA Project Page</a> | <a href="http://www.lufa-lib.org/support" title="LUFA Support List">Support Mailing List</a> | <a href="http://www.lufa-lib.org/donate" title="Donate to Support LUFA">Donate</a> | <a href="http://www.fourwalledcubicle.com" title="Four Walled Cubicle Website">Four Walled Cubicle</a> - LUFA, the Lightweight USB Framework for AVRs + </span> + </div> <!--END !GENERATE_TREEVIEW--> </body> </html>
\ No newline at end of file diff --git a/LUFA/DoxygenPages/Style/Style.css b/LUFA/DoxygenPages/Style/Style.css index 3bff51e78..b64f9de83 100644 --- a/LUFA/DoxygenPages/Style/Style.css +++ b/LUFA/DoxygenPages/Style/Style.css @@ -43,14 +43,11 @@ overflow:inherit;
width:auto !important;
}
-
- pre.fragment
+
+ .fragment
{
- overflow:visible;
- text-wrap:unrestricted;
- white-space:pre-wrap;
- word-wrap:break-word;
- }
+ background-color: #FFFFFF !important;
+ }
}
body,table,div,p,dl
@@ -81,9 +78,8 @@ div.contents table.memberdecls,.paramname h1
{
- font-size:30px;
+ font-size:25px;
margin-bottom:10px;
- padding:0 0 20px;
}
h2
@@ -228,22 +224,55 @@ dl.el margin-left:-1cm;
}
-.fragment
-{
- font-family:monospace, fixed;
- font-size:105%;
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #FBFCFD;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+ font-family: monospace, fixed;
+ font-size: 105%;
}
-pre.fragment
-{
- background-color:#F8F8F8;
- border:1px solid #C1CEE8;
- font-size:10pt;
- line-height:125%;
- margin:4px 8px 4px 20px;
- overflow:auto;
- padding:4px 6px;
- word-wrap:break-word;
+div.fragment {
+ padding: 4px;
+ margin: 4px;
+ background-color: #FBFCFD;
+ border: 1px solid #C4CFE5;
+}
+
+div.line {
+ font-family: monospace, fixed;
+ font-size: 13px;
+ line-height: 1.0;
+ text-wrap: unrestricted;
+ white-space: -moz-pre-wrap; /* Moz */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* CSS3 */
+ word-wrap: break-word; /* IE 5.5+ */
+ text-indent: -53px;
+ padding-left: 53px;
+ padding-bottom: 0px;
+ margin: 0px;
+}
+
+span.lineno {
+ padding-right: 4px;
+ text-align: right;
+ border-right: 2px solid #0F0;
+ background-color: #E8E8E8;
+ white-space: pre;
+}
+span.lineno a {
+ background-color: #D8D8D8;
+}
+
+span.lineno a:hover {
+ background-color: #C8C8C8;
}
div.ah
@@ -1090,4 +1119,4 @@ div.toc li.level3 div.toc li.level4
{
margin-left:45px;
-}
\ No newline at end of file +}
diff --git a/LUFA/Drivers/Board/Buttons.h b/LUFA/Drivers/Board/Buttons.h index c3d6c0d00..1b70a6bd5 100644 --- a/LUFA/Drivers/Board/Buttons.h +++ b/LUFA/Drivers/Board/Buttons.h @@ -68,13 +68,13 @@ * \code * // Initialize the button driver before first use * Buttons_Init(); - * + * * printf("Waiting for button press...\r\n"); - * + * * // Loop until a board button has been pressed * uint8_t ButtonPress; * while (!(ButtonPress = Buttons_GetStatus())) {}; - * + * * // Display which button was pressed (assuming two board buttons) * printf("Button pressed: %s\r\n", (ButtonPress == BUTTONS_BUTTON1) ? "Button 1" : "Button 2"); * \endcode diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h index a5ae29dc8..c9f66054b 100644 --- a/LUFA/Drivers/Board/Dataflash.h +++ b/LUFA/Drivers/Board/Dataflash.h @@ -70,44 +70,44 @@ * SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | * SPI_SAMPLE_TRAILING | SPI_MODE_MASTER); * Dataflash_Init(); - * + * * uint8_t WriteBuffer[DATAFLASH_PAGE_SIZE]; * uint8_t ReadBuffer[DATAFLASH_PAGE_SIZE]; - * + * * // Fill page write buffer with a repeating pattern * for (uint16_t i = 0; i < DATAFLASH_PAGE_SIZE; i++) * WriteBuffer[i] = (i & 0xFF); - * + * * // Must select the chip of interest first before operating on it * Dataflash_SelectChip(DATAFLASH_CHIP1); - * + * * // Write to the Dataflash's first internal memory buffer * printf("Writing data to first dataflash buffer:\r\n"); * Dataflash_SendByte(DF_CMD_BUFF1WRITE); * Dataflash_SendAddressBytes(0, 0); - * + * * for (uint16_t i = 0; i < DATAFLASH_PAGE_SIZE; i++) * Dataflash_SendByte(WriteBuffer[i]); - * + * * // Commit the Dataflash's first memory buffer to the non-volatile FLASH memory * printf("Committing page to non-volatile memory page index 5:\r\n"); * Dataflash_SendByte(DF_CMD_BUFF1TOMAINMEMWITHERASE); * Dataflash_SendAddressBytes(5, 0); * Dataflash_WaitWhileBusy(); - * + * * // Read the page from non-volatile FLASH memory into the Dataflash's second memory buffer * printf("Reading data into second dataflash buffer:\r\n"); * Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF2); * Dataflash_SendAddressBytes(5, 0); * Dataflash_WaitWhileBusy(); - * + * * // Read the Dataflash's second internal memory buffer * Dataflash_SendByte(DF_CMD_BUFF2READ); * Dataflash_SendAddressBytes(0, 0); - * + * * for (uint16_t i = 0; i < DATAFLASH_PAGE_SIZE; i++) * ReadBuffer[i] = Dataflash_ReceiveByte(); - * + * * // Deselect the chip after use * Dataflash_DeselectChip(); * \endcode diff --git a/LUFA/Drivers/Board/Joystick.h b/LUFA/Drivers/Board/Joystick.h index 0a1f9fa7a..63d28e837 100644 --- a/LUFA/Drivers/Board/Joystick.h +++ b/LUFA/Drivers/Board/Joystick.h @@ -67,22 +67,22 @@ * \code * // Initialize the board Joystick driver before first use * Joystick_Init(); - * + * * printf("Waiting for joystick movement...\r\n"); - * + * * // Loop until a the joystick has been moved * uint8_t JoystickMovement; * while (!(JoystickMovement = Joystick_GetStatus())) {}; - * + * * // Display which direction the joystick was moved in * printf("Joystick moved:\r\n"); - * + * * if (JoystickMovement & (JOY_UP | JOY_DOWN)) * printf("%s ", (JoystickMovement & JOY_UP) ? "Up" : "Down"); - * + * * if (JoystickMovement & (JOY_LEFT | JOY_RIGHT)) * printf("%s ", (JoystickMovement & JOY_LEFT) ? "Left" : "Right"); - * + * * if (JoystickMovement & JOY_PRESS) * printf("Pressed"); * \endcode diff --git a/LUFA/Drivers/Board/LEDs.h b/LUFA/Drivers/Board/LEDs.h index f6f9d82ff..97cb81a50 100644 --- a/LUFA/Drivers/Board/LEDs.h +++ b/LUFA/Drivers/Board/LEDs.h @@ -76,7 +76,7 @@ * \code * // Initialize the board LED driver before first use * LEDs_Init(); - * + * * // Turn on each of the four LEDs in turn * LEDs_SetAllLEDs(LEDS_LED1); * Delay_MS(500); @@ -86,11 +86,11 @@ * Delay_MS(500); * LEDs_SetAllLEDs(LEDS_LED4); * Delay_MS(500); - * + * * // Turn on all LEDs * LEDs_SetAllLEDs(LEDS_ALL_LEDS); * Delay_MS(1000); - * + * * // Turn on LED 1, turn off LED 2, leaving LEDs 3 and 4 in their current state * LEDs_ChangeLEDs((LEDS_LED1 | LEDS_LED2), LEDS_LED1); * \endcode diff --git a/LUFA/Drivers/Board/Temperature.h b/LUFA/Drivers/Board/Temperature.h index ef967967b..54ca957a6 100644 --- a/LUFA/Drivers/Board/Temperature.h +++ b/LUFA/Drivers/Board/Temperature.h @@ -56,7 +56,7 @@ * // Initialize the ADC and board temperature sensor drivers before first use * ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_128); * Temperature_Init(); - * + * * // Display converted temperature in degrees Celsius * printf("Current Temperature: %d Degrees\r\n", Temperature_GetTemperature()); * \endcode diff --git a/LUFA/Drivers/Misc/RingBuffer.h b/LUFA/Drivers/Misc/RingBuffer.h index df7e70218..b0bc5c55d 100644 --- a/LUFA/Drivers/Misc/RingBuffer.h +++ b/LUFA/Drivers/Misc/RingBuffer.h @@ -65,23 +65,23 @@ * // Create the buffer structure and its underlying storage array * RingBuffer_t Buffer; * uint8_t BufferData[128]; - * + * * // Initialize the buffer with the created storage array * RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData)); - * + * * // Insert some data into the buffer * RingBuffer_Insert(Buffer, 'H'); * RingBuffer_Insert(Buffer, 'E'); * RingBuffer_Insert(Buffer, 'L'); * RingBuffer_Insert(Buffer, 'L'); * RingBuffer_Insert(Buffer, 'O'); - * + * * // Cache the number of stored bytes in the buffer * uint16_t BufferCount = RingBuffer_GetCount(&Buffer); - * + * * // Printer stored data length * printf("Buffer Length: %d, Buffer Data: \r\n", BufferCount); - * + * * // Print contents of the buffer one character at a time * while (BufferCount--) * putc(RingBuffer_Remove(&Buffer)); diff --git a/LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h index ec80dd247..c04d2ba8c 100644 --- a/LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h +++ b/LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h @@ -55,14 +55,14 @@ * \code * // Initialize the ADC driver before first use * ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_32); - * + * * // Must setup the ADC channel to read beforehand * ADC_SetupChannel(1); - * + * * // Perform a single conversion of the ADC channel 1 * ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_CHANNEL1); * printf("Conversion Result: %d\r\n", ADC_GetResult()); - * + * * // Start reading ADC channel 1 in free running (continuous conversion) mode * ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_CHANNEL1); * for (;;) diff --git a/LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h index 2e396ed55..3ca037606 100644 --- a/LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h +++ b/LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h @@ -56,17 +56,17 @@ * // Initialize the SPI driver before first use * SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | * SPI_SAMPLE_TRAILING | SPI_MODE_MASTER); - * + * * // Send several bytes, ignoring the returned data * SPI_SendByte(0x01); * SPI_SendByte(0x02); * SPI_SendByte(0x03); - * + * * // Receive several bytes, sending a dummy 0x00 byte each time * uint8_t Byte1 = SPI_ReceiveByte(); * uint8_t Byte2 = SPI_ReceiveByte(); * uint8_t Byte3 = SPI_ReceiveByte(); - * + * * // Send a byte, and store the received byte from the same transaction * uint8_t ResponseByte = SPI_TransferByte(0xDC); * \endcode diff --git a/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h index 562aaecfd..24d341f03 100644 --- a/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h +++ b/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h @@ -53,17 +53,17 @@ * \code * // Initialize the Master SPI mode USART driver before first use, with 1Mbit baud * SerialSPI_Init((USART_SPI_SCK_LEAD_RISING | SPI_SAMPLE_LEADING | SPI_ORDER_MSB_FIRST), 1000000); - * + * * // Send several bytes, ignoring the returned data * SerialSPI_SendByte(0x01); * SerialSPI_SendByte(0x02); * SerialSPI_SendByte(0x03); - * + * * // Receive several bytes, sending a dummy 0x00 byte each time * uint8_t Byte1 = SerialSPI_ReceiveByte(); * uint8_t Byte2 = SerialSPI_ReceiveByte(); * uint8_t Byte3 = SerialSPI_ReceiveByte(); - * + * * // Send a byte, and store the received byte from the same transaction * uint8_t ResponseByte = SerialSPI_TransferByte(0xDC); * \endcode diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h index 687ea74ad..b7b50f434 100644 --- a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h +++ b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h @@ -53,10 +53,10 @@ * \code * // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode) * Serial_Init(9600, false); - * + * * // Send a string through the USART * Serial_TxString("Test String\r\n"); - * + * * // Receive a byte through the USART * uint8_t DataByte = Serial_RxByte(); * \endcode diff --git a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h index b9131df3c..38ad1f3e3 100644 --- a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h +++ b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h @@ -54,35 +54,35 @@ * \code * // Initialize the TWI driver before first use at 200KHz * TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 200000)); - * + * * // Start a write session to device at device address 0xA0, internal address 0xDC with a 10ms timeout * if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10) == TWI_ERROR_NoError) * { * TWI_SendByte(0xDC); - * + * * TWI_SendByte(0x01); * TWI_SendByte(0x02); * TWI_SendByte(0x03); - * + * * // Must stop transmission afterwards to release the bus * TWI_StopTransmission(); * } - * + * * // Start a read session to device at address 0xA0, internal address 0xDC with a 10ms timeout * if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10) == TWI_ERROR_NoError) * { * TWI_SendByte(0xDC); * TWI_StopTransmission(); - * + * * if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_READ, 10) == TWI_ERROR_NoError) * { * uint8_t Byte1, Byte2, Byte3; - * + * * // Read three bytes, acknowledge after the third byte is received * TWI_ReceiveByte(&Byte1, false); * TWI_ReceiveByte(&Byte2, false); * TWI_ReceiveByte(&Byte3, true); - * + * * // Must stop transmission afterwards to release the bus * TWI_StopTransmission(); * } @@ -93,18 +93,18 @@ * \code * // Initialize the TWI driver before first use at 200KHz * TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 200000)); - * + * * // Start a write session to device at device address 0xA0, internal address 0xDC with a 10ms timeout * uint8_t InternalWriteAddress = 0xDC; * uint8_t WritePacket[3] = {0x01, 0x02, 0x03}; - * + * * TWI_WritePacket(0xA0, 10, &InternalWriteAddress, sizeof(InternalWriteAddress), * &WritePacket, sizeof(WritePacket); - * + * * // Start a read session to device at address 0xA0, internal address 0xDC with a 10ms timeout * uint8_t InternalReadAddress = 0xDC; * uint8_t ReadPacket[3]; - * + * * TWI_ReadPacket(0xA0, 10, &InternalReadAddress, sizeof(InternalReadAddress), * &ReadPacket, sizeof(ReadPacket); * \endcode diff --git a/LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h b/LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h index a21ac1ca8..8c57dacd9 100644 --- a/LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h +++ b/LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h @@ -53,17 +53,17 @@ * SPI_Init(&SPIC, * SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | * SPI_SAMPLE_TRAILING | SPI_MODE_MASTER); - * + * * // Send several bytes, ignoring the returned data * SPI_SendByte(&SPIC, 0x01); * SPI_SendByte(&SPIC, 0x02); * SPI_SendByte(&SPIC, 0x03); - * + * * // Receive several bytes, sending a dummy 0x00 byte each time * uint8_t Byte1 = SPI_ReceiveByte(&SPIC); * uint8_t Byte2 = SPI_ReceiveByte(&SPIC); * uint8_t Byte3 = SPI_ReceiveByte(&SPIC); - * + * * // Send a byte, and store the received byte from the same transaction * uint8_t ResponseByte = SPI_TransferByte(&SPIC, 0xDC); * \endcode diff --git a/LUFA/Drivers/Peripheral/XMEGA/SerialSPI_XMEGA.h b/LUFA/Drivers/Peripheral/XMEGA/SerialSPI_XMEGA.h index a0e9e3370..64d57a3f0 100644 --- a/LUFA/Drivers/Peripheral/XMEGA/SerialSPI_XMEGA.h +++ b/LUFA/Drivers/Peripheral/XMEGA/SerialSPI_XMEGA.h @@ -53,17 +53,17 @@ * \code * // Initialize the Master SPI mode USART driver before first use, with 1Mbit baud * SerialSPI_Init(&USARTD0, (USART_SPI_SCK_LEAD_RISING | USART_SPI_SAMPLE_LEADING | USART_SPI_ORDER_MSB_FIRST), 1000000); - * + * * // Send several bytes, ignoring the returned data * SerialSPI_SendByte(&USARTD0, 0x01); * SerialSPI_SendByte(&USARTD0, 0x02); * SerialSPI_SendByte(&USARTD0, 0x03); - * + * * // Receive several bytes, sending a dummy 0x00 byte each time * uint8_t Byte1 = SerialSPI_ReceiveByte(&USARTD); * uint8_t Byte2 = SerialSPI_ReceiveByte(&USARTD); * uint8_t Byte3 = SerialSPI_ReceiveByte(&USARTD); - * + * * // Send a byte, and store the received byte from the same transaction * uint8_t ResponseByte = SerialSPI_TransferByte(&USARTD0, 0xDC); * \endcode diff --git a/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.h b/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.h index 283732f0f..c2cb77fd3 100644 --- a/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.h +++ b/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.h @@ -53,10 +53,10 @@ * \code * // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode) * Serial_Init(&USARTD0, 9600, false); - * + * * // Send a string through the USART * Serial_TxString(&USARTD0, "Test String\r\n"); - * + * * // Receive a byte through the USART * uint8_t DataByte = Serial_RxByte(&USARTD0); * \endcode diff --git a/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c b/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c index 1300577fc..b1abb68d7 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c @@ -156,15 +156,21 @@ uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo) uint8_t ErrorCode; Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipe.Address); - + Pipe_Unfreeze(); + if (Pipe_BytesInPipe()) { Pipe_ClearOUT(); if ((ErrorCode = Pipe_WaitUntilReady()) != PIPE_READYWAIT_NoError) - return ErrorCode; + { + Pipe_Freeze(); + return ErrorCode; + } } + Pipe_Freeze(); + return PIPE_READYWAIT_NoError; } @@ -177,13 +183,19 @@ uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterface uint8_t ErrorCode; Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipe.Address); - + Pipe_Unfreeze(); + if ((ErrorCode = Pipe_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL)) != PIPE_RWSTREAM_NoError) - return ErrorCode; + { + Pipe_Freeze(); + return ErrorCode; + } if (!(Pipe_IsReadWriteAllowed())) Pipe_ClearOUT(); + Pipe_Freeze(); + return PIPE_RWSTREAM_NoError; } diff --git a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.h index ecc1fb0b9..072d85932 100644 --- a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.h +++ b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.h @@ -87,7 +87,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -98,13 +98,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -140,7 +140,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -151,13 +151,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -199,7 +199,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
@@ -276,7 +276,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
@@ -289,14 +289,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
diff --git a/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.h index e9da42256..53316f2f9 100644 --- a/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.h +++ b/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.h @@ -85,7 +85,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -96,13 +96,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -137,7 +137,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -148,13 +148,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -198,7 +198,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != PIPE_RWSTREAM_NoError)
* {
@@ -211,14 +211,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -279,7 +279,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != PIPE_RWSTREAM_NoError)
* {
@@ -292,14 +292,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c index 4216d5631..6a8727f82 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c +++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (void* const Buffer, uint16_t Length) { diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c index 1c0d5260e..a8efc67fc 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer, uint16_t Length) { diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c index bc685ab6c..bcb35610f 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c +++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, uint16_t Length, uint16_t* const BytesProcessed) diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c index a49102b48..7d77957b7 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c +++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, uint16_t Length, uint16_t* const BytesProcessed) diff --git a/LUFA/Drivers/USB/Core/ConfigDescriptor.h b/LUFA/Drivers/USB/Core/ConfigDescriptor.h index 5e97939e7..22e76cba9 100644 --- a/LUFA/Drivers/USB/Core/ConfigDescriptor.h +++ b/LUFA/Drivers/USB/Core/ConfigDescriptor.h @@ -76,7 +76,7 @@ * uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header * USB_Descriptor_Configuration_Header_t* ConfigHeaderPtr = DESCRIPTOR_PCAST(CurrDescriptor, * USB_Descriptor_Configuration_Header_t); - * + * * // Can now access elements of the configuration header struct using the -> indirection operator * \endcode */ @@ -90,7 +90,7 @@ * uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header * USB_Descriptor_Configuration_Header_t ConfigHeader = DESCRIPTOR_CAST(CurrDescriptor, * USB_Descriptor_Configuration_Header_t); - * + * * // Can now access elements of the configuration header struct using the . operator * \endcode */ @@ -231,7 +231,7 @@ * Usage Example: * \code * uint8_t EndpointSearcher(void* CurrentDescriptor); // Comparator Prototype - * + * * uint8_t EndpointSearcher(void* CurrentDescriptor) * { * if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint) @@ -239,8 +239,9 @@ * else * return DESCRIPTOR_SEARCH_NotFound; * } - * + * * //... + * * // After retrieving configuration descriptor: * if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) == * Descriptor_Search_Comp_Found) diff --git a/LUFA/Drivers/USB/Core/Device.h b/LUFA/Drivers/USB/Core/Device.h index 29452be12..59269dd17 100644 --- a/LUFA/Drivers/USB/Core/Device.h +++ b/LUFA/Drivers/USB/Core/Device.h @@ -108,19 +108,19 @@ * index and language ID. This function MUST be overridden in the user application (added with full, identical * prototype and name so that the library can call it to retrieve descriptor data. * - * \param[in] wValue The type of the descriptor to retrieve in the upper byte, and the index in the - * lower byte (when more than one descriptor of the given type exists, such as the - * case of string descriptors). The type may be one of the standard types defined - * in the DescriptorTypes_t enum, or may be a class-specific descriptor type value. - * \param[in] wIndex The language ID of the string to return if the \c wValue type indicates - * \ref DTYPE_String, otherwise zero for standard descriptors, or as defined in a - * class-specific standards. - * \param[out] DescriptorAddress Pointer to the descriptor in memory. This should be set by the routine to - * the address of the descriptor. - * \param[out] MemoryAddressSpace A value from the \ref USB_DescriptorMemorySpaces_t enum to indicate the memory - * space in which the descriptor is stored. This parameter does not exist when one - * of the \c USE_*_DESCRIPTORS compile time options is used, or on architectures which - * use a unified address space. + * \param[in] wValue The type of the descriptor to retrieve in the upper byte, and the index in the + * lower byte (when more than one descriptor of the given type exists, such as the + * case of string descriptors). The type may be one of the standard types defined + * in the DescriptorTypes_t enum, or may be a class-specific descriptor type value. + * \param[in] wIndex The language ID of the string to return if the \c wValue type indicates + * \ref DTYPE_String, otherwise zero for standard descriptors, or as defined in a + * class-specific standards. + * \param[out] DescriptorAddress Pointer to the descriptor in memory. This should be set by the routine to + * the address of the descriptor. + * \param[out] DescriptorMemorySpace A value from the \ref USB_DescriptorMemorySpaces_t enum to indicate the memory + * space in which the descriptor is stored. This parameter does not exist when one + * of the \c USE_*_DESCRIPTORS compile time options is used, or on architectures which + * use a unified address space. * * \note By default, the library expects all descriptors to be located in flash memory via the \c PROGMEM attribute. * If descriptors should be located in RAM or EEPROM instead (to speed up access in the case of RAM, or to @@ -135,7 +135,7 @@ const void** const DescriptorAddress #if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) || defined(__DOXYGEN__)) && \ !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS)) - , uint8_t* MemoryAddressSpace + , uint8_t* const DescriptorMemorySpace #endif ) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); diff --git a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.h b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.h index 335e19782..40a54ee17 100644 --- a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.h +++ b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.h @@ -87,7 +87,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -98,13 +98,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -140,7 +140,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -151,13 +151,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -199,7 +199,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
@@ -212,14 +212,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -276,7 +276,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
@@ -289,14 +289,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
diff --git a/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.h b/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.h index 3f211182e..cb8a28c86 100644 --- a/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.h +++ b/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.h @@ -85,24 +85,24 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
* }
* \endcode
- *
+ *
* <b>Partial Stream Transfers Example:</b>
* \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -137,7 +137,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -148,13 +148,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -198,7 +198,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != PIPE_RWSTREAM_NoError)
* {
@@ -211,14 +211,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -279,7 +279,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != PIPE_RWSTREAM_NoError)
* {
@@ -292,14 +292,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != PIPE_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c index 4216d5631..6a8727f82 100644 --- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c +++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (void* const Buffer, uint16_t Length) { diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c index 1c0d5260e..a8efc67fc 100644 --- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer, uint16_t Length) { diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c index bc685ab6c..bcb35610f 100644 --- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c +++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, uint16_t Length, uint16_t* const BytesProcessed) diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c index a49102b48..7d77957b7 100644 --- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c +++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, uint16_t Length, uint16_t* const BytesProcessed) diff --git a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.h index 711d7a3a5..3269d2b1d 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.h +++ b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.h @@ -87,7 +87,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -98,13 +98,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -140,7 +140,7 @@ * <b>Single Stream Transfer Example:</b>
* \code
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -151,13 +151,13 @@ * \code
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -199,7 +199,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
@@ -212,14 +212,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
@@ -276,7 +276,7 @@ * \code
* uint8_t DataStream[512];
* uint8_t ErrorCode;
- *
+ *
* if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
* NULL)) != ENDPOINT_RWSTREAM_NoError)
* {
@@ -289,14 +289,14 @@ * uint8_t DataStream[512];
* uint8_t ErrorCode;
* uint16_t BytesProcessed;
- *
+ *
* BytesProcessed = 0;
* while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
* {
* // Stream not yet complete - do other actions here, abort if required
* }
- *
+ *
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
* {
* // Stream failed to complete - check ErrorCode here
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c index d0d684d0a..15e1d24f0 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (void* const Buffer, uint16_t Length) { diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c index 59252b02e..10590b401 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer, uint16_t Length) { diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c index bc685ab6c..bcb35610f 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c @@ -30,6 +30,7 @@ #if defined(TEMPLATE_FUNC_NAME) +// cppcheck-suppress unusedFunction uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, uint16_t Length, uint16_t* const BytesProcessed) diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h index c99c1d267..626635c8d 100644 --- a/LUFA/Drivers/USB/USB.h +++ b/LUFA/Drivers/USB/USB.h @@ -189,7 +189,7 @@ * void EVENT_USB_Device_ConfigurationChanged(void) * { * LEDs_SetAllLEDs(LEDMASK_USB_READY); - * + * * if (!(Audio_Device_ConfigureEndpoints(&My_Audio_Interface))) * LEDs_SetAllLEDs(LEDMASK_USB_ERROR); * } @@ -205,14 +205,14 @@ * int main(void) * { * SetupHardware(); - * + * * LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - * + * * for (;;) * { * if (USB_DeviceState != DEVICE_STATE_Configured) * Create_And_Process_Samples(); - * + * * Audio_Device_USBTask(&My_Audio_Interface); * USB_USBTask(); * } @@ -293,30 +293,30 @@ * void EVENT_USB_Host_DeviceEnumerationComplete(void) * { * LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING); - * + * * uint16_t ConfigDescriptorSize; * uint8_t ConfigDescriptorData[512]; - * + * * if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData, * sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful) * { * LEDs_SetAllLEDs(LEDMASK_USB_ERROR); * return; * } - * + * * if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface, * ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError) * { * LEDs_SetAllLEDs(LEDMASK_USB_ERROR); * return; * } - * + * * if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful) * { * LEDs_SetAllLEDs(LEDMASK_USB_ERROR); * return; * } - * + * * LEDs_SetAllLEDs(LEDMASK_USB_READY); * } * \endcode @@ -342,14 +342,14 @@ * int main(void) * { * SetupHardware(); - * + * * LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - * + * * for (;;) * { * if (USB_HostState != HOST_STATE_Configured) * Create_And_Process_Samples(); - * + * * MIDI_Host_USBTask(&My_Audio_Interface); * USB_USBTask(); * } diff --git a/LUFA/Platform/UC3/ClockManagement.h b/LUFA/Platform/UC3/ClockManagement.h index d0d8f71e8..2cd96d2ec 100644 --- a/LUFA/Platform/UC3/ClockManagement.h +++ b/LUFA/Platform/UC3/ClockManagement.h @@ -50,16 +50,16 @@ * Usage Example: * \code * #include <LUFA/Platform/UC3/ClockManagement.h> - * + * * void main(void) * { * // Start the master external oscillator which will be used as the main clock reference * AVR32CLK_StartExternalOscillator(0, EXOSC_MODE_8MHZ_OR_MORE, EXOSC_START_0CLK); - * + * * // Start the PLL for the CPU clock, switch CPU to it * AVR32CLK_StartPLL(0, CLOCK_SRC_OSC0, 12000000, F_CPU); * AVR32CLK_SetCPUClockSource(CLOCK_SRC_PLL0, F_CPU); - * + * * // Start the PLL for the USB Generic Clock module * AVR32CLK_StartPLL(1, CLOCK_SRC_OSC0, 12000000, 48000000); * } diff --git a/LUFA/Platform/UC3/InterruptManagement.h b/LUFA/Platform/UC3/InterruptManagement.h index 8dd1dc3d6..af99f0875 100644 --- a/LUFA/Platform/UC3/InterruptManagement.h +++ b/LUFA/Platform/UC3/InterruptManagement.h @@ -51,12 +51,12 @@ * Usage Example: * \code * #include <LUFA/Platform/UC3/InterruptManagement.h> - * + * * ISR(USB_Group_IRQ_Handler) * { * // USB group handler code here * } - * + * * void main(void) * { * INTC_Init(); diff --git a/LUFA/Platform/XMEGA/ClockManagement.h b/LUFA/Platform/XMEGA/ClockManagement.h index 9b3b56244..feef8898e 100644 --- a/LUFA/Platform/XMEGA/ClockManagement.h +++ b/LUFA/Platform/XMEGA/ClockManagement.h @@ -50,13 +50,13 @@ * Usage Example: * \code * #include <LUFA/Platform/XMEGA/ClockManagement.h> - * + * * void main(void) * { * // Start the PLL to multiply the 2MHz RC oscillator to F_CPU and switch the CPU core to run from it * XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU); * XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL); - * + * * // Start the 32MHz internal RC oscillator and start the DFLL to increase it to F_USB using the USB SOF as a reference * XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ); * XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB); |