diff options
author | Dean Camera <[email protected]> | 2011-02-10 17:55:49 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2011-02-10 17:55:49 +0000 |
commit | 782614dbb55addcae8c9d4d9e1ce3dec81287282 (patch) | |
tree | bb4ba0005e5b7687d6866ea70ee899d772d04b1b /Demos | |
parent | 57b382558d0f2a5146bea735943f09c6d1b83286 (diff) | |
download | qmk_firmware-782614dbb55addcae8c9d4d9e1ce3dec81287282.tar.gz qmk_firmware-782614dbb55addcae8c9d4d9e1ce3dec81287282.zip |
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.
Diffstat (limited to 'Demos')
34 files changed, 69 insertions, 48 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c index 9c9b79daea..b197588a8e 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 1ad146e166..dbfd10b8bb 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 e2cf4f0b20..a50e77e3f7 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 657c2bfa91..c6b8570425 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 6e9f4ee721..3a8897fa86 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 7777b6f1ba..42ea12d805 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 5563cda727..8b30c463e4 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 e936443b24..307e330d3a 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 da2e7c1321..cbf1198699 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 be6a7903a0..14421dfdc4 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 b19279873f..87b8500de0 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 83719bf786..eec83086ca 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 6a08196378..f891ec9143 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 b09c4cb5b3..bc0153f080 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 585604672f..e14f3f1de6 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 6dac7b9b01..c532f4f9dd 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 30e9cdff0b..849e0634c5 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. */ diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c index a2f3cca865..c393da8ae5 100644 --- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c +++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c @@ -53,19 +53,19 @@ TMC_Capabilities_t Capabilities = };
/** Current TMC control request that is being processed */
-uint8_t RequestInProgress = 0;
+static uint8_t RequestInProgress = 0;
/** Stream callback abort flag for bulk IN data */
-bool IsTMCBulkINReset = false;
+static bool IsTMCBulkINReset = false;
/** Stream callback abort flag for bulk OUT data */
-bool IsTMCBulkOUTReset = false;
+static bool IsTMCBulkOUTReset = false;
/** Last used tag value for data transfers */
-uint8_t CurrentTransferTag = 0;
+static uint8_t CurrentTransferTag = 0;
/** Length of last data transfer, for reporting to the host in case an in-progress transfer is aborted */
-uint32_t LastTransferLength = 0;
+static uint32_t LastTransferLength = 0;
/** 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/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index ab5af7364d..ac819c1b0e 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -37,7 +37,8 @@ #include "AudioInput.h" /** Flag to indicate if the streaming audio alternative interface has been selected by the host. */ -bool StreamingAudioInterfaceSelected = false; +static bool StreamingAudioInterfaceSelected = false; + /** 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/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 8260732305..64a297315b 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -37,7 +37,8 @@ #include "AudioOutput.h" /** Flag to indicate if the streaming audio alternative interface has been selected by the host. */ -bool StreamingAudioInterfaceSelected = false; +static bool StreamingAudioInterfaceSelected = false; + /** 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/LowLevel/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c index 14aa0be715..b9391296bb 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c +++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c @@ -44,10 +44,10 @@ * It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical * serial link characteristics and instead sends and receives data in endpoint streams. */ -CDC_LineEncoding_t LineEncoding1 = { .BaudRateBPS = 0, - .CharFormat = CDC_LINEENCODING_OneStopBit, - .ParityType = CDC_PARITY_None, - .DataBits = 8 }; +static CDC_LineEncoding_t LineEncoding1 = { .BaudRateBPS = 0, + .CharFormat = CDC_LINEENCODING_OneStopBit, + .ParityType = CDC_PARITY_None, + .DataBits = 8 }; /** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use * the physical USART and thus does not use these settings, they must still be retained and returned to the host @@ -57,10 +57,10 @@ CDC_LineEncoding_t LineEncoding1 = { .BaudRateBPS = 0, * It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical * serial link characteristics and instead sends and receives data in endpoint streams. */ -CDC_LineEncoding_t LineEncoding2 = { .BaudRateBPS = 0, - .CharFormat = CDC_LINEENCODING_OneStopBit, - .ParityType = CDC_PARITY_None, - .DataBits = 8 }; +static CDC_LineEncoding_t LineEncoding2 = { .BaudRateBPS = 0, + .CharFormat = CDC_LINEENCODING_OneStopBit, + .ParityType = CDC_PARITY_None, + .DataBits = 8 }; /** Main program entry point. This routine configures the hardware required by the application, then diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c index 94f0f7deba..5ff7247782 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.c +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.c @@ -40,18 +40,18 @@ /** Indicates what report mode the host has requested, true for normal HID reporting mode, false for special boot * protocol reporting mode. */ -bool UsingReportProtocol = true; +static bool UsingReportProtocol = true; /** Current Idle period. This is set by the host via a Set Idle HID class request to silence the device's reports * for either the entire idle duration, or until the report status changes (e.g. the user presses a key). */ -uint16_t IdleCount = 500; +static uint16_t IdleCount = 500; /** Current Idle period remaining. When the IdleCount value is set, this tracks the remaining number of idle * milliseconds. This is separate to the IdleCount timer and is incremented and compared as the host may request * the current idle period via a Get Idle HID class request, thus its value must be preserved. */ -uint16_t IdleMSRemaining = 0; +static uint16_t IdleMSRemaining = 0; /** Main program entry point. This routine configures the hardware required by the application, then diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c index fbb742ca49..ca061eef81 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c @@ -38,10 +38,10 @@ #include "KeyboardMouse.h" /** Global structure to hold the current keyboard interface HID report, for transmission to the host */ -USB_KeyboardReport_Data_t KeyboardReportData; +static USB_KeyboardReport_Data_t KeyboardReportData; /** Global structure to hold the current mouse interface HID report, for transmission to the host */ -USB_MouseReport_Data_t MouseReportData; +static USB_MouseReport_Data_t MouseReportData; /** Main program entry point. This routine configures the hardware required by the application, then diff --git a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c index 0400cc2c6e..770d0f7bcd 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c +++ b/Demos/Device/LowLevel/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/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c index 808cf50b0d..ef6c911cc9 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.c +++ b/Demos/Device/LowLevel/Mouse/Mouse.c @@ -39,18 +39,18 @@ /** Indicates what report mode the host has requested, true for normal HID reporting mode, false for special boot * protocol reporting mode. */ -bool UsingReportProtocol = true; +static bool UsingReportProtocol = true; /** Current Idle period. This is set by the host via a Set Idle HID class request to silence the device's reports * for either the entire idle duration, or until the report status changes (e.g. the user moves the mouse). */ -uint16_t IdleCount = 0; +static uint16_t IdleCount = 0; /** Current Idle period remaining. When the IdleCount value is set, this tracks the remaining number of idle * milliseconds. This is separate to the IdleCount timer and is incremented and compared as the host may request * the current idle period via a Get Idle HID class request, thus its value must be preserved. */ -uint16_t IdleMSRemaining = 0; +static uint16_t IdleMSRemaining = 0; /** Main program entry point. This routine configures the hardware required by the application, then diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c index e841ab530f..f4d3d4dd29 100644 --- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c +++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c @@ -44,10 +44,11 @@ * It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical * serial link characteristics and instead sends and receives data in endpoint streams. */ -CDC_LineEncoding_t LineEncoding = { .BaudRateBPS = 0, - .CharFormat = CDC_LINEENCODING_OneStopBit, - .ParityType = CDC_PARITY_None, - .DataBits = 8 }; +static CDC_LineEncoding_t LineEncoding = { .BaudRateBPS = 0, + .CharFormat = CDC_LINEENCODING_OneStopBit, + .ParityType = CDC_PARITY_None, + .DataBits = 8 }; + /** 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/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c index 664839ca20..74c4b09086 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c @@ -37,7 +37,7 @@ #include "DeviceFunctions.h" /** Buffer to hold the previously generated Mouse Device 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 diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c index 4a53b7c7a2..4ed0bfb8b8 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c @@ -37,7 +37,7 @@ #include "JoystickHostWithParser.h" /** Processed HID report descriptor items structure, containing information on each HID report element */ -HID_ReportInfo_t HIDReportInfo; +static HID_ReportInfo_t HIDReportInfo; /** 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/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index 4ad083e036..abb391ceef 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -37,7 +37,7 @@ #include "KeyboardHostWithParser.h" /** Processed HID report descriptor items structure, containing information on each HID report element */ -HID_ReportInfo_t HIDReportInfo; +static HID_ReportInfo_t HIDReportInfo; /** 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/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index c9db1ec029..8fd49f2a7d 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c @@ -37,7 +37,7 @@ #include "MouseHostWithParser.h" /** Processed HID report descriptor items structure, containing information on each HID report element */ -HID_ReportInfo_t HIDReportInfo; +static HID_ReportInfo_t HIDReportInfo; /** 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/Host/ClassDriver/PrinterHost/PrinterHost.c b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c index 3fb2b29d13..8d51165e66 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c @@ -52,6 +52,7 @@ USB_ClassInfo_PRNT_Host_t Printer_PRNT_Interface = }, }; + /** Main program entry point. This routine configures the hardware required by the application, then * enters a loop to run the application tasks in sequence. */ diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c index d59325b8a9..d19e5a4f05 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c @@ -37,7 +37,7 @@ #include "RNDISEthernetHost.h" /** Buffer to hold incoming and outgoing Ethernet packets. */ -uint8_t PacketBuffer[1024]; +static int8_t PacketBuffer[1024]; /** LUFA RNDIS Class driver interface configuration and state information. This structure is * passed to all RNDIS Class driver functions, so that multiple instances of the same class @@ -60,6 +60,7 @@ USB_ClassInfo_RNDIS_Host_t Ethernet_RNDIS_Interface = }, }; + /** Main program entry point. This routine configures the hardware required by the application, then * enters a loop to run the application tasks in sequence. */ diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c index 643374db02..91c482af86 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c @@ -55,6 +55,7 @@ USB_ClassInfo_SI_Host_t DigitalCamera_SI_Interface = }, }; + /** Main program entry point. This routine configures the hardware required by the application, then * enters a loop to run the application tasks in sequence. */ diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c index 5d259ced2a..4668908521 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c @@ -55,6 +55,7 @@ USB_ClassInfo_CDC_Host_t VirtualSerial_CDC_Interface = }, }; + /** Main program entry point. This routine configures the hardware required by the application, then * enters a loop to run the application tasks in sequence. */ |