\r
#include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
\r
+ /* Preprocessor Checks: */\r
+ #if !defined(SIGNATURE_0) || !defined(SIGNATURE_1) || !defined(SIGNATURE_2)\r
+ #error Device signature byte constants are not defined due to outdated avr-libc version. See demo documentation.\r
+ #endif\r
+\r
/* Macros: */\r
/** CDC Class Specific request to get the line encoding on a CDC-ACM virtual serial port, including the\r
* baud rate, parity, stop bits and data bits.\r
*\r
* <table>\r
* <tr>\r
- * <td>\r
- * None\r
- * </td>\r
+ * <td><b>Define Name:</b></td>\r
+ * <td><b>Location:</b></td>\r
+ * <td><b>Description:</b></td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>SIGNATURE_0, SIGNATURE_1, SIGNATURE_2</td>\r
+ * <td>Makefile CDEFS</td>\r
+ * <td>AVR part signature bytes. These are normally defined as part of the AVR device header files in recent avr-libc\r
+ * distributions. If your avr-libc library is out of date and does not define these values, you can define them\r
+ * manually in the makefile CDEFS.</td>\r
* </tr>\r
* </table>\r
*/
\ No newline at end of file
#include "Descriptors.h"\r
\r
#include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
- \r
+ \r
+ /* Preprocessor Checks: */\r
+ #if !defined(SIGNATURE_0) || !defined(SIGNATURE_1) || !defined(SIGNATURE_2)\r
+ #error Device signature byte constants are not defined due to outdated avr-libc version. See demo documentation.\r
+ #endif\r
+ \r
/* Macros: */\r
/** Configuration define. Define this token to true to case the bootloader to reject all memory commands\r
* until a memory erase has been performed. When used in conjunction with the lockbits of the AVR, this\r
* erase has been perfomed. This can be used in conjunction with the AVR's lockbits to prevent the AVRs firmware from\r
* being dumped by unauthorized persons.</td>\r
* </tr>\r
+ * <tr>\r
+ * <td>SIGNATURE_0, SIGNATURE_1, SIGNATURE_2</td>\r
+ * <td>Makefile CDEFS</td>\r
+ * <td>AVR part signature bytes. These are normally defined as part of the AVR device header files in recent avr-libc\r
+ * distributions. If your avr-libc library is out of date and does not define these values, you can define them\r
+ * manually in the makefile CDEFS.</td>\r
+ * </tr>\r
* </table>\r
*/
\ No newline at end of file
/** ISR for the general Pipe/Endpoint interrupt vector. This ISR fires when a control request has been issued to the control endpoint,\r
* so that the request can be processed. As several elements of the Mass Storage implementation require asynchronous control requests\r
* (such as endpoint stall clearing and Mass Storage Reset requests during data transfers) this is done via interrupts rather than\r
- * polling.\r
+ * polling so that they can be processed regardless of the rest of the application's state.\r
*/\r
ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)\r
{\r
#define REMOTE_NDIS_VERSION_MINOR 0x00\r
\r
/** RNDIS request to issue a host-to-device NDIS command */\r
- #define SEND_ENCAPSULATED_COMMAND 0x00\r
+ #define REQ_SendEncapsulatedCommand 0x00\r
\r
/** RNDIS request to issue a device-to-host NDIS response */\r
- #define GET_ENCAPSULATED_RESPONSE 0x01\r
+ #define REQ_GetEncapsulatedResponse 0x01\r
\r
/* Enums: */\r
/** Enum for the possible NDIS adapter states. */\r
/* Process RNDIS class commands */\r
switch (bRequest)\r
{\r
- case SEND_ENCAPSULATED_COMMAND:\r
+ case REQ_SendEncapsulatedCommand:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Clear the SETUP packet, ready for data transfer */\r
}\r
\r
break;\r
- case GET_ENCAPSULATED_RESPONSE:\r
+ case REQ_GetEncapsulatedResponse:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Check if a response to the last message is ready */\r
* - Added new PIMA_DATA_SIZE() define to the Still Image Host demo\r
* - Add call to MassStore_WaitForDataReceived() in MassStore_GetReturnedStatus() to ensure that the CSW has been received in the\r
* extended MSC timeout period before continuing, to prevent long processing delays from causing the MassStore_GetReturnedStatus()\r
- * to early-abort\r
+ * to early-abort (thanks to Dmitry Maksimov)\r
* - Move StdRequestType.h, StreamCallbacks.h, USBMode.h from the LowLevel USB driver directory to the HighLevel USB driver directory,\r
* where they are more suited\r
* - Removed all binary constants and replaced with decimal or hexadecimal constants so that unpatched GCC compilers can still build the\r
* code without having to be itself patched and recompiled first\r
+ * - Added preprocessor checks and documentation to the bootloaders giving information about missing SIGNATURE_x defines due to\r
+ * outdated avr-libc versions.\r
*\r
* \section Sec_ChangeLog090401 Version 090401\r
*\r