aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/ClassDriver
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-02-10 17:55:49 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-02-10 17:55:49 +0000
commit941825b6a5e737573b5185cfedc31ae0de85a83a (patch)
treebb4ba0005e5b7687d6866ea70ee899d772d04b1b /Demos/Device/ClassDriver
parentada8147ec3289b4a257b533a17cca8568d3c09b3 (diff)
Add static keyword to all project globals whose scope should be restricted to the same module as they are declared in.
Tighten up the HID class bootloader code slightly, document that it currently exceeds 2KB of bootloader space for all models other than the Series 2 USB AVRs. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1661 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.c1
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.c1
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c1
-rw-r--r--Demos/Device/ClassDriver/GenericHID/GenericHID.c5
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.c3
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c3
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c5
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c3
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.c1
-rw-r--r--Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c4
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.c1
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c4
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c2
-rw-r--r--Demos/Device/ClassDriver/Mouse/Mouse.c3
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c1
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c1
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c3
17 files changed, 28 insertions, 14 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index 9c9b79da..b197588a 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@ -51,6 +51,7 @@ USB_ClassInfo_Audio_Device_t Microphone_Audio_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index 1ad146e1..dbfd10b8 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@ -51,6 +51,7 @@ USB_ClassInfo_Audio_Device_t Speaker_Audio_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
index e2cf4f0b..a50e77e3 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
@@ -86,6 +86,7 @@ USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
index 657c2bfa..c6b85704 100644
--- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c
+++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
@@ -37,10 +37,10 @@
#include "GenericHID.h"
/** Buffer to hold the previously generated HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevHIDReportBuffer[GENERIC_REPORT_SIZE];
+static uint8_t PrevHIDReportBuffer[GENERIC_REPORT_SIZE];
/** Structure to contain reports from the host, so that they can be echoed back upon request */
-struct
+static struct
{
uint8_t ReportID;
uint16_t ReportSize;
@@ -66,6 +66,7 @@ USB_ClassInfo_HID_Device_t Generic_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c
index 6e9f4ee7..3a8897fa 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.c
@@ -37,7 +37,7 @@
#include "Joystick.h"
/** Buffer to hold the previously generated HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevJoystickHIDReportBuffer[sizeof(USB_JoystickReport_Data_t)];
+static uint8_t PrevJoystickHIDReportBuffer[sizeof(USB_JoystickReport_Data_t)];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
@@ -58,6 +58,7 @@ USB_ClassInfo_HID_Device_t Joystick_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 7777b6f1..42ea12d8 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -37,7 +37,7 @@
#include "Keyboard.h"
/** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
+static uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
@@ -58,6 +58,7 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
index 5563cda7..8b30c463 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
@@ -37,10 +37,10 @@
#include "KeyboardMouse.h"
/** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
+static uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
/** Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];
+static uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
@@ -81,6 +81,7 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
index e936443b..307e330d 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
@@ -37,7 +37,7 @@
#include "KeyboardMouseMultiReport.h"
/** Buffer to hold the previously generated HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevHIDReportBuffer[MAX(sizeof(USB_KeyboardReport_Data_t), sizeof(USB_MouseReport_Data_t))];
+static uint8_t PrevHIDReportBuffer[MAX(sizeof(USB_KeyboardReport_Data_t), sizeof(USB_MouseReport_Data_t))];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
@@ -58,6 +58,7 @@ USB_ClassInfo_HID_Device_t Device_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.c b/Demos/Device/ClassDriver/MIDI/MIDI.c
index da2e7c13..cbf11986 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.c
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.c
@@ -56,6 +56,7 @@ USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
index be6a7903..14421dfd 100644
--- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
+++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
@@ -41,7 +41,7 @@
/** Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's
* features and capabilities.
*/
-SCSI_Inquiry_Response_t InquiryData =
+static const SCSI_Inquiry_Response_t InquiryData =
{
.DeviceType = DEVICE_TYPE_BLOCK,
.PeripheralQualifier = 0,
@@ -73,7 +73,7 @@ SCSI_Inquiry_Response_t InquiryData =
/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE
* command is issued. This gives information on exactly why the last command failed to complete.
*/
-SCSI_Request_Sense_Response_t SenseData =
+static SCSI_Request_Sense_Response_t SenseData =
{
.ResponseCode = 0x70,
.AdditionalLength = 0x0A,
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.c b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
index b1927987..87b8500d 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.c
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
@@ -58,6 +58,7 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
index 83719bf7..eec83086 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
@@ -41,7 +41,7 @@
/** Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's
* features and capabilities.
*/
-SCSI_Inquiry_Response_t InquiryData =
+static const SCSI_Inquiry_Response_t InquiryData =
{
.DeviceType = DEVICE_TYPE_BLOCK,
.PeripheralQualifier = 0,
@@ -73,7 +73,7 @@ SCSI_Inquiry_Response_t InquiryData =
/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE
* command is issued. This gives information on exactly why the last command failed to complete.
*/
-SCSI_Request_Sense_Response_t SenseData =
+static SCSI_Request_Sense_Response_t SenseData =
{
.ResponseCode = 0x70,
.AdditionalLength = 0x0A,
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
index 6a081963..f891ec91 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
@@ -60,7 +60,7 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface =
};
/** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
+static uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c
index b09c4cb5..bc0153f0 100644
--- a/Demos/Device/ClassDriver/Mouse/Mouse.c
+++ b/Demos/Device/ClassDriver/Mouse/Mouse.c
@@ -37,7 +37,7 @@
#include "Mouse.h"
/** Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];
+static uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
@@ -58,6 +58,7 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index 58560467..e14f3f1d 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@ -63,6 +63,7 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
index 6dac7b9b..c532f4f9 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
+++ b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
@@ -65,6 +65,7 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
*/
static FILE USBSerialStream;
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
index 30e9cdff..849e0634 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
@@ -61,7 +61,7 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
};
/** Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver. */
-uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];
+static uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];
/** LUFA HID Class driver interface configuration and state information. This structure is
* passed to all HID Class driver functions, so that multiple instances of the same class
@@ -82,6 +82,7 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
},
};
+
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/