projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77f3546
)
Run wspurify script on /trunk/ and /branches/ C source files, to remove any trailing...
author
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 23 Dec 2011 01:51:39 +0000
(
01:51
+0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 23 Dec 2011 01:51:39 +0000
(
01:51
+0000)
278 files changed:
Bootloaders/CDC/BootloaderAPI.h
patch
|
blob
|
blame
|
history
Bootloaders/CDC/BootloaderCDC.c
patch
|
blob
|
blame
|
history
Bootloaders/CDC/BootloaderCDC.h
patch
|
blob
|
blame
|
history
Bootloaders/CDC/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/DFU/BootloaderAPI.h
patch
|
blob
|
blame
|
history
Bootloaders/DFU/BootloaderDFU.c
patch
|
blob
|
blame
|
history
Bootloaders/DFU/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/DFU/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/HID/BootloaderHID.c
patch
|
blob
|
blame
|
history
Bootloaders/HID/BootloaderHID.h
patch
|
blob
|
blame
|
history
Bootloaders/HID/Descriptors.c
patch
|
blob
|
blame
|
history
Bootloaders/HID/Descriptors.h
patch
|
blob
|
blame
|
history
Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioInput/AudioInput.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioInput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/GenericHID/GenericHID.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Joystick/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/Keyboard/Keyboard.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorage/MassStorage.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/Sideshow/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.h
patch
|
blob
|
blame
|
history
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioInput/AudioInput.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioInput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioOutput/Descriptors.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioOutput/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/GenericHID/GenericHID.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MassStorage/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/MassStorage/MassStorage.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/Mouse/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
patch
|
blob
|
blame
|
history
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MouseHost/MouseHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AndroidAccessoryHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AudioInputHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AudioOutputHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MIDIHost/MIDIHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/PrinterHost/PrinterHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/PrinterHost/PrinterHost.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
LUFA/CodeTemplates/LUFAConfig.h
patch
|
blob
|
blame
|
history
LUFA/Common/ArchitectureSpecific.h
patch
|
blob
|
blame
|
history
LUFA/Common/Architectures.h
patch
|
blob
|
blame
|
history
LUFA/Common/Attributes.h
patch
|
blob
|
blame
|
history
LUFA/Common/BoardTypes.h
patch
|
blob
|
blame
|
history
LUFA/Common/Common.h
patch
|
blob
|
blame
|
history
LUFA/Common/CompilerSpecific.h
patch
|
blob
|
blame
|
history
LUFA/Common/Endianness.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK525/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/XPLAIN/Dataflash.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/Dataflash.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/Temperature.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Misc/RingBuffer.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Misc/TerminalCodes.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/SPI.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/Serial.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/AudioClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/CDCClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/HIDClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/HIDParser.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/HIDParser.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/HIDReportData.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/MassStorageClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/PrinterClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Common/RNDISClassCommon.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/AudioClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/AudioClassHost.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/CDCClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/CDCClassHost.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/HIDClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/MIDIClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/RNDISClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/ConfigDescriptor.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/Device.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/DeviceStandardReq.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/DeviceStandardReq.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/Endpoint.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/EndpointStream.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/Events.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/Host.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/HostStandardReq.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/HostStandardReq.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/OTG.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/PipeStream.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/StdDescriptors.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/StdRequestType.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Device_UC3.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Host_UC3.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/USBController.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/USBInterrupt.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/USBMode.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/USBTask.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/USB.h
patch
|
blob
|
blame
|
history
LUFA/Platform/UC3/ClockManagement.h
patch
|
blob
|
blame
|
history
LUFA/Platform/UC3/InterruptManagement.c
patch
|
blob
|
blame
|
history
LUFA/Platform/UC3/InterruptManagement.h
patch
|
blob
|
blame
|
history
LUFA/Platform/XMEGA/ClockManagement.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/V2Protocol.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/V2Protocol.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
patch
|
blob
|
blame
|
history
Projects/Benito/Benito.c
patch
|
blob
|
blame
|
history
Projects/HIDReportViewer/HIDReportViewer.c
patch
|
blob
|
blame
|
history
Projects/Incomplete/StandaloneProgrammer/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
patch
|
blob
|
blame
|
history
Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
patch
|
blob
|
blame
|
history
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Projects/LEDNotifier/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/MIDIToneGenerator/MIDIToneGenerator.c
patch
|
blob
|
blame
|
history
Projects/MIDIToneGenerator/MIDIToneGenerator.h
patch
|
blob
|
blame
|
history
Projects/Magstripe/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/MediaController/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/MediaController/MediaController.c
patch
|
blob
|
blame
|
history
Projects/MissileLauncher/MissileLauncher.c
patch
|
blob
|
blame
|
history
Projects/RelayBoard/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Lib/DS1307.c
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Lib/DS1307.h
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Lib/FATFs/ff.c
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Lib/FATFs/ff.h
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Projects/TempDataLogger/TempDataLogger.c
patch
|
blob
|
blame
|
history
Projects/USBtoSerial/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/USBtoSerial/USBtoSerial.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Descriptors.h
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/DHCPCommon.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/DHCPCommon.h
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/DHCPServerApp.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/FATFs/ff.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/FATFs/ff.h
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/SCSI.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/SCSI.h
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/uIPManagement.c
patch
|
blob
|
blame
|
history
Projects/Webserver/Lib/uIPManagement.h
patch
|
blob
|
blame
|
history
Projects/Webserver/USBDeviceMode.c
patch
|
blob
|
blame
|
history
Projects/Webserver/USBHostMode.c
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/AVRISPDescriptors.h
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/Lib/SoftUART.h
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/USARTDescriptors.h
patch
|
blob
|
blame
|
history
Projects/XPLAINBridge/XPLAINBridge.c
patch
|
blob
|
blame
|
history
diff --git
a/Bootloaders/CDC/BootloaderAPI.h
b/Bootloaders/CDC/BootloaderAPI.h
index
fd35110
..
9d652c8
100644
(file)
--- a/
Bootloaders/CDC/BootloaderAPI.h
+++ b/
Bootloaders/CDC/BootloaderAPI.h
@@
-40,9
+40,9
@@
#include <avr/io.h>
#include <avr/boot.h>
#include <stdbool.h>
#include <avr/io.h>
#include <avr/boot.h>
#include <stdbool.h>
-
+
#include <LUFA/Common/Common.h>
#include <LUFA/Common/Common.h>
-
+
/* Function Prototypes: */
void BootloaderAPI_ErasePage(const uint32_t Address);
void BootloaderAPI_WritePage(const uint32_t Address);
/* Function Prototypes: */
void BootloaderAPI_ErasePage(const uint32_t Address);
void BootloaderAPI_WritePage(const uint32_t Address);
diff --git
a/Bootloaders/CDC/BootloaderCDC.c
b/Bootloaders/CDC/BootloaderCDC.c
index
7695e33
..
0e7920a
100644
(file)
--- a/
Bootloaders/CDC/BootloaderCDC.c
+++ b/
Bootloaders/CDC/BootloaderCDC.c
@@
-104,10
+104,10
@@
void SetupHardware(void)
/* Initialize USB Subsystem */
USB_Init();
LEDs_Init();
/* Initialize USB Subsystem */
USB_Init();
LEDs_Init();
-
+
/* Bootloader active LED toggle timer initialization */
TIMSK1 = (1 << TOIE1);
/* Bootloader active LED toggle timer initialization */
TIMSK1 = (1 << TOIE1);
- TCCR1B = ((1 << CS11) | (1 << CS10));
+ TCCR1B = ((1 << CS11) | (1 << CS10));
}
/** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */
}
/** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */
@@
-266,7
+266,7
@@
static void ReadWriteMemoryBlock(const uint8_t Command)
{
LowByte = FetchNextCommandByte();
}
{
LowByte = FetchNextCommandByte();
}
-
+
HighByte = !HighByte;
}
else
HighByte = !HighByte;
}
else
@@
-365,7
+365,7
@@
void CDC_Task(void)
if (Command == 'E')
{
RunBootloader = false;
if (Command == 'E')
{
RunBootloader = false;
-
+
/* Send confirmation byte back to the host */
WriteNextResponseByte('\r');
}
/* Send confirmation byte back to the host */
WriteNextResponseByte('\r');
}
diff --git
a/Bootloaders/CDC/BootloaderCDC.h
b/Bootloaders/CDC/BootloaderCDC.h
index
41280fe
..
bfc8af5
100644
(file)
--- a/
Bootloaders/CDC/BootloaderCDC.h
+++ b/
Bootloaders/CDC/BootloaderCDC.h
@@
-46,7
+46,7
@@
#include <stdbool.h>
#include "Descriptors.h"
#include <stdbool.h>
#include "Descriptors.h"
- #include "BootloaderAPI.h"
+ #include "BootloaderAPI.h"
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Board/LEDs.h>
diff --git
a/Bootloaders/CDC/Descriptors.h
b/Bootloaders/CDC/Descriptors.h
index
c843bec
..
842f22c
100644
(file)
--- a/
Bootloaders/CDC/Descriptors.h
+++ b/
Bootloaders/CDC/Descriptors.h
@@
-115,14
+115,14
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Control Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
// CDC Control Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git
a/Bootloaders/DFU/BootloaderAPI.h
b/Bootloaders/DFU/BootloaderAPI.h
index
fd35110
..
9d652c8
100644
(file)
--- a/
Bootloaders/DFU/BootloaderAPI.h
+++ b/
Bootloaders/DFU/BootloaderAPI.h
@@
-40,9
+40,9
@@
#include <avr/io.h>
#include <avr/boot.h>
#include <stdbool.h>
#include <avr/io.h>
#include <avr/boot.h>
#include <stdbool.h>
-
+
#include <LUFA/Common/Common.h>
#include <LUFA/Common/Common.h>
-
+
/* Function Prototypes: */
void BootloaderAPI_ErasePage(const uint32_t Address);
void BootloaderAPI_WritePage(const uint32_t Address);
/* Function Prototypes: */
void BootloaderAPI_ErasePage(const uint32_t Address);
void BootloaderAPI_WritePage(const uint32_t Address);
diff --git
a/Bootloaders/DFU/BootloaderDFU.c
b/Bootloaders/DFU/BootloaderDFU.c
index
6e0c95d
..
0948019
100644
(file)
--- a/
Bootloaders/DFU/BootloaderDFU.c
+++ b/
Bootloaders/DFU/BootloaderDFU.c
@@
-113,10
+113,10
@@
int main(void)
/* If the TCK pin is not jumpered to ground, start the user application instead */
RunBootloader = (!(PINF & (1 << 4)));
/* If the TCK pin is not jumpered to ground, start the user application instead */
RunBootloader = (!(PINF & (1 << 4)));
-
+
/* Re-enable JTAG debugging */
MCUCR &= ~(1 << JTD);
/* Re-enable JTAG debugging */
MCUCR &= ~(1 << JTD);
- MCUCR &= ~(1 << JTD);
+ MCUCR &= ~(1 << JTD);
#endif
/* Turn on first LED on the board to indicate that the bootloader has started */
#endif
/* Turn on first LED on the board to indicate that the bootloader has started */
@@
-153,7
+153,7
@@
void SetupHardware(void)
/* Initialize the USB subsystem */
USB_Init();
LEDs_Init();
/* Initialize the USB subsystem */
USB_Init();
LEDs_Init();
-
+
/* Bootloader active LED toggle timer initialization */
TIMSK1 = (1 << TOIE1);
TCCR1B = ((1 << CS11) | (1 << CS10));
/* Bootloader active LED toggle timer initialization */
TIMSK1 = (1 << TOIE1);
TCCR1B = ((1 << CS11) | (1 << CS10));
@@
-181,7
+181,7
@@
ISR(TIMER1_OVF_vect, ISR_BLOCK)
* internally.
*/
void EVENT_USB_Device_ControlRequest(void)
* internally.
*/
void EVENT_USB_Device_ControlRequest(void)
-{
+{
/* Ignore any requests that aren't directed to the DFU interface */
if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
(REQTYPE_CLASS | REQREC_INTERFACE))
/* Ignore any requests that aren't directed to the DFU interface */
if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
(REQTYPE_CLASS | REQREC_INTERFACE))
@@
-742,3
+742,4
@@
static void ProcessReadCommand(void)
else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Read signature byte
ResponseByte = SignatureInfo[DataIndexToRead - 0x30];
}
else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Read signature byte
ResponseByte = SignatureInfo[DataIndexToRead - 0x30];
}
+
diff --git
a/Bootloaders/DFU/Descriptors.c
b/Bootloaders/DFU/Descriptors.c
index
b9c77aa
..
44170e6
100644
(file)
--- a/
Bootloaders/DFU/Descriptors.c
+++ b/
Bootloaders/DFU/Descriptors.c
@@
-159,11
+159,11
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
Address = &DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
Address = &DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = &ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
Address = &ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
if (!(DescriptorNumber))
{
Address = &LanguageString;
if (!(DescriptorNumber))
{
Address = &LanguageString;
@@
-174,10
+174,10
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
Address = &ProductString;
Size = ProductString.Header.Size;
}
Address = &ProductString;
Size = ProductString.Header.Size;
}
-
+
break;
}
break;
}
-
+
*DescriptorAddress = Address;
return Size;
}
*DescriptorAddress = Address;
return Size;
}
diff --git
a/Bootloaders/DFU/Descriptors.h
b/Bootloaders/DFU/Descriptors.h
index
445557f
..
42b4bb6
100644
(file)
--- a/
Bootloaders/DFU/Descriptors.h
+++ b/
Bootloaders/DFU/Descriptors.h
@@
-161,7
+161,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// DFU Interface
USB_Descriptor_Interface_t DFU_Interface;
USB_Descriptor_DFU_Functional_t DFU_Functional;
// DFU Interface
USB_Descriptor_Interface_t DFU_Interface;
USB_Descriptor_DFU_Functional_t DFU_Functional;
diff --git
a/Bootloaders/HID/BootloaderHID.c
b/Bootloaders/HID/BootloaderHID.c
index
f4cb0f1
..
500d3fe
100644
(file)
--- a/
Bootloaders/HID/BootloaderHID.c
+++ b/
Bootloaders/HID/BootloaderHID.c
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-32,7
+32,7
@@
*
* Main source file for the HID class bootloader. This file contains the complete bootloader logic.
*/
*
* Main source file for the HID class bootloader. This file contains the complete bootloader logic.
*/
-
+
#include "BootloaderHID.h"
/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run
#include "BootloaderHID.h"
/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run
@@
-41,20
+41,20
@@
*/
static bool RunBootloader = true;
*/
static bool RunBootloader = true;
-/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
+/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
* runs the bootloader processing routine until instructed to soft-exit.
*/
int main(void)
{
/* Setup hardware required for the bootloader */
SetupHardware();
* runs the bootloader processing routine until instructed to soft-exit.
*/
int main(void)
{
/* Setup hardware required for the bootloader */
SetupHardware();
-
+
/* Enable global interrupts so that the USB stack can function */
sei();
while (RunBootloader)
USB_USBTask();
/* Enable global interrupts so that the USB stack can function */
sei();
while (RunBootloader)
USB_USBTask();
-
+
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
@@
-108,17
+108,17
@@
void EVENT_USB_Device_ControlRequest(void)
{
case HID_REQ_SetReport:
Endpoint_ClearSETUP();
{
case HID_REQ_SetReport:
Endpoint_ClearSETUP();
-
+
/* Wait until the command has been sent by the host */
while (!(Endpoint_IsOUTReceived()));
/* Wait until the command has been sent by the host */
while (!(Endpoint_IsOUTReceived()));
-
+
/* Read in the write destination address */
#if (FLASHEND > 0xFFFF)
uint32_t PageAddress = ((uint32_t)Endpoint_Read_16_LE() << 8);
#else
uint16_t PageAddress = Endpoint_Read_16_LE();
#endif
/* Read in the write destination address */
#if (FLASHEND > 0xFFFF)
uint32_t PageAddress = ((uint32_t)Endpoint_Read_16_LE() << 8);
#else
uint16_t PageAddress = Endpoint_Read_16_LE();
#endif
-
+
/* Check if the command is a program page command, or a start application command */
#if (FLASHEND > 0xFFFF)
if ((uint16_t)(PageAddress >> 8) == COMMAND_STARTAPPLICATION)
/* Check if the command is a program page command, or a start application command */
#if (FLASHEND > 0xFFFF)
if ((uint16_t)(PageAddress >> 8) == COMMAND_STARTAPPLICATION)
@@
-133,9
+133,9
@@
void EVENT_USB_Device_ControlRequest(void)
/* Erase the given FLASH page, ready to be programmed */
boot_page_erase(PageAddress);
boot_spm_busy_wait();
/* Erase the given FLASH page, ready to be programmed */
boot_page_erase(PageAddress);
boot_spm_busy_wait();
-
+
/* Write each of the FLASH page's bytes in sequence */
/* Write each of the FLASH page's bytes in sequence */
- for (uint8_t PageWord = 0; PageWord < (SPM_PAGESIZE / 2); PageWord++)
+ for (uint8_t PageWord = 0; PageWord < (SPM_PAGESIZE / 2); PageWord++)
{
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */
if (!(Endpoint_BytesInEndpoint()))
{
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */
if (!(Endpoint_BytesInEndpoint()))
@@
-162,3
+162,4
@@
void EVENT_USB_Device_ControlRequest(void)
break;
}
}
break;
}
}
+
diff --git
a/Bootloaders/HID/BootloaderHID.h
b/Bootloaders/HID/BootloaderHID.h
index
190dff8
..
e0f648f
100644
(file)
--- a/
Bootloaders/HID/BootloaderHID.h
+++ b/
Bootloaders/HID/BootloaderHID.h
@@
-8,14
+8,14
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
- Permission to use, copy, modify, distribute, and sell this
+
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-32,7
+32,7
@@
*
* Header file for TeensyHID.c.
*/
*
* Header file for TeensyHID.c.
*/
-
+
#ifndef _TEENSYHID_H_
#define _TEENSYHID_H_
#ifndef _TEENSYHID_H_
#define _TEENSYHID_H_
@@
-47,15
+47,16
@@
#include "Descriptors.h"
#include <LUFA/Drivers/USB/USB.h>
#include "Descriptors.h"
#include <LUFA/Drivers/USB/USB.h>
-
- /* Macros: */
+
+ /* Macros: */
/** Bootloader special address to start the user application */
#define COMMAND_STARTAPPLICATION 0xFFFF
/** Bootloader special address to start the user application */
#define COMMAND_STARTAPPLICATION 0xFFFF
-
+
/* Function Prototypes: */
void SetupHardware(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
/* Function Prototypes: */
void SetupHardware(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
-
+
#endif
#endif
+
diff --git
a/Bootloaders/HID/Descriptors.c
b/Bootloaders/HID/Descriptors.c
index
bbb8214
..
48ef78e
100644
(file)
--- a/
Bootloaders/HID/Descriptors.c
+++ b/
Bootloaders/HID/Descriptors.c
@@
-8,14
+8,14
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
- Permission to use, copy, modify, distribute, and sell this
+
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-30,9
+30,9
@@
/** \file
*
/** \file
*
- * USB Device Descriptors, for library use when in USB device mode. Descriptors are special
+ * USB Device Descriptors, for library use when in USB device mode. Descriptors are special
* computer-readable structures which the host requests upon device enumeration, to determine
* computer-readable structures which the host requests upon device enumeration, to determine
- * the device's capabilities and functions.
+ * the device's capabilities and functions.
*/
#include "Descriptors.h"
*/
#include "Descriptors.h"
@@
-52,7
+52,7
@@
const USB_Descriptor_HIDReport_Datatype_t HIDReport[] =
HID_RI_LOGICAL_MINIMUM(8, 0x00),
HID_RI_LOGICAL_MAXIMUM(8, 0xFF),
HID_RI_REPORT_SIZE(8, 0x08),
HID_RI_LOGICAL_MINIMUM(8, 0x00),
HID_RI_LOGICAL_MAXIMUM(8, 0xFF),
HID_RI_REPORT_SIZE(8, 0x08),
- HID_RI_REPORT_COUNT(16, (sizeof(uint16_t) + SPM_PAGESIZE)),
+ HID_RI_REPORT_COUNT(16, (sizeof(uint16_t) + SPM_PAGESIZE)),
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE),
HID_RI_END_COLLECTION(0),
};
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE),
HID_RI_END_COLLECTION(0),
};
@@
-91,49
+91,49
@@
const USB_Descriptor_Device_t DeviceDescriptor =
*/
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
*/
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
- .Config =
+ .Config =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalInterfaces = 1,
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalInterfaces = 1,
-
+
.ConfigurationNumber = 1,
.ConfigurationStrIndex = NO_DESCRIPTOR,
.ConfigurationNumber = 1,
.ConfigurationStrIndex = NO_DESCRIPTOR,
-
+
.ConfigAttributes = USB_CONFIG_ATTR_BUSPOWERED,
.ConfigAttributes = USB_CONFIG_ATTR_BUSPOWERED,
-
+
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
-
- .HID_Interface =
+
+ .HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
.InterfaceNumber = 0x00,
.AlternateSetting = 0x00,
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
.InterfaceNumber = 0x00,
.AlternateSetting = 0x00,
-
+
.TotalEndpoints = 1,
.TotalEndpoints = 1,
-
+
.Class = HID_CSCP_HIDClass,
.SubClass = HID_CSCP_NonBootSubclass,
.Protocol = HID_CSCP_NonBootProtocol,
.Class = HID_CSCP_HIDClass,
.SubClass = HID_CSCP_NonBootSubclass,
.Protocol = HID_CSCP_NonBootProtocol,
-
+
.InterfaceStrIndex = NO_DESCRIPTOR
},
.InterfaceStrIndex = NO_DESCRIPTOR
},
- .HID_VendorHID =
- {
+ .HID_VendorHID =
+ {
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
-
+
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(HIDReport)
},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(HIDReport)
},
-
- .HID_ReportINEndpoint =
+
+ .HID_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
@@
-158,17
+158,17
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const void* Address = NULL;
uint16_t Size = NO_DESCRIPTOR;
const void* Address = NULL;
uint16_t Size = NO_DESCRIPTOR;
-
+
/* If/Else If chain compiles slightly smaller than a switch case */
if (DescriptorType == DTYPE_Device)
{
Address = &DeviceDescriptor;
/* If/Else If chain compiles slightly smaller than a switch case */
if (DescriptorType == DTYPE_Device)
{
Address = &DeviceDescriptor;
- Size = sizeof(USB_Descriptor_Device_t);
+ Size = sizeof(USB_Descriptor_Device_t);
}
else if (DescriptorType == DTYPE_Configuration)
{
Address = &ConfigurationDescriptor;
}
else if (DescriptorType == DTYPE_Configuration)
{
Address = &ConfigurationDescriptor;
- Size = sizeof(USB_Descriptor_Configuration_t);
+ Size = sizeof(USB_Descriptor_Configuration_t);
}
else if (DescriptorType == HID_DTYPE_HID)
{
}
else if (DescriptorType == HID_DTYPE_HID)
{
@@
-184,3
+184,4
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
*DescriptorAddress = Address;
return Size;
}
*DescriptorAddress = Address;
return Size;
}
+
diff --git
a/Bootloaders/HID/Descriptors.h
b/Bootloaders/HID/Descriptors.h
index
eb231f0
..
ac9d087
100644
(file)
--- a/
Bootloaders/HID/Descriptors.h
+++ b/
Bootloaders/HID/Descriptors.h
@@
-8,14
+8,14
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
- Permission to use, copy, modify, distribute, and sell this
+
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-47,18
+47,18
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_VendorHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
// Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_VendorHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
-
+
/* Macros: */
/** Endpoint number of the HID data IN endpoint. */
#define HID_IN_EPNUM 1
/* Macros: */
/** Endpoint number of the HID data IN endpoint. */
#define HID_IN_EPNUM 1
- /** Size in bytes of the HID reporting IN endpoint. */
+ /** Size in bytes of the HID reporting IN endpoint. */
#define HID_IN_EPSIZE 64
/* Function Prototypes: */
#define HID_IN_EPSIZE 64
/* Function Prototypes: */
@@
-68,3
+68,4
@@
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
+
diff --git
a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
index
e22d394
..
e1f2ea0
100644
(file)
--- a/
Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
+++ b/
Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
@@
-710,10
+710,10
@@
int teensy_open(void)
{
teensy_close();
uhid_teensy_fd = open_usb_device(0x16C0, 0x0478);
{
teensy_close();
uhid_teensy_fd = open_usb_device(0x16C0, 0x0478);
-
+
if (uhid_teensy_fd < 0)
uhid_teensy_fd = open_usb_device(0x03eb, 0x2067);
if (uhid_teensy_fd < 0)
uhid_teensy_fd = open_usb_device(0x03eb, 0x2067);
-
+
if (uhid_teensy_fd < 0) return 0;
return 1;
}
if (uhid_teensy_fd < 0) return 0;
return 1;
}
@@
-826,7
+826,7
@@
parse_hex_line(char *line)
int addr, code, num;
int sum, len, cksum, i;
char *ptr;
int addr, code, num;
int sum, len, cksum, i;
char *ptr;
-
+
num = 0;
if (line[0] != ':') return 0;
if (strlen(line) < 11) return 0;
num = 0;
if (line[0] != ':') return 0;
if (strlen(line) < 11) return 0;
diff --git
a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index
31e8d96
..
f11122f
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/
Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@
-106,11
+106,11
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
-
+
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
-
+
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
@@
-122,7
+122,7
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
AudioSample -= (SAMPLE_MAX_RANGE / 2);
#endif
#endif
AudioSample -= (SAMPLE_MAX_RANGE / 2);
#endif
#endif
-
+
Audio_Device_WriteSample16(&Microphone_Audio_Interface, AudioSample);
}
Audio_Device_WriteSample16(&Microphone_Audio_Interface, AudioSample);
}
@@
-211,10
+211,10
@@
bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
CurrentAudioSampleFrequency = (((uint32_t)Data[2] << 16) | ((uint32_t)Data[1] << 8) | (uint32_t)Data[0]);
/* Adjust sample reload timer to the new frequency */
CurrentAudioSampleFrequency = (((uint32_t)Data[2] << 16) | ((uint32_t)Data[1] << 8) | (uint32_t)Data[0]);
/* Adjust sample reload timer to the new frequency */
- OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
+ OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
}
}
-
- return true;
+
+ return true;
case AUDIO_REQ_GetCurrent:
/* Check if we are just testing for a valid property, or actually reading it */
if (DataLength != NULL)
case AUDIO_REQ_GetCurrent:
/* Check if we are just testing for a valid property, or actually reading it */
if (DataLength != NULL)
@@
-223,13
+223,14
@@
bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
Data[2] = (CurrentAudioSampleFrequency >> 16);
Data[1] = (CurrentAudioSampleFrequency >> 8);
Data[2] = (CurrentAudioSampleFrequency >> 16);
Data[1] = (CurrentAudioSampleFrequency >> 8);
- Data[0] = (CurrentAudioSampleFrequency & 0xFF);
+ Data[0] = (CurrentAudioSampleFrequency & 0xFF);
}
}
-
+
return true;
}
}
}
return true;
}
}
}
-
+
return false;
}
return false;
}
+
diff --git
a/Demos/Device/ClassDriver/AudioInput/Descriptors.c
b/Demos/Device/ClassDriver/AudioInput/Descriptors.c
index
2a6a777
..
48059af
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioInput/Descriptors.c
+++ b/
Demos/Device/ClassDriver/AudioInput/Descriptors.c
@@
-204,7
+204,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t))
},
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t))
},
-
+
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
diff --git
a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index
8858999
..
88f8200
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@
-91,7
+91,7
@@
void SetupHardware(void)
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
-
+
/* Check that the USB bus is ready for the next sample to read */
if (Audio_Device_IsSampleReceived(&Speaker_Audio_Interface))
{
/* Check that the USB bus is ready for the next sample to read */
if (Audio_Device_IsSampleReceived(&Speaker_Audio_Interface))
{
@@
-128,8
+128,8
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
LEDs_SetAllLEDs(LEDMask);
}
LEDs_SetAllLEDs(LEDMask);
}
-
- Endpoint_SelectEndpoint(PrevEndpoint);
+
+ Endpoint_SelectEndpoint(PrevEndpoint);
}
/** Event handler for the library USB Connection event. */
}
/** Event handler for the library USB Connection event. */
@@
-248,10
+248,10
@@
bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
CurrentAudioSampleFrequency = (((uint32_t)Data[2] << 16) | ((uint32_t)Data[1] << 8) | (uint32_t)Data[0]);
/* Adjust sample reload timer to the new frequency */
CurrentAudioSampleFrequency = (((uint32_t)Data[2] << 16) | ((uint32_t)Data[1] << 8) | (uint32_t)Data[0]);
/* Adjust sample reload timer to the new frequency */
- OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
+ OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
}
}
-
- return true;
+
+ return true;
case AUDIO_REQ_GetCurrent:
/* Check if we are just testing for a valid property, or actually reading it */
if (DataLength != NULL)
case AUDIO_REQ_GetCurrent:
/* Check if we are just testing for a valid property, or actually reading it */
if (DataLength != NULL)
@@
-260,13
+260,14
@@
bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
Data[2] = (CurrentAudioSampleFrequency >> 16);
Data[1] = (CurrentAudioSampleFrequency >> 8);
Data[2] = (CurrentAudioSampleFrequency >> 16);
Data[1] = (CurrentAudioSampleFrequency >> 8);
- Data[0] = (CurrentAudioSampleFrequency & 0xFF);
+ Data[0] = (CurrentAudioSampleFrequency & 0xFF);
}
}
-
+
return true;
}
}
}
return true;
}
}
}
-
+
return false;
}
return false;
}
+
diff --git
a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
index
75a13bb
..
50d0bb6
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
+++ b/
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
@@
-204,7
+204,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)),
},
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)),
},
-
+
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
diff --git
a/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
b/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
index
da95077
..
aa551b0
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
+++ b/
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
@@
-83,3
+83,4
@@
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
+
diff --git
a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
index
4affeaf
..
fc13b57
100644
(file)
--- a/
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
+++ b/
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
@@
-109,3
+109,4
@@
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
+
diff --git
a/Demos/Device/ClassDriver/GenericHID/GenericHID.c
b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
index
466efaf
..
be79540
100644
(file)
--- a/
Demos/Device/ClassDriver/GenericHID/GenericHID.c
+++ b/
Demos/Device/ClassDriver/GenericHID/GenericHID.c
@@
-145,7
+145,7
@@
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
{
uint8_t* Data = (uint8_t*)ReportData;
uint8_t CurrLEDMask = LEDs_GetLEDs();
{
uint8_t* Data = (uint8_t*)ReportData;
uint8_t CurrLEDMask = LEDs_GetLEDs();
-
+
Data[0] = ((CurrLEDMask & LEDS_LED1) ? 1 : 0);
Data[1] = ((CurrLEDMask & LEDS_LED2) ? 1 : 0);
Data[2] = ((CurrLEDMask & LEDS_LED3) ? 1 : 0);
Data[0] = ((CurrLEDMask & LEDS_LED1) ? 1 : 0);
Data[1] = ((CurrLEDMask & LEDS_LED2) ? 1 : 0);
Data[2] = ((CurrLEDMask & LEDS_LED3) ? 1 : 0);
@@
-171,7
+171,7
@@
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
{
uint8_t* Data = (uint8_t*)ReportData;
uint8_t NewLEDMask = LEDS_NO_LEDS;
{
uint8_t* Data = (uint8_t*)ReportData;
uint8_t NewLEDMask = LEDS_NO_LEDS;
-
+
if (Data[0])
NewLEDMask |= LEDS_LED1;
if (Data[0])
NewLEDMask |= LEDS_LED1;
@@
-183,7
+183,7
@@
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
if (Data[3])
NewLEDMask |= LEDS_LED1;
if (Data[3])
NewLEDMask |= LEDS_LED1;
-
+
LEDs_SetAllLEDs(NewLEDMask);
}
LEDs_SetAllLEDs(NewLEDMask);
}
diff --git
a/Demos/Device/ClassDriver/Joystick/Descriptors.c
b/Demos/Device/ClassDriver/Joystick/Descriptors.c
index
cc73992
..
bd1ba4c
100644
(file)
--- a/
Demos/Device/ClassDriver/Joystick/Descriptors.c
+++ b/
Demos/Device/ClassDriver/Joystick/Descriptors.c
@@
-42,7
+42,7
@@
* descriptor is parsed by the host and its contents used to determine what data (and in what encoding)
* the device will send, and what it may be sent back from the host. Refer to the HID specification for
* more details on HID report descriptors.
* descriptor is parsed by the host and its contents used to determine what data (and in what encoding)
* the device will send, and what it may be sent back from the host. Refer to the HID specification for
* more details on HID report descriptors.
- */
+ */
const USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] =
{
/* Use the HID class driver's standard Joystick report.
const USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] =
{
/* Use the HID class driver's standard Joystick report.
diff --git
a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index
2072e77
..
6109ede
100644
(file)
--- a/
Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/
Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@
-8,7
+8,7
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
+
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
diff --git
a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
index
03caa07
..
bc015ef
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
@@
-279,7
+279,7
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
Address = &ConfigurationDescriptor.HID2_MouseHID;
Size = sizeof(USB_HID_Descriptor_HID_t);
}
Address = &ConfigurationDescriptor.HID2_MouseHID;
Size = sizeof(USB_HID_Descriptor_HID_t);
}
-
+
break;
case HID_DTYPE_Report:
if (!(wIndex))
break;
case HID_DTYPE_Report:
if (!(wIndex))
diff --git
a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
index
b6a2bd7
..
2e7339b
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
@@
-258,3
+258,4
@@
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
LEDs_SetAllLEDs(LEDMask);
}
}
LEDs_SetAllLEDs(LEDMask);
}
}
+
diff --git
a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
index
de60d76
..
cac4853
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
@@
-77,7
+77,7
@@
const USB_Descriptor_HIDReport_Datatype_t PROGMEM HIDReport[] =
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
HID_RI_END_COLLECTION(0),
HID_RI_END_COLLECTION(0),
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
HID_RI_END_COLLECTION(0),
HID_RI_END_COLLECTION(0),
-
+
/* Keyboard Report */
HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */
HID_RI_USAGE(8, 0x06), /* Keyboard */
/* Keyboard Report */
HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */
HID_RI_USAGE(8, 0x06), /* Keyboard */
@@
-280,7
+280,7
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case HID_DTYPE_HID:
Address = &ConfigurationDescriptor.HID_HIDData;
break;
case HID_DTYPE_HID:
Address = &ConfigurationDescriptor.HID_HIDData;
- Size = sizeof(USB_HID_Descriptor_HID_t);
+ Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case HID_DTYPE_Report:
Address = &HIDReport;
break;
case HID_DTYPE_Report:
Address = &HIDReport;
diff --git
a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
index
7d9b066
..
a0d99d4
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
+++ b/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.h
@@
-62,7
+62,7
@@
/** Size in bytes of each of the HID reporting IN endpoint. */
#define HID_EPSIZE 8
/** Size in bytes of each of the HID reporting IN endpoint. */
#define HID_EPSIZE 8
-
+
/* Enums: */
/** Enum for the HID report IDs used in the device. */
enum
/* Enums: */
/** Enum for the HID report IDs used in the device. */
enum
diff --git
a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
index
a3c0abe
..
4b6a86d
100644
(file)
--- a/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
+++ b/
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
@@
-148,7
+148,7
@@
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
uint8_t ButtonStatus_LCL = Buttons_GetStatus();
if (!(ButtonStatus_LCL & BUTTONS_BUTTON1))
uint8_t ButtonStatus_LCL = Buttons_GetStatus();
if (!(ButtonStatus_LCL & BUTTONS_BUTTON1))
- {
+ {
USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
KeyboardReport->Modifier = HID_KEYBOARD_MODIFIER_LEFTSHIFT;
USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
KeyboardReport->Modifier = HID_KEYBOARD_MODIFIER_LEFTSHIFT;
@@
-221,3
+221,4
@@
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
LEDs_SetAllLEDs(LEDMask);
}
LEDs_SetAllLEDs(LEDMask);
}
+
diff --git
a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
index
66b58a1
..
fb46739
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
+++ b/
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
@@
-287,7
+287,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@
-311,7
+311,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
/* Adjust the given block address to the real media address based on the selected LUN */
BlockAddress += ((uint32_t)MSInterfaceInfo->State.CommandBlock.LUN * LUN_MEDIA_BLOCKS);
#endif
/* Adjust the given block address to the real media address based on the selected LUN */
BlockAddress += ((uint32_t)MSInterfaceInfo->State.CommandBlock.LUN * LUN_MEDIA_BLOCKS);
#endif
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@
-345,3
+345,4
@@
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
return true;
}
+
diff --git
a/Demos/Device/ClassDriver/MassStorage/MassStorage.h
b/Demos/Device/ClassDriver/MassStorage/MassStorage.h
index
9d926ea
..
3215333
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorage/MassStorage.h
+++ b/
Demos/Device/ClassDriver/MassStorage/MassStorage.h
@@
-73,7
+73,7
@@
/** Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device. */
#define LUN_MEDIA_BLOCKS (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
/** Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device. */
#define LUN_MEDIA_BLOCKS (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
-
+
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
diff --git
a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
index
717d172
..
fb46739
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
+++ b/
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
@@
-287,7
+287,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@
-345,3
+345,4
@@
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
return true;
}
+
diff --git
a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
index
94cb658
..
ca78a6f
100644
(file)
--- a/
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
+++ b/
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
@@
-81,7
+81,7
@@
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
-
+
/* Function Prototypes: */
void SetupHardware(void);
/* Function Prototypes: */
void SetupHardware(void);
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index
adcb293
..
b53b024
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@
-87,16
+87,16
@@
int main(void)
if (RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface))
{
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
if (RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface))
{
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
-
+
RNDIS_Device_ReadPacket(&Ethernet_RNDIS_Interface, &FrameIN.FrameData, &FrameIN.FrameLength);
Ethernet_ProcessPacket(&FrameIN, &FrameOUT);
RNDIS_Device_ReadPacket(&Ethernet_RNDIS_Interface, &FrameIN.FrameData, &FrameIN.FrameLength);
Ethernet_ProcessPacket(&FrameIN, &FrameOUT);
-
+
if (FrameOUT.FrameLength)
{
if (FrameOUT.FrameLength)
{
- RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface, &FrameOUT.FrameData, FrameOUT.FrameLength);
+ RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface, &FrameOUT.FrameData, FrameOUT.FrameLength);
FrameOUT.FrameLength = 0;
}
FrameOUT.FrameLength = 0;
}
-
+
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
index
66b58a1
..
fb46739
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
@@
-287,7
+287,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@
-311,7
+311,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
/* Adjust the given block address to the real media address based on the selected LUN */
BlockAddress += ((uint32_t)MSInterfaceInfo->State.CommandBlock.LUN * LUN_MEDIA_BLOCKS);
#endif
/* Adjust the given block address to the real media address based on the selected LUN */
BlockAddress += ((uint32_t)MSInterfaceInfo->State.CommandBlock.LUN * LUN_MEDIA_BLOCKS);
#endif
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@
-345,3
+345,4
@@
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
return true;
}
+
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
index
975067f
..
4020923
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
@@
-59,7
+59,7
@@
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
.NotificationEndpointDoubleBank = false,
},
};
.NotificationEndpointDoubleBank = false,
},
};
-
+
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
@@
-211,3
+211,4
@@
bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSI
return CommandSuccess;
}
return CommandSuccess;
}
+
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
index
7bb11d0
..
07b7420
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
+++ b/
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
@@
-47,7
+47,7
@@
#include "Lib/SCSI.h"
#include "Lib/DataflashManager.h"
#include "Lib/SCSI.h"
#include "Lib/DataflashManager.h"
-
+
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Joystick.h>
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Joystick.h>
@@
-74,7
+74,7
@@
/** Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device. */
#define LUN_MEDIA_BLOCKS (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
/** Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device. */
#define LUN_MEDIA_BLOCKS (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
-
+
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
diff --git
a/Demos/Device/Incomplete/Sideshow/Descriptors.h
b/Demos/Device/Incomplete/Sideshow/Descriptors.h
index
e24d37e
..
4b5b952
100644
(file)
--- a/
Demos/Device/Incomplete/Sideshow/Descriptors.h
+++ b/
Demos/Device/Incomplete/Sideshow/Descriptors.h
@@
-47,7
+47,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// SideShow Interface
USB_Descriptor_Interface_t SSHOW_Interface;
USB_Descriptor_Endpoint_t SSHOW_DataInEndpoint;
// SideShow Interface
USB_Descriptor_Interface_t SSHOW_Interface;
USB_Descriptor_Endpoint_t SSHOW_DataInEndpoint;
diff --git
a/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h
b/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h
index
794b91e
..
98023ec
100644
(file)
--- a/
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h
+++ b/
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h
@@
-102,3
+102,4
@@
void SideShow_Discard_Byte_Stream(void);
#endif
void SideShow_Discard_Byte_Stream(void);
#endif
+
diff --git
a/Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.h
b/Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.h
index
452aad8
..
270010e
100644
(file)
--- a/
Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.h
+++ b/
Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.h
@@
-125,3
+125,4
@@
#endif
#endif
#endif
#endif
+
diff --git
a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
index
3b8c295
..
0d2c966
100644
(file)
--- a/
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
+++ b/
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-38,7
+38,7
@@
TMC_Capabilities_t Capabilities =
{
.Status = TMC_STATUS_SUCCESS,
.TMCVersion = VERSION_BCD(1.00),
{
.Status = TMC_STATUS_SUCCESS,
.TMCVersion = VERSION_BCD(1.00),
-
+
.Interface =
{
.ListenOnly = false,
.Interface =
{
.ListenOnly = false,
@@
-82,7
+82,7
@@
int main(void)
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
-
+
for (;;)
{
TMC_Task();
for (;;)
{
TMC_Task();
@@
-99,7
+99,7
@@
void SetupHardware(void)
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Disable clock division */
clock_prescale_set(clock_div_1);
-
+
/* Hardware Initialization */
LEDs_Init();
USB_Init();
/* Hardware Initialization */
LEDs_Init();
USB_Init();
@@
-167,43
+167,43
@@
void EVENT_USB_Device_ControlRequest(void)
{
/* Indicate that all in-progress/pending data OUT requests should be aborted */
IsTMCBulkOUTReset = true;
{
/* Indicate that all in-progress/pending data OUT requests should be aborted */
IsTMCBulkOUTReset = true;
-
+
/* Save the split request for later checking when a new request is received */
RequestInProgress = Req_InitiateAbortBulkOut;
}
Endpoint_ClearSETUP();
/* Save the split request for later checking when a new request is received */
RequestInProgress = Req_InitiateAbortBulkOut;
}
Endpoint_ClearSETUP();
-
+
/* Write the request response byte */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
/* Write the request response byte */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
-
+
break;
case Req_CheckAbortBulkOutStatus:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
{
/* Check that an ABORT BULK OUT transaction has been requested and that the request has completed */
if (RequestInProgress != Req_InitiateAbortBulkOut)
break;
case Req_CheckAbortBulkOutStatus:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
{
/* Check that an ABORT BULK OUT transaction has been requested and that the request has completed */
if (RequestInProgress != Req_InitiateAbortBulkOut)
- TMCRequestStatus = TMC_STATUS_SPLIT_NOT_IN_PROGRESS;
+ TMCRequestStatus = TMC_STATUS_SPLIT_NOT_IN_PROGRESS;
else if (IsTMCBulkOUTReset)
TMCRequestStatus = TMC_STATUS_PENDING;
else
else if (IsTMCBulkOUTReset)
TMCRequestStatus = TMC_STATUS_PENDING;
else
- RequestInProgress = 0;
+ RequestInProgress = 0;
Endpoint_ClearSETUP();
Endpoint_ClearSETUP();
-
+
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_16_LE(0);
Endpoint_Write_32_LE(LastTransferLength);
Endpoint_ClearIN();
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_16_LE(0);
Endpoint_Write_32_LE(LastTransferLength);
Endpoint_ClearIN();
- Endpoint_ClearStatusStage();
+ Endpoint_ClearStatusStage();
}
}
-
+
break;
case Req_InitiateAbortBulkIn:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
break;
case Req_InitiateAbortBulkIn:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
@@
-211,7
+211,7
@@
void EVENT_USB_Device_ControlRequest(void)
/* Check that no split transaction is already in progress and the data transfer tag is valid */
if (RequestInProgress != 0)
{
/* Check that no split transaction is already in progress and the data transfer tag is valid */
if (RequestInProgress != 0)
{
- TMCRequestStatus = TMC_STATUS_SPLIT_IN_PROGRESS;
+ TMCRequestStatus = TMC_STATUS_SPLIT_IN_PROGRESS;
}
else if (USB_ControlRequest.wValue != CurrentTransferTag)
{
}
else if (USB_ControlRequest.wValue != CurrentTransferTag)
{
@@
-221,13
+221,13
@@
void EVENT_USB_Device_ControlRequest(void)
{
/* Indicate that all in-progress/pending data IN requests should be aborted */
IsTMCBulkINReset = true;
{
/* Indicate that all in-progress/pending data IN requests should be aborted */
IsTMCBulkINReset = true;
-
+
/* Save the split request for later checking when a new request is received */
RequestInProgress = Req_InitiateAbortBulkIn;
}
Endpoint_ClearSETUP();
/* Save the split request for later checking when a new request is received */
RequestInProgress = Req_InitiateAbortBulkIn;
}
Endpoint_ClearSETUP();
-
+
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_8(CurrentTransferTag);
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_8(CurrentTransferTag);
@@
-235,7
+235,7
@@
void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
-
+
break;
case Req_CheckAbortBulkInStatus:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
break;
case Req_CheckAbortBulkInStatus:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
@@
-249,7
+249,7
@@
void EVENT_USB_Device_ControlRequest(void)
RequestInProgress = 0;
Endpoint_ClearSETUP();
RequestInProgress = 0;
Endpoint_ClearSETUP();
-
+
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_16_LE(0);
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_16_LE(0);
@@
-258,7
+258,7
@@
void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
-
+
break;
case Req_InitiateClear:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
break;
case Req_InitiateClear:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
@@
-266,34
+266,34
@@
void EVENT_USB_Device_ControlRequest(void)
/* Check that no split transaction is already in progress */
if (RequestInProgress != 0)
{
/* Check that no split transaction is already in progress */
if (RequestInProgress != 0)
{
- Endpoint_Write_8(TMC_STATUS_SPLIT_IN_PROGRESS);
+ Endpoint_Write_8(TMC_STATUS_SPLIT_IN_PROGRESS);
}
else
{
/* Indicate that all in-progress/pending data IN and OUT requests should be aborted */
IsTMCBulkINReset = true;
IsTMCBulkOUTReset = true;
}
else
{
/* Indicate that all in-progress/pending data IN and OUT requests should be aborted */
IsTMCBulkINReset = true;
IsTMCBulkOUTReset = true;
-
+
/* Save the split request for later checking when a new request is received */
RequestInProgress = Req_InitiateClear;
}
Endpoint_ClearSETUP();
/* Save the split request for later checking when a new request is received */
RequestInProgress = Req_InitiateClear;
}
Endpoint_ClearSETUP();
-
+
/* Write the request response byte */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
/* Write the request response byte */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_ClearIN();
Endpoint_ClearStatusStage();
}
-
+
break;
case Req_CheckClearStatus:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{
/* Check that a CLEAR transaction has been requested and that the request has completed */
if (RequestInProgress != Req_InitiateClear)
break;
case Req_CheckClearStatus:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{
/* Check that a CLEAR transaction has been requested and that the request has completed */
if (RequestInProgress != Req_InitiateClear)
- TMCRequestStatus = TMC_STATUS_SPLIT_NOT_IN_PROGRESS;
+ TMCRequestStatus = TMC_STATUS_SPLIT_NOT_IN_PROGRESS;
else if (IsTMCBulkINReset || IsTMCBulkOUTReset)
TMCRequestStatus = TMC_STATUS_PENDING;
else
else if (IsTMCBulkINReset || IsTMCBulkOUTReset)
TMCRequestStatus = TMC_STATUS_PENDING;
else
@@
-304,22
+304,22
@@
void EVENT_USB_Device_ControlRequest(void)
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_8(0);
/* Write the request response bytes */
Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_8(0);
-
+
Endpoint_ClearIN();
Endpoint_ClearIN();
- Endpoint_ClearStatusStage();
+ Endpoint_ClearStatusStage();
}
}
-
+
break;
case Req_GetCapabilities:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{
Endpoint_ClearSETUP();
break;
case Req_GetCapabilities:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{
Endpoint_ClearSETUP();
-
+
/* Write the device capabilities to the control endpoint */
/* Write the device capabilities to the control endpoint */
- Endpoint_Write_Control_Stream_LE(&Capabilities, sizeof(TMC_Capabilities_t));
+ Endpoint_Write_Control_Stream_LE(&Capabilities, sizeof(TMC_Capabilities_t));
Endpoint_ClearOUT();
}
Endpoint_ClearOUT();
}
-
+
break;
}
}
break;
}
}
@@
-351,16
+351,16
@@
void TMC_Task(void)
/* Device must be connected and configured for the task to run */
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
/* Device must be connected and configured for the task to run */
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
-
+
TMC_MessageHeader_t MessageHeader;
uint8_t MessagePayload[128];
TMC_MessageHeader_t MessageHeader;
uint8_t MessagePayload[128];
-
+
/* Try to read in a TMC message from the interface, process if one is available */
if (ReadTMCHeader(&MessageHeader))
{
/* Indicate busy */
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Try to read in a TMC message from the interface, process if one is available */
if (ReadTMCHeader(&MessageHeader))
{
/* Indicate busy */
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
-
+
switch (MessageHeader.MessageID)
{
case TMC_MESSAGEID_DEV_DEP_MSG_OUT:
switch (MessageHeader.MessageID)
{
case TMC_MESSAGEID_DEV_DEP_MSG_OUT:
@@
-371,15
+371,15
@@
void TMC_Task(void)
if (IsTMCBulkOUTReset)
break;
}
if (IsTMCBulkOUTReset)
break;
}
-
+
Endpoint_ClearOUT();
Endpoint_ClearOUT();
- ProcessSentMessage(MessagePayload, LastTransferLength);
+ ProcessSentMessage(MessagePayload, LastTransferLength);
break;
case TMC_MESSAGEID_DEV_DEP_MSG_IN:
Endpoint_ClearOUT();
break;
case TMC_MESSAGEID_DEV_DEP_MSG_IN:
Endpoint_ClearOUT();
-
- MessageHeader.TransferSize = GetNextMessage(MessagePayload);
+
+ MessageHeader.TransferSize = GetNextMessage(MessagePayload);
MessageHeader.MessageIDSpecific.DeviceOUT.LastMessageTransaction = true;
WriteTMCHeader(&MessageHeader);
MessageHeader.MessageIDSpecific.DeviceOUT.LastMessageTransaction = true;
WriteTMCHeader(&MessageHeader);
@@
-400,7
+400,7
@@
void TMC_Task(void)
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
-
+
/* All pending data has been processed - reset the data abort flags */
IsTMCBulkINReset = false;
IsTMCBulkOUTReset = false;
/* All pending data has been processed - reset the data abort flags */
IsTMCBulkINReset = false;
IsTMCBulkOUTReset = false;
@@
-419,11
+419,11
@@
bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
/* Select the Data Out endpoint */
Endpoint_SelectEndpoint(TMC_OUT_EPNUM);
/* Select the Data Out endpoint */
Endpoint_SelectEndpoint(TMC_OUT_EPNUM);
-
+
/* Abort if no command has been sent from the host */
if (!(Endpoint_IsOUTReceived()))
return false;
/* Abort if no command has been sent from the host */
if (!(Endpoint_IsOUTReceived()))
return false;
-
+
/* Read in the header of the command from the host */
BytesTransferred = 0;
while ((ErrorCode = Endpoint_Read_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), &BytesTransferred)) ==
/* Read in the header of the command from the host */
BytesTransferred = 0;
while ((ErrorCode = Endpoint_Read_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), &BytesTransferred)) ==
@@
-435,7
+435,7
@@
bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
/* Store the new command tag value for later use */
CurrentTransferTag = MessageHeader->Tag;
/* Store the new command tag value for later use */
CurrentTransferTag = MessageHeader->Tag;
-
+
/* Indicate if the command has been aborted or not */
return (!(IsTMCBulkOUTReset) && (ErrorCode == ENDPOINT_RWSTREAM_NoError));
}
/* Indicate if the command has been aborted or not */
return (!(IsTMCBulkOUTReset) && (ErrorCode == ENDPOINT_RWSTREAM_NoError));
}
@@
-464,3
+464,4
@@
bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
/* Indicate if the command has been aborted or not */
return (!(IsTMCBulkINReset) && (ErrorCode == ENDPOINT_RWSTREAM_NoError));
}
/* Indicate if the command has been aborted or not */
return (!(IsTMCBulkINReset) && (ErrorCode == ENDPOINT_RWSTREAM_NoError));
}
+
diff --git
a/Demos/Device/LowLevel/AudioInput/AudioInput.c
b/Demos/Device/LowLevel/AudioInput/AudioInput.c
index
52fbb8b
..
ff165b2
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/AudioInput.c
+++ b/
Demos/Device/LowLevel/AudioInput/AudioInput.c
@@
-163,16
+163,16
@@
void EVENT_USB_Device_ControlRequest(void)
/* Extract out the relevant request information to get the target Endpoint address and control being set */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Extract out the relevant request information to get the target Endpoint address and control being set */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
-
+
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
-
+
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(SampleRate, sizeof(SampleRate));
Endpoint_ClearIN();
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(SampleRate, sizeof(SampleRate));
Endpoint_ClearIN();
-
+
/* Set the new sampling frequency to the value given by the host */
CurrentAudioSampleFrequency = (((uint32_t)SampleRate[2] << 16) | ((uint32_t)SampleRate[1] << 8) | (uint32_t)SampleRate[0]);
/* Set the new sampling frequency to the value given by the host */
CurrentAudioSampleFrequency = (((uint32_t)SampleRate[2] << 16) | ((uint32_t)SampleRate[1] << 8) | (uint32_t)SampleRate[0]);
@@
-180,7
+180,7
@@
void EVENT_USB_Device_ControlRequest(void)
OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
}
}
OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
}
}
-
+
break;
case AUDIO_REQ_GetCurrent:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
break;
case AUDIO_REQ_GetCurrent:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
@@
-188,20
+188,20
@@
void EVENT_USB_Device_ControlRequest(void)
/* Extract out the relevant request information to get the target Endpoint address and control being retrieved */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Extract out the relevant request information to get the target Endpoint address and control being retrieved */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
-
+
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
-
+
/* Convert the sampling rate value into the 24-bit format the host expects for the property */
SampleRate[2] = (CurrentAudioSampleFrequency >> 16);
SampleRate[1] = (CurrentAudioSampleFrequency >> 8);
SampleRate[0] = (CurrentAudioSampleFrequency & 0xFF);
/* Convert the sampling rate value into the 24-bit format the host expects for the property */
SampleRate[2] = (CurrentAudioSampleFrequency >> 16);
SampleRate[1] = (CurrentAudioSampleFrequency >> 8);
SampleRate[0] = (CurrentAudioSampleFrequency & 0xFF);
-
+
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(SampleRate, sizeof(SampleRate));
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(SampleRate, sizeof(SampleRate));
- Endpoint_ClearOUT();
+ Endpoint_ClearOUT();
}
}
}
}
@@
-225,11
+225,11
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
-
+
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
-
+
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
@@
-239,7
+239,7
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
AudioSample -= (SAMPLE_MAX_RANGE / 2);
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
AudioSample -= (SAMPLE_MAX_RANGE / 2);
- #endif
+ #endif
#endif
/* Write the sample to the buffer */
#endif
/* Write the sample to the buffer */
diff --git
a/Demos/Device/LowLevel/AudioInput/Descriptors.c
b/Demos/Device/LowLevel/AudioInput/Descriptors.c
index
ee9feb3
..
b41e604
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/Descriptors.c
+++ b/
Demos/Device/LowLevel/AudioInput/Descriptors.c
@@
-204,7
+204,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)),
},
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)),
},
-
+
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
diff --git
a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
index
47f3ccb
..
f079dca
100644
(file)
--- a/
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
+++ b/
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
@@
-189,16
+189,16
@@
void EVENT_USB_Device_ControlRequest(void)
/* Extract out the relevant request information to get the target Endpoint address and control being set */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Extract out the relevant request information to get the target Endpoint address and control being set */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
-
+
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
-
+
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(SampleRate, sizeof(SampleRate));
Endpoint_ClearOUT();
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(SampleRate, sizeof(SampleRate));
Endpoint_ClearOUT();
-
+
/* Set the new sampling frequency to the value given by the host */
CurrentAudioSampleFrequency = (((uint32_t)SampleRate[2] << 16) | ((uint32_t)SampleRate[1] << 8) | (uint32_t)SampleRate[0]);
/* Set the new sampling frequency to the value given by the host */
CurrentAudioSampleFrequency = (((uint32_t)SampleRate[2] << 16) | ((uint32_t)SampleRate[1] << 8) | (uint32_t)SampleRate[0]);
@@
-206,7
+206,7
@@
void EVENT_USB_Device_ControlRequest(void)
OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
}
}
OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1);
}
}
-
+
break;
case AUDIO_REQ_GetCurrent:
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT))
break;
case AUDIO_REQ_GetCurrent:
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT))
@@
-214,20
+214,20
@@
void EVENT_USB_Device_ControlRequest(void)
/* Extract out the relevant request information to get the target Endpoint address and control being retrieved */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Extract out the relevant request information to get the target Endpoint address and control being retrieved */
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
-
+
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
-
+
/* Convert the sampling rate value into the 24-bit format the host expects for the property */
SampleRate[2] = (CurrentAudioSampleFrequency >> 16);
SampleRate[1] = (CurrentAudioSampleFrequency >> 8);
SampleRate[0] = (CurrentAudioSampleFrequency & 0xFF);
/* Convert the sampling rate value into the 24-bit format the host expects for the property */
SampleRate[2] = (CurrentAudioSampleFrequency >> 16);
SampleRate[1] = (CurrentAudioSampleFrequency >> 8);
SampleRate[0] = (CurrentAudioSampleFrequency & 0xFF);
-
+
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(SampleRate, sizeof(SampleRate));
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(SampleRate, sizeof(SampleRate));
- Endpoint_ClearOUT();
+ Endpoint_ClearOUT();
}
}
}
}
@@
-286,7
+286,7
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
LEDs_SetAllLEDs(LEDMask);
}
LEDs_SetAllLEDs(LEDMask);
}
-
+
Endpoint_SelectEndpoint(PrevEndpoint);
}
Endpoint_SelectEndpoint(PrevEndpoint);
}
diff --git
a/Demos/Device/LowLevel/AudioOutput/Descriptors.c
b/Demos/Device/LowLevel/AudioOutput/Descriptors.c
index
0fa396d
..
771ec17
100644
(file)
--- a/
Demos/Device/LowLevel/AudioOutput/Descriptors.c
+++ b/
Demos/Device/LowLevel/AudioOutput/Descriptors.c
@@
-204,7
+204,7
@@
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)),
},
.TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)),
},
-
+
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
.Audio_AudioFormatSampleRates =
{
AUDIO_SAMPLE_FREQ(8000),
diff --git
a/Demos/Device/LowLevel/AudioOutput/Descriptors.h
b/Demos/Device/LowLevel/AudioOutput/Descriptors.h
index
da95077
..
aa551b0
100644
(file)
--- a/
Demos/Device/LowLevel/AudioOutput/Descriptors.h
+++ b/
Demos/Device/LowLevel/AudioOutput/Descriptors.h
@@
-83,3
+83,4
@@
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
+
diff --git
a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
index
a007baa
..
2fe3b89
100644
(file)
--- a/
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
+++ b/
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
@@
-109,3
+109,4
@@
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
+
diff --git
a/Demos/Device/LowLevel/GenericHID/GenericHID.c
b/Demos/Device/LowLevel/GenericHID/GenericHID.c
index
69c4176
..
a3d2e69
100644
(file)
--- a/
Demos/Device/LowLevel/GenericHID/GenericHID.c
+++ b/
Demos/Device/LowLevel/GenericHID/GenericHID.c
@@
-157,7
+157,7
@@
void ProcessGenericHIDReport(uint8_t* DataArray)
holding the report sent from the host.
*/
holding the report sent from the host.
*/
- uint8_t NewLEDMask = LEDS_NO_LEDS;
+ uint8_t NewLEDMask = LEDS_NO_LEDS;
if (DataArray[0])
NewLEDMask |= LEDS_LED1;
if (DataArray[0])
NewLEDMask |= LEDS_LED1;
@@
-170,7
+170,7
@@
void ProcessGenericHIDReport(uint8_t* DataArray)
if (DataArray[3])
NewLEDMask |= LEDS_LED1;
if (DataArray[3])
NewLEDMask |= LEDS_LED1;
-
+
LEDs_SetAllLEDs(NewLEDMask);
}
LEDs_SetAllLEDs(NewLEDMask);
}
@@
-187,7
+187,7
@@
void CreateGenericHIDReport(uint8_t* DataArray)
*/
uint8_t CurrLEDMask = LEDs_GetLEDs();
*/
uint8_t CurrLEDMask = LEDs_GetLEDs();
-
+
DataArray[0] = ((CurrLEDMask & LEDS_LED1) ? 1 : 0);
DataArray[1] = ((CurrLEDMask & LEDS_LED2) ? 1 : 0);
DataArray[2] = ((CurrLEDMask & LEDS_LED3) ? 1 : 0);
DataArray[0] = ((CurrLEDMask & LEDS_LED1) ? 1 : 0);
DataArray[1] = ((CurrLEDMask & LEDS_LED2) ? 1 : 0);
DataArray[2] = ((CurrLEDMask & LEDS_LED3) ? 1 : 0);
diff --git
a/Demos/Device/LowLevel/MassStorage/Descriptors.h
b/Demos/Device/LowLevel/MassStorage/Descriptors.h
index
043d659
..
b65938e
100644
(file)
--- a/
Demos/Device/LowLevel/MassStorage/Descriptors.h
+++ b/
Demos/Device/LowLevel/MassStorage/Descriptors.h
@@
-59,7
+59,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
diff --git
a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
index
4326786
..
0fd62c0
100644
(file)
--- a/
Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
+++ b/
Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
@@
-287,12
+287,12
@@
static bool SCSI_Command_ReadWrite_10(const bool IsDataRead)
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
BlockAddress = SwapEndian_32(*(uint32_t*)&CommandBlock.SCSICommandData[2]);
TotalBlocks = SwapEndian_16(*(uint16_t*)&CommandBlock.SCSICommandData[7]);
}
BlockAddress = SwapEndian_32(*(uint32_t*)&CommandBlock.SCSICommandData[2]);
TotalBlocks = SwapEndian_16(*(uint16_t*)&CommandBlock.SCSICommandData[7]);
-
+
/* Check if the block address is outside the maximum allowable value for the LUN */
if (BlockAddress >= LUN_MEDIA_BLOCKS)
{
/* Check if the block address is outside the maximum allowable value for the LUN */
if (BlockAddress >= LUN_MEDIA_BLOCKS)
{
@@
-340,3
+340,4
@@
static bool SCSI_Command_ModeSense_6(void)
return true;
}
return true;
}
+
diff --git
a/Demos/Device/LowLevel/MassStorage/MassStorage.c
b/Demos/Device/LowLevel/MassStorage/MassStorage.c
index
7f2d866
..
abac8b7
100644
(file)
--- a/
Demos/Device/LowLevel/MassStorage/MassStorage.c
+++ b/
Demos/Device/LowLevel/MassStorage/MassStorage.c
@@
-309,7
+309,8
@@
static void ReturnCommandStatus(void)
if (IsMassStoreReset)
return;
}
if (IsMassStoreReset)
return;
}
-
+
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN();
}
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN();
}
+
diff --git
a/Demos/Device/LowLevel/Mouse/Descriptors.h
b/Demos/Device/LowLevel/Mouse/Descriptors.h
index
f88f530
..
60fd740
100644
(file)
--- a/
Demos/Device/LowLevel/Mouse/Descriptors.h
+++ b/
Demos/Device/LowLevel/Mouse/Descriptors.h
@@
-49,7
+49,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
diff --git
a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
index
9ad26dd
..
d0df973
100644
(file)
--- a/
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
+++ b/
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
@@
-73,9
+73,9
@@
void SetupHardware(void)
LEDs_Init();
Serial_Init(9600, false);
USB_Init();
LEDs_Init();
Serial_Init(9600, false);
USB_Init();
-
+
/* Create a stdio stream for the serial port for stdin and stdout */
/* Create a stdio stream for the serial port for stdin and stdout */
- Serial_CreateStream(NULL);
+ Serial_CreateStream(NULL);
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
diff --git
a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
index
f88f530
..
60fd740
100644
(file)
--- a/
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
+++ b/
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
@@
-49,7
+49,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
diff --git
a/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
b/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
index
246ff35
..
73e163e
100644
(file)
--- a/
Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
+++ b/
Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
@@
-74,7
+74,7
@@
void EVENT_USB_Host_DeviceUnattached(void)
* enumerated by the host and is now ready to be used by the application.
*/
void EVENT_USB_Host_DeviceEnumerationComplete(void)
* enumerated by the host and is now ready to be used by the application.
*/
void EVENT_USB_Host_DeviceEnumerationComplete(void)
-{
+{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
uint16_t ConfigDescriptorSize;
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
uint16_t ConfigDescriptorSize;
diff --git
a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
index
2c9cd80
..
85819ae
100644
(file)
--- a/
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
+++ b/
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
@@
-225,3
+225,4
@@
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
+
diff --git
a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
index
a36010e
..
693f925
100644
(file)
--- a/
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
+++ b/
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
@@
-76,3
+76,4
@@
\r
#endif
\r
\r
\r
#endif
\r
\r
+
diff --git
a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
index
f789f63
..
a8a51b8
100644
(file)
--- a/
Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
+++ b/
Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
@@
-96,7
+96,7
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
LEDs_SetAllLEDs(LEDMask);
}
LEDs_SetAllLEDs(LEDMask);
}
-
+
Pipe_SelectPipe(PrevPipe);
}
Pipe_SelectPipe(PrevPipe);
}
@@
-193,7
+193,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
TIMSK0 = (1 << OCIE0A);
OCR0A = ((F_CPU / 8 / 48000) - 1);
TCCR0A = (1 << WGM01); // CTC mode
TIMSK0 = (1 << OCIE0A);
OCR0A = ((F_CPU / 8 / 48000) - 1);
TCCR0A = (1 << WGM01); // CTC mode
- TCCR0B = (1 << CS01); // Fcpu/8 speed
+ TCCR0B = (1 << CS01); // Fcpu/8 speed
/* Set speaker as output */
DDRC |= (1 << 6);
/* Set speaker as output */
DDRC |= (1 << 6);
diff --git
a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
index
c8dc3a3
..
9696673
100644
(file)
--- a/
Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
+++ b/
Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
@@
-81,11
+81,11
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
-
+
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
-
+
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
@@
-97,11
+97,11
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
AudioSample -= (SAMPLE_MAX_RANGE / 2);
#endif
#endif
AudioSample -= (SAMPLE_MAX_RANGE / 2);
#endif
#endif
-
- Audio_Host_WriteSample16(&Speaker_Audio_Interface, AudioSample);
+
+ Audio_Host_WriteSample16(&Speaker_Audio_Interface, AudioSample);
Audio_Host_WriteSample16(&Speaker_Audio_Interface, AudioSample);
}
Audio_Host_WriteSample16(&Speaker_Audio_Interface, AudioSample);
}
-
+
Pipe_SelectPipe(PrevPipe);
}
Pipe_SelectPipe(PrevPipe);
}
@@
-185,7
+185,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
USB_Host_SetDeviceConfiguration(0);
return;
}
USB_Host_SetDeviceConfiguration(0);
return;
}
-
+
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
if (Audio_Host_GetSetEndpointProperty(&Speaker_Audio_Interface, Speaker_Audio_Interface.Config.DataOUTPipeNumber,
AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
if (Audio_Host_GetSetEndpointProperty(&Speaker_Audio_Interface, Speaker_Audio_Interface.Config.DataOUTPipeNumber,
AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,
diff --git
a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
index
81c877a
..
f2050e8
100644
(file)
--- a/
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
+++ b/
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
@@
-140,7
+140,7
@@
void KeyboardHost_Task(void)
{
PressedKey = '\n';
}
{
PressedKey = '\n';
}
-
+
if (PressedKey)
putchar(PressedKey);
}
if (PressedKey)
putchar(PressedKey);
}
diff --git
a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
index
3bf5dd2
..
9c2ec07
100644
(file)
--- a/
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
@@
-107,7
+107,7
@@
void KeyboardHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
return;
{
if (USB_HostState != HOST_STATE_Configured)
return;
-
+
if (HID_Host_IsReportReceived(&Keyboard_HID_Interface))
{
uint8_t KeyboardReport[Keyboard_HID_Interface.State.LargestReportSize];
if (HID_Host_IsReportReceived(&Keyboard_HID_Interface))
{
uint8_t KeyboardReport[Keyboard_HID_Interface.State.LargestReportSize];
diff --git
a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
index
5fc3fdf
..
2c21644
100644
(file)
--- a/
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
+++ b/
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
@@
-68,7
+68,7
@@
int main(void)
for (;;)
{
MassStorageHost_Task();
for (;;)
{
MassStorageHost_Task();
-
+
MS_Host_USBTask(&FlashDisk_MS_Interface);
USB_USBTask();
}
MS_Host_USBTask(&FlashDisk_MS_Interface);
USB_USBTask();
}
diff --git
a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
index
b4aa02a
..
b254edc
100644
(file)
--- a/
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
+++ b/
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
@@
-70,7
+70,7
@@
/* Function Prototypes: */
void SetupHardware(void);
void MassStorageHost_Task(void);
/* Function Prototypes: */
void SetupHardware(void);
void MassStorageHost_Task(void);
-
+
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
void EVENT_USB_Host_DeviceAttached(void);
void EVENT_USB_Host_DeviceUnattached(void);
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
void EVENT_USB_Host_DeviceAttached(void);
void EVENT_USB_Host_DeviceUnattached(void);
diff --git
a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index
ebdc4e2
..
6785af7
100644
(file)
--- a/
Demos/Host/ClassDriver/MouseHost/MouseHost.c
+++ b/
Demos/Host/ClassDriver/MouseHost/MouseHost.c
@@
-102,7
+102,7
@@
void MouseHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
return;
{
if (USB_HostState != HOST_STATE_Configured)
return;
-
+
if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
{
uint8_t LEDMask = LEDS_NO_LEDS;
if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
{
uint8_t LEDMask = LEDS_NO_LEDS;
diff --git
a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
index
d8a6b74
..
46105f3
100644
(file)
--- a/
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
+++ b/
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
@@
-107,7
+107,7
@@
void MouseHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
return;
{
if (USB_HostState != HOST_STATE_Configured)
return;
-
+
if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
{
uint8_t MouseReport[Mouse_HID_Interface.State.LargestReportSize];
if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
{
uint8_t MouseReport[Mouse_HID_Interface.State.LargestReportSize];
diff --git
a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
index
6dd7344
..
dea4694
100644
(file)
--- a/
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
+++ b/
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
@@
-71,7
+71,7
@@
int main(void)
for (;;)
{
StillImageHost_Task();
for (;;)
{
StillImageHost_Task();
-
+
SI_Host_USBTask(&DigitalCamera_SI_Interface);
USB_USBTask();
}
SI_Host_USBTask(&DigitalCamera_SI_Interface);
USB_USBTask();
}
diff --git
a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
index
72d7e58
..
2ceb950
100644
(file)
--- a/
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
+++ b/
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
@@
-62,7
+62,7
@@
USB_ClassInfo_CDC_Host_t VirtualSerial_CDC_Interface =
int main(void)
{
SetupHardware();
int main(void)
{
SetupHardware();
-
+
puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
diff --git
a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
index
7b2b796
..
4ed0133
100644
(file)
--- a/
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
+++ b/
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
@@
-78,7
+78,7
@@
void SetupHardware(void)
void AndroidHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
void AndroidHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
- return;
+ return;
/* Select the data IN pipe */
Pipe_SelectPipe(ANDROID_DATA_IN_PIPE);
/* Select the data IN pipe */
Pipe_SelectPipe(ANDROID_DATA_IN_PIPE);
@@
-148,7
+148,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
/* Get and process the configuration descriptor data */
uint8_t ErrorCode = ProcessDeviceDescriptor();
/* Get and process the configuration descriptor data */
uint8_t ErrorCode = ProcessDeviceDescriptor();
-
+
bool RequiresModeSwitch = (ErrorCode == NonAccessoryModeAndroidDevice);
/* Error out if the device is not an Android device or an error occurred */
bool RequiresModeSwitch = (ErrorCode == NonAccessoryModeAndroidDevice);
/* Error out if the device is not an Android device or an error occurred */
@@
-166,12
+166,12
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
}
printf_P(PSTR("Android Device Detected - %sAccessory mode.\r\n"), (RequiresModeSwitch ? "Non-" : ""));
}
printf_P(PSTR("Android Device Detected - %sAccessory mode.\r\n"), (RequiresModeSwitch ? "Non-" : ""));
-
+
/* Check if a valid Android device was attached, but it is not current in Accessory mode */
if (RequiresModeSwitch)
{
uint16_t AndroidProtocol;
/* Check if a valid Android device was attached, but it is not current in Accessory mode */
if (RequiresModeSwitch)
{
uint16_t AndroidProtocol;
-
+
/* Fetch the version of the Android Accessory Protocol supported by the device */
if ((ErrorCode = Android_GetAccessoryProtocol(&AndroidProtocol)) != HOST_SENDCONTROL_Successful)
{
/* Fetch the version of the Android Accessory Protocol supported by the device */
if ((ErrorCode = Android_GetAccessoryProtocol(&AndroidProtocol)) != HOST_SENDCONTROL_Successful)
{
@@
-181,7
+181,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
-
+
/* Validate the returned protocol version */
if (AndroidProtocol != AOA_PROTOCOL_AccessoryV1)
{
/* Validate the returned protocol version */
if (AndroidProtocol != AOA_PROTOCOL_AccessoryV1)
{
@@
-190,7
+190,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
-
+
/* Send the device strings and start the Android Accessory Mode */
Android_SendString(AOA_STRING_Manufacturer, "Dean Camera");
Android_SendString(AOA_STRING_Model, "LUFA Android Demo");
/* Send the device strings and start the Android Accessory Mode */
Android_SendString(AOA_STRING_Manufacturer, "Dean Camera");
Android_SendString(AOA_STRING_Model, "LUFA Android Demo");
@@
-199,7
+199,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
Android_SendString(AOA_STRING_URI, "http://www.lufa-lib.org");
Android_SendString(AOA_STRING_Serial, "0000000012345678");
Android_SendString(AOA_STRING_URI, "http://www.lufa-lib.org");
Android_SendString(AOA_STRING_Serial, "0000000012345678");
- Android_StartAccessoryMode();
+ Android_StartAccessoryMode();
return;
}
return;
}
diff --git
a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
index
6c8702f
..
714e2da
100644
(file)
--- a/
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
+++ b/
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
@@
-46,7
+46,7
@@
#include "DeviceDescriptor.h"
#include "ConfigDescriptor.h"
#include "DeviceDescriptor.h"
#include "ConfigDescriptor.h"
- #include "Lib/AndroidAccessoryCommands.h"
+ #include "Lib/AndroidAccessoryCommands.h"
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
diff --git
a/Demos/Host/LowLevel/AndroidAccessoryHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/AndroidAccessoryHost/ConfigDescriptor.c
index
973ac53
..
487d518
100644
(file)
--- a/
Demos/Host/LowLevel/AndroidAccessoryHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/AndroidAccessoryHost/ConfigDescriptor.c
@@
-66,7
+66,7
@@
uint8_t ProcessConfigurationDescriptor(void)
default:
return DevControlError;
}
default:
return DevControlError;
}
-
+
/* There should be only one compatible Android Accessory Mode interface in the device, attempt to find it */
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
DCOMP_NextAndroidAccessoryInterface) != DESCRIPTOR_SEARCH_COMP_Found)
/* There should be only one compatible Android Accessory Mode interface in the device, attempt to find it */
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
DCOMP_NextAndroidAccessoryInterface) != DESCRIPTOR_SEARCH_COMP_Found)
diff --git
a/Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.c
b/Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.c
index
42c3a62
..
7e1e7c8
100644
(file)
--- a/
Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.c
+++ b/
Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.c
@@
-33,8
+33,8
@@
* Android Accessory Mode utility functions, for the configuration of an attached
* Android device into Android Accessory Mode ready for general communication.
*/
* Android Accessory Mode utility functions, for the configuration of an attached
* Android device into Android Accessory Mode ready for general communication.
*/
-
-#include "AndroidAccessoryCommands.h"
+
+#include "AndroidAccessoryCommands.h"
uint8_t Android_GetAccessoryProtocol(uint16_t* const Protocol)
{
uint8_t Android_GetAccessoryProtocol(uint16_t* const Protocol)
{
@@
-79,5
+79,6
@@
uint8_t Android_StartAccessoryMode(void)
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
- return USB_Host_SendControlRequest(NULL);
+ return USB_Host_SendControlRequest(NULL);
}
}
+
diff --git
a/Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.h
b/Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.h
index
0fab763
..
00326ab
100644
(file)
--- a/
Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.h
+++ b/
Demos/Host/LowLevel/AndroidAccessoryHost/Lib/AndroidAccessoryCommands.h
@@
-41,11
+41,12
@@
#include <stdbool.h>
#include <LUFA/Drivers/USB/USB.h>
#include <stdbool.h>
#include <LUFA/Drivers/USB/USB.h>
-
+
/* Function Prototypes: */
uint8_t Android_GetAccessoryProtocol(uint16_t* const Protocol);
uint8_t Android_SendString(const uint8_t StringIndex,
const char* const String);
/* Function Prototypes: */
uint8_t Android_GetAccessoryProtocol(uint16_t* const Protocol);
uint8_t Android_SendString(const uint8_t StringIndex,
const char* const String);
- uint8_t Android_StartAccessoryMode(void);
-
+ uint8_t Android_StartAccessoryMode(void);
+
#endif
#endif
+
diff --git
a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
index
97a18a0
..
1bdbd28
100644
(file)
--- a/
Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
+++ b/
Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
@@
-123,7
+123,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
-
+
if ((ErrorCode = USB_Host_SetInterfaceAltSetting(StreamingInterfaceIndex,
StreamingInterfaceAltSetting)) != HOST_SENDCONTROL_Successful)
{
if ((ErrorCode = USB_Host_SetInterfaceAltSetting(StreamingInterfaceIndex,
StreamingInterfaceAltSetting)) != HOST_SENDCONTROL_Successful)
{
@@
-143,7
+143,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
.wIndex = StreamingEndpointAddress,
.wLength = sizeof(USB_Audio_SampleFreq_t),
};
.wIndex = StreamingEndpointAddress,
.wLength = sizeof(USB_Audio_SampleFreq_t),
};
-
+
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
/* Select the control pipe for the request transfer */
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
/* Select the control pipe for the request transfer */
@@
-153,7
+153,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
if ((ErrorCode = USB_Host_SendControlRequest(&SampleRate)) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
if ((ErrorCode = USB_Host_SendControlRequest(&SampleRate)) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
- USB_Host_SetDeviceConfiguration(0);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
@@
-161,7
+161,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
TIMSK0 = (1 << OCIE0A);
OCR0A = ((F_CPU / 8 / 48000) - 1);
TCCR0A = (1 << WGM01); // CTC mode
TIMSK0 = (1 << OCIE0A);
OCR0A = ((F_CPU / 8 / 48000) - 1);
TCCR0A = (1 << WGM01); // CTC mode
- TCCR0B = (1 << CS01); // Fcpu/8 speed
+ TCCR0B = (1 << CS01); // Fcpu/8 speed
/* Set speaker as output */
DDRC |= (1 << 6);
/* Set speaker as output */
DDRC |= (1 << 6);
@@
-169,7
+169,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
/* PWM speaker timer initialization */
TCCR3A = ((1 << WGM30) | (1 << COM3A1) | (1 << COM3A0)); // Set on match, clear on TOP
TCCR3B = ((1 << WGM32) | (1 << CS30)); // Fast 8-Bit PWM, F_CPU speed
/* PWM speaker timer initialization */
TCCR3A = ((1 << WGM30) | (1 << COM3A1) | (1 << COM3A0)); // Set on match, clear on TOP
TCCR3B = ((1 << WGM32) | (1 << CS30)); // Fast 8-Bit PWM, F_CPU speed
-
+
puts_P(PSTR("Microphone Enumerated.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
puts_P(PSTR("Microphone Enumerated.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
@@
-238,7
+238,8
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
LEDs_SetAllLEDs(LEDMask);
}
LEDs_SetAllLEDs(LEDMask);
}
-
+
Pipe_Freeze();
Pipe_SelectPipe(PrevPipe);
}
Pipe_Freeze();
Pipe_SelectPipe(PrevPipe);
}
+
diff --git
a/Demos/Host/LowLevel/AudioInputHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/AudioInputHost/ConfigDescriptor.c
index
943fa02
..
89069a8
100644
(file)
--- a/
Demos/Host/LowLevel/AudioInputHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/AudioInputHost/ConfigDescriptor.c
@@
-99,7
+99,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
/* Save the interface in case we need to refer back to it later */
}
/* Save the interface in case we need to refer back to it later */
- AudioControlInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
+ AudioControlInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
/* Find the next Audio Streaming interface within that Audio Control interface */
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
/* Find the next Audio Streaming interface within that Audio Control interface */
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
@@
-218,3
+218,4
@@
uint8_t DComp_NextAudioInterfaceDataEndpoint(void* CurrentDescriptor)
return DESCRIPTOR_SEARCH_NotFound;
}
return DESCRIPTOR_SEARCH_NotFound;
}
+
diff --git
a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
index
704ddea
..
c77d7fd
100644
(file)
--- a/
Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
+++ b/
Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
@@
-68,7
+68,7
@@
void SetupHardware(void)
Serial_Init(9600, false);
Buttons_Init();
ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_32);
Serial_Init(9600, false);
Buttons_Init();
ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_32);
- ADC_SetupChannel(MIC_IN_ADC_CHANNEL);
+ ADC_SetupChannel(MIC_IN_ADC_CHANNEL);
LEDs_Init();
USB_Init();
LEDs_Init();
USB_Init();
@@
-126,7
+126,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
-
+
if ((ErrorCode = USB_Host_SetInterfaceAltSetting(StreamingInterfaceIndex,
StreamingInterfaceAltSetting)) != HOST_SENDCONTROL_Successful)
{
if ((ErrorCode = USB_Host_SetInterfaceAltSetting(StreamingInterfaceIndex,
StreamingInterfaceAltSetting)) != HOST_SENDCONTROL_Successful)
{
@@
-146,7
+146,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
.wIndex = StreamingEndpointAddress,
.wLength = sizeof(USB_Audio_SampleFreq_t),
};
.wIndex = StreamingEndpointAddress,
.wLength = sizeof(USB_Audio_SampleFreq_t),
};
-
+
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
/* Select the control pipe for the request transfer */
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
/* Select the control pipe for the request transfer */
@@
-164,8
+164,8
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
TIMSK0 = (1 << OCIE0A);
OCR0A = ((F_CPU / 8 / 48000) - 1);
TCCR0A = (1 << WGM01); // CTC mode
TIMSK0 = (1 << OCIE0A);
OCR0A = ((F_CPU / 8 / 48000) - 1);
TCCR0A = (1 << WGM01); // CTC mode
- TCCR0B = (1 << CS01); // Fcpu/8 speed
-
+ TCCR0B = (1 << CS01); // Fcpu/8 speed
+
puts_P(PSTR("Speaker Enumerated.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
puts_P(PSTR("Speaker Enumerated.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
@@
-207,16
+207,16
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
/* Check if the current pipe can be written to (device ready for more data) */
if (Pipe_IsOUTReady())
{
/* Check if the current pipe can be written to (device ready for more data) */
if (Pipe_IsOUTReady())
{
- int16_t AudioSample;
-
+ int16_t AudioSample;
+
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
#if defined(USE_TEST_TONE)
static uint8_t SquareWaveSampleCount;
static int16_t CurrentWaveValue;
-
+
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
/* In test tone mode, generate a square wave at 1/256 of the sample rate */
if (SquareWaveSampleCount++ == 0xFF)
CurrentWaveValue ^= 0x8000;
-
+
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
/* Only generate audio if the board button is being pressed */
AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0;
#else
@@
-226,12
+226,12
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
AudioSample -= (SAMPLE_MAX_RANGE / 2);
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
AudioSample -= (SAMPLE_MAX_RANGE / 2);
- #endif
+ #endif
#endif
#endif
-
+
Pipe_Write_16_LE(AudioSample);
Pipe_Write_16_LE(AudioSample);
Pipe_Write_16_LE(AudioSample);
Pipe_Write_16_LE(AudioSample);
-
+
if (!(Pipe_IsReadWriteAllowed()))
Pipe_ClearOUT();
}
if (!(Pipe_IsReadWriteAllowed()))
Pipe_ClearOUT();
}
@@
-239,3
+239,4
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
Pipe_Freeze();
Pipe_SelectPipe(PrevPipe);
}
Pipe_Freeze();
Pipe_SelectPipe(PrevPipe);
}
+
diff --git
a/Demos/Host/LowLevel/AudioOutputHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/AudioOutputHost/ConfigDescriptor.c
index
33a0253
..
4f6199d
100644
(file)
--- a/
Demos/Host/LowLevel/AudioOutputHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/AudioOutputHost/ConfigDescriptor.c
@@
-99,7
+99,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
/* Save the interface in case we need to refer back to it later */
}
/* Save the interface in case we need to refer back to it later */
- AudioControlInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
+ AudioControlInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
/* Find the next Audio Streaming interface within that Audio Control interface */
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
/* Find the next Audio Streaming interface within that Audio Control interface */
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
@@
-218,3
+218,4
@@
uint8_t DComp_NextAudioInterfaceDataEndpoint(void* CurrentDescriptor)
return DESCRIPTOR_SEARCH_NotFound;
}
return DESCRIPTOR_SEARCH_NotFound;
}
+
diff --git
a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
index
720ad03
..
953bf12
100644
(file)
--- a/
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
+++ b/
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
@@
-51,7
+51,7
@@
int main(void)
for (;;)
{
ReadNextReport();
for (;;)
{
ReadNextReport();
-
+
USB_USBTask();
}
}
USB_USBTask();
}
}
diff --git
a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
index
0afaa4f
..
1660f42
100644
(file)
--- a/
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
+++ b/
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
@@
-81,7
+81,7
@@
const uint8_t ReportIndex,
const uint8_t ReportType,
uint16_t ReportLength);
const uint8_t ReportIndex,
const uint8_t ReportType,
uint16_t ReportLength);
-
+
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
void EVENT_USB_Host_DeviceAttached(void);
void EVENT_USB_Host_DeviceUnattached(void);
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
void EVENT_USB_Host_DeviceAttached(void);
void EVENT_USB_Host_DeviceUnattached(void);
diff --git
a/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h
b/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h
index
b71c319
..
cb938ef
100644
(file)
--- a/
Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h
+++ b/
Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h
@@
-40,7
+40,7
@@
#include <LUFA/Drivers/USB/USB.h>
#include "JoystickHostWithParser.h"
#include <LUFA/Drivers/USB/USB.h>
#include "JoystickHostWithParser.h"
-
+
/* Macros: */
/** HID Report Descriptor Usage Page value for a toggle button. */
#define USAGE_PAGE_BUTTON 0x09
/* Macros: */
/** HID Report Descriptor Usage Page value for a toggle button. */
#define USAGE_PAGE_BUTTON 0x09
@@
-55,7
+55,7
@@
#define USAGE_X 0x30
/** HID Report Descriptor Usage value for a Y axis movement. */
#define USAGE_X 0x30
/** HID Report Descriptor Usage value for a Y axis movement. */
- #define USAGE_Y 0x31
+ #define USAGE_Y 0x31
/* Enums: */
/** Enum for the possible return codes of the \ref GetHIDReportData() function. */
/* Enums: */
/** Enum for the possible return codes of the \ref GetHIDReportData() function. */
diff --git
a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
index
b38fcf0
..
ccc1d68
100644
(file)
--- a/
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
@@
-99,7
+99,7
@@
void EVENT_USB_Host_DeviceUnattached(void)
void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Getting Config Data.\r\n"));
void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Getting Config Data.\r\n"));
-
+
uint8_t ErrorCode;
/* Get and process the configuration descriptor data */
uint8_t ErrorCode;
/* Get and process the configuration descriptor data */
@@
-179,7
+179,7
@@
void JoystickHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
return;
{
if (USB_HostState != HOST_STATE_Configured)
return;
-
+
/* Select and unfreeze joystick data pipe */
Pipe_SelectPipe(JOYSTICK_DATA_IN_PIPE);
Pipe_Unfreeze();
/* Select and unfreeze joystick data pipe */
Pipe_SelectPipe(JOYSTICK_DATA_IN_PIPE);
Pipe_Unfreeze();
@@
-268,3
+268,4
@@
void ProcessJoystickReport(uint8_t* JoystickReport)
/* Display the button information on the board LEDs */
LEDs_SetAllLEDs(LEDMask);
}
/* Display the button information on the board LEDs */
LEDs_SetAllLEDs(LEDMask);
}
+
diff --git
a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
index
f909e66
..
237b6c2
100644
(file)
--- a/
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
+++ b/
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
@@
-65,7
+65,7
@@
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
-
+
/* Function Prototypes: */
void SetupHardware(void);
void JoystickHost_Task(void);
/* Function Prototypes: */
void SetupHardware(void);
void JoystickHost_Task(void);
diff --git
a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index
4837076
..
6c9d6b9
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@
-181,7
+181,7
@@
void KeyboardHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
return;
{
if (USB_HostState != HOST_STATE_Configured)
return;
-
+
/* Select and unfreeze keyboard data pipe */
Pipe_SelectPipe(KEYBOARD_DATA_IN_PIPE);
Pipe_Unfreeze();
/* Select and unfreeze keyboard data pipe */
Pipe_SelectPipe(KEYBOARD_DATA_IN_PIPE);
Pipe_Unfreeze();
@@
-259,7
+259,7
@@
void ProcessKeyboardReport(uint8_t* KeyboardReport)
}
else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)
{
}
else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)
{
- PressedKey = '0';
+ PressedKey = '0';
}
else if (KeyCode == HID_KEYBOARD_SC_SPACE)
{
}
else if (KeyCode == HID_KEYBOARD_SC_SPACE)
{
diff --git
a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
index
e89b261
..
31c886f
100644
(file)
--- a/
Demos/Host/LowLevel/MIDIHost/MIDIHost.c
+++ b/
Demos/Host/LowLevel/MIDIHost/MIDIHost.c
@@
-165,7
+165,7
@@
void MIDIHost_Task(void)
{
if (USB_HostState != HOST_STATE_Configured)
return;
{
if (USB_HostState != HOST_STATE_Configured)
return;
-
+
Pipe_SelectPipe(MIDI_DATA_IN_PIPE);
if (Pipe_IsINReceived())
Pipe_SelectPipe(MIDI_DATA_IN_PIPE);
if (Pipe_IsINReceived())
@@
-185,7
+185,7
@@
void MIDIHost_Task(void)
printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d\r\n"), NoteOnEvent ? "On" : "Off",
((MIDIEvent.Data1 & 0x0F) + 1),
MIDIEvent.Data2, MIDIEvent.Data3);
printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d\r\n"), NoteOnEvent ? "On" : "Off",
((MIDIEvent.Data1 & 0x0F) + 1),
MIDIEvent.Data2, MIDIEvent.Data3);
- }
+ }
}
Pipe_SelectPipe(MIDI_DATA_OUT_PIPE);
}
Pipe_SelectPipe(MIDI_DATA_OUT_PIPE);
diff --git
a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
index
3546bb2
..
6f07fb7
100644
(file)
--- a/
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
+++ b/
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
@@
-108,7
+108,7
@@
static uint8_t MassStore_SendCommand(MS_CommandBlockWrapper_t* const SCSICommand
return ErrorCode;
}
}
return ErrorCode;
}
}
-
+
/* Retrieve the returned SCSI status from the device */
MS_CommandStatusWrapper_t SCSIStatusBlock;
return MassStore_GetReturnedStatus(&SCSIStatusBlock);
/* Retrieve the returned SCSI status from the device */
MS_CommandStatusWrapper_t SCSIStatusBlock;
return MassStore_GetReturnedStatus(&SCSIStatusBlock);
@@
-267,7
+267,7
@@
static uint8_t MassStore_GetReturnedStatus(MS_CommandStatusWrapper_t* const SCSI
{
return ErrorCode;
}
{
return ErrorCode;
}
-
+
/* Clear the data ready for next reception */
Pipe_ClearIN();
/* Clear the data ready for next reception */
Pipe_ClearIN();
@@
-302,13
+302,13
@@
uint8_t MassStore_MassStorageReset(void)
/* Select the control pipe for the request transfer */
Pipe_SelectPipe(PIPE_CONTROLPIPE);
/* Select the control pipe for the request transfer */
Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
+
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
-
+
/* Select first data pipe to clear STALL condition if one exists */
Pipe_SelectPipe(MASS_STORE_DATA_IN_PIPE);
/* Select first data pipe to clear STALL condition if one exists */
Pipe_SelectPipe(MASS_STORE_DATA_IN_PIPE);
-
+
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
@@
-317,7
+317,7
@@
uint8_t MassStore_MassStorageReset(void)
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
-
+
return HOST_SENDCONTROL_Successful;
}
return HOST_SENDCONTROL_Successful;
}
diff --git
a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index
188f72c
..
8b47dd4
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@
-284,3
+284,4
@@
void ProcessMouseReport(uint8_t* MouseReport)
/* Display the button information on the board LEDs */
LEDs_SetAllLEDs(LEDMask);
}
/* Display the button information on the board LEDs */
LEDs_SetAllLEDs(LEDMask);
}
+
diff --git
a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
index
59e239e
..
94403db
100644
(file)
--- a/
Demos/Host/LowLevel/PrinterHost/PrinterHost.c
+++ b/
Demos/Host/LowLevel/PrinterHost/PrinterHost.c
@@
-218,7
+218,7
@@
void PrinterHost_Task(void)
puts_P(PSTR("Test Page Sent.\r\n"));
/* Indicate device no longer busy */
puts_P(PSTR("Test Page Sent.\r\n"));
/* Indicate device no longer busy */
- LEDs_SetAllLEDs(LEDMASK_USB_READY);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
USB_Host_SetDeviceConfiguration(0);
}
USB_Host_SetDeviceConfiguration(0);
}
diff --git
a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
index
4e813a9
..
75c3771
100644
(file)
--- a/
Demos/Host/LowLevel/PrinterHost/PrinterHost.h
+++ b/
Demos/Host/LowLevel/PrinterHost/PrinterHost.h
@@
-83,6
+83,6
@@
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
const uint8_t SubErrorCode);
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
const uint8_t SubErrorCode);
-
+
#endif
#endif
diff --git
a/Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c
index
84f18db
..
e52f559
100644
(file)
--- a/
Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c
@@
-222,7
+222,7
@@
uint8_t DComp_NextCDCDataInterfaceEndpoint(void* CurrentDescriptor)
USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
/* Check the endpoint type, break out if correct BULK or INTERRUPT type endpoint found */
USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
/* Check the endpoint type, break out if correct BULK or INTERRUPT type endpoint found */
- if (((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK) ||
+ if (((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK) ||
((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT))
{
return DESCRIPTOR_SEARCH_Found;
((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT))
{
return DESCRIPTOR_SEARCH_Found;
diff --git
a/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
index
045de9d
..
492988e
100644
(file)
--- a/
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
@@
-177,7
+177,7
@@
uint8_t DComp_NextStillImageInterfaceDataEndpoint(void* CurrentDescriptor)
USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
/* Check the endpoint type, break out if correct BULK or INTERRUPT type endpoint found */
USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
/* Check the endpoint type, break out if correct BULK or INTERRUPT type endpoint found */
- if (((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK) ||
+ if (((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK) ||
((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT))
{
return DESCRIPTOR_SEARCH_Found;
((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT))
{
return DESCRIPTOR_SEARCH_Found;
diff --git
a/Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c
index
be1bb27
..
b76eb72
100644
(file)
--- a/
Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c
@@
-221,7
+221,7
@@
uint8_t DComp_NextCDCDataInterfaceEndpoint(void* CurrentDescriptor)
{
USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
{
USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
- if (((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK) ||
+ if (((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK) ||
((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT))
{
return DESCRIPTOR_SEARCH_Found;
((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT))
{
return DESCRIPTOR_SEARCH_Found;
diff --git
a/LUFA/CodeTemplates/LUFAConfig.h
b/LUFA/CodeTemplates/LUFAConfig.h
index
e1b1f36
..
3f8841d
100644
(file)
--- a/
LUFA/CodeTemplates/LUFAConfig.h
+++ b/
LUFA/CodeTemplates/LUFAConfig.h
@@
-35,7
+35,7
@@
header, copy this into your project's root directory and supply
the \c USE_LUFA_CONFIG_HEADER token to the compiler so that it is
defined in all compiled source files.
header, copy this into your project's root directory and supply
the \c USE_LUFA_CONFIG_HEADER token to the compiler so that it is
defined in all compiled source files.
-
+
For information on what each token does, refer to the LUFA
manual section "Summary of Compile Tokens".
*/
For information on what each token does, refer to the LUFA
manual section "Summary of Compile Tokens".
*/
@@
-85,7
+85,7
@@
// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
#elif (ARCH == ARCH_XMEGA)
// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
#elif (ARCH == ARCH_XMEGA)
-
+
/* Non-USB Related Configuration Tokens: */
// #define DISABLE_TERMINAL_CODES
/* Non-USB Related Configuration Tokens: */
// #define DISABLE_TERMINAL_CODES
@@
-151,6
+151,6
@@
// #define USB_HOST_TIMEOUT_MS {Insert Value Here}
// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
// #define USB_HOST_TIMEOUT_MS {Insert Value Here}
// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
- #endif
+ #endif
#endif
#endif
diff --git
a/LUFA/Common/ArchitectureSpecific.h
b/LUFA/Common/ArchitectureSpecific.h
index
1a125d6
..
48063e0
100644
(file)
--- a/
LUFA/Common/ArchitectureSpecific.h
+++ b/
LUFA/Common/ArchitectureSpecific.h
@@
-55,7
+55,7
@@
#if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
#endif
#if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
#endif
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@
-82,7
+82,7
@@
"M" (_SFR_IO_ADDR(MCUCR)) \
: "r0"); \
}MACROE
"M" (_SFR_IO_ADDR(MCUCR)) \
: "r0"); \
}MACROE
-
+
/** Defines a volatile \c NOP statement which cannot be optimized out by the compiler, and thus can always
* be set as a breakpoint in the resulting code. Useful for debugging purposes, where the optimizer
* removes/reorders code to the point where break points cannot reliably be set.
/** Defines a volatile \c NOP statement which cannot be optimized out by the compiler, and thus can always
* be set as a breakpoint in the resulting code. Useful for debugging purposes, where the optimizer
* removes/reorders code to the point where break points cannot reliably be set.
@@
-136,7
+136,7
@@
#define pgm_read_ptr(Address) (void*)pgm_read_word(Address)
#endif
#endif
#define pgm_read_ptr(Address) (void*)pgm_read_word(Address)
#endif
#endif
-
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
diff --git
a/LUFA/Common/Architectures.h
b/LUFA/Common/Architectures.h
index
dad3ba7
..
c8b5155
100644
(file)
--- a/
LUFA/Common/Architectures.h
+++ b/
LUFA/Common/Architectures.h
@@
-66,10
+66,10
@@
/** Selects the Atmel 32-bit UC3 AVR (AT32UC3* chips) architecture. */
#define ARCH_UC3 1
/** Selects the Atmel 32-bit UC3 AVR (AT32UC3* chips) architecture. */
#define ARCH_UC3 1
-
+
/** Selects the Atmel XMEGA AVR (ATXMEGA*U chips) architecture. */
#define ARCH_XMEGA 2
/** Selects the Atmel XMEGA AVR (ATXMEGA*U chips) architecture. */
#define ARCH_XMEGA 2
-
+
#if !defined(__DOXYGEN__)
#define ARCH_ ARCH_AVR8
#if !defined(__DOXYGEN__)
#define ARCH_ ARCH_AVR8
diff --git
a/LUFA/Common/Attributes.h
b/LUFA/Common/Attributes.h
index
92948e1
..
ccb2d43
100644
(file)
--- a/
LUFA/Common/Attributes.h
+++ b/
LUFA/Common/Attributes.h
@@
-133,14
+133,14
@@
* \param[in] Func Name of the function which the given function name should alias.
*/
#define ATTR_ALIAS(Func) __attribute__ ((alias( #Func )))
* \param[in] Func Name of the function which the given function name should alias.
*/
#define ATTR_ALIAS(Func) __attribute__ ((alias( #Func )))
-
+
/** Marks a variable or struct element for packing into the smallest space available, omitting any
* alignment bytes usually added between fields to optimize field accesses.
*/
#define ATTR_PACKED __attribute__ ((packed))
/** Indicates the minimum alignment in bytes for a variable or struct element.
/** Marks a variable or struct element for packing into the smallest space available, omitting any
* alignment bytes usually added between fields to optimize field accesses.
*/
#define ATTR_PACKED __attribute__ ((packed))
/** Indicates the minimum alignment in bytes for a variable or struct element.
- *
+ *
* \param[in] Bytes Minimum number of bytes the item should be aligned to.
*/
#define ATTR_ALIGNED(Bytes) __attribute__ ((aligned(Bytes)))
* \param[in] Bytes Minimum number of bytes the item should be aligned to.
*/
#define ATTR_ALIGNED(Bytes) __attribute__ ((aligned(Bytes)))
diff --git
a/LUFA/Common/BoardTypes.h
b/LUFA/Common/BoardTypes.h
index
5ac70fe
..
ea0d707
100644
(file)
--- a/
LUFA/Common/BoardTypes.h
+++ b/
LUFA/Common/BoardTypes.h
@@
-140,13
+140,13
@@
/** Selects the Kernel Concepts USBFOO specific board drivers, including the Button and LEDs drivers. */
#define BOARD_USBFOO 25
/** Selects the Kernel Concepts USBFOO specific board drivers, including the Button and LEDs drivers. */
#define BOARD_USBFOO 25
-
+
/** Selects the Sparkfun ATMEGA8U2 specific board drivers, including the driver for the board LEDs. */
#define BOARD_SPARKFUN8U2 26
/** Selects the Atmel EVK1101 specific board drivers, including the Button, Joystick and LED drivers. */
#define BOARD_EVK1101 27
/** Selects the Sparkfun ATMEGA8U2 specific board drivers, including the driver for the board LEDs. */
#define BOARD_SPARKFUN8U2 26
/** Selects the Atmel EVK1101 specific board drivers, including the Button, Joystick and LED drivers. */
#define BOARD_EVK1101 27
-
+
/** Selects the Busware TUL specific board drivers, including the Button and LED drivers. */
#define BOARD_TUL 28
/** Selects the Busware TUL specific board drivers, including the Button and LED drivers. */
#define BOARD_TUL 28
@@
-155,7
+155,7
@@
/** Selects the Atmel EVK1104 specific board drivers, including the Button and LED drivers. */
#define BOARD_EVK1104 30
/** Selects the Atmel EVK1104 specific board drivers, including the Button and LED drivers. */
#define BOARD_EVK1104 30
-
+
/** Selects the Atmel XMEGA A3BU Xplained specific board drivers, including Dataflash, Button and LED drivers. */
#define BOARD_A3BU_XPLAINED 31
/** Selects the Atmel XMEGA A3BU Xplained specific board drivers, including Dataflash, Button and LED drivers. */
#define BOARD_A3BU_XPLAINED 31
diff --git
a/LUFA/Common/Common.h
b/LUFA/Common/Common.h
index
4d08e78
..
6f9936a
100644
(file)
--- a/
LUFA/Common/Common.h
+++ b/
LUFA/Common/Common.h
@@
-42,7
+42,7
@@
*
* @{
*/
*
* @{
*/
-
+
/** \defgroup Group_GlobalInt Global Interrupt Macros
* \brief Convenience macros for the management of interrupts globally within the device.
*
/** \defgroup Group_GlobalInt Global Interrupt Macros
* \brief Convenience macros for the management of interrupts globally within the device.
*
@@
-54,13
+54,13
@@
/* Macros: */
#define __INCLUDE_FROM_COMMON_H
/* Macros: */
#define __INCLUDE_FROM_COMMON_H
-
+
/* Includes: */
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stddef.h>
/* Includes: */
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stddef.h>
-
+
#if defined(USE_LUFA_CONFIG_HEADER)
#include "LUFAConfig.h"
#endif
#if defined(USE_LUFA_CONFIG_HEADER)
#include "LUFAConfig.h"
#endif
@@
-70,7
+70,7
@@
#include "ArchitectureSpecific.h"
#include "CompilerSpecific.h"
#include "Attributes.h"
#include "ArchitectureSpecific.h"
#include "CompilerSpecific.h"
#include "Attributes.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@
-90,9
+90,9
@@
#include <avr/eeprom.h>
#include <avr/boot.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include <avr/boot.h>
#include <util/delay.h>
-
+
typedef uint8_t uint_reg_t;
typedef uint8_t uint_reg_t;
-
+
#define ARCH_HAS_EEPROM_ADDRESS_SPACE
#define ARCH_HAS_FLASH_ADDRESS_SPACE
#define ARCH_HAS_MULTI_ADDRESS_SPACE
#define ARCH_HAS_EEPROM_ADDRESS_SPACE
#define ARCH_HAS_FLASH_ADDRESS_SPACE
#define ARCH_HAS_MULTI_ADDRESS_SPACE
@@
-110,7
+110,7
@@
// =================================================
typedef uint32_t uint_reg_t;
// =================================================
typedef uint32_t uint_reg_t;
-
+
#define ARCH_BIG_ENDIAN
#include "Endianness.h"
#define ARCH_BIG_ENDIAN
#include "Endianness.h"
@@
-120,15
+120,15
@@
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <util/delay.h>
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <util/delay.h>
-
+
typedef uint8_t uint_reg_t;
typedef uint8_t uint_reg_t;
-
+
#define ARCH_HAS_EEPROM_ADDRESS_SPACE
#define ARCH_HAS_FLASH_ADDRESS_SPACE
#define ARCH_HAS_MULTI_ADDRESS_SPACE
#define ARCH_LITTLE_ENDIAN
#define ARCH_HAS_EEPROM_ADDRESS_SPACE
#define ARCH_HAS_FLASH_ADDRESS_SPACE
#define ARCH_HAS_MULTI_ADDRESS_SPACE
#define ARCH_LITTLE_ENDIAN
- #include "Endianness.h"
+ #include "Endianness.h"
#else
#error Unknown device architecture specified.
#endif
#else
#error Unknown device architecture specified.
#endif
@@
-176,7
+176,7
@@
#if !defined(MIN) || defined(__DOXYGEN__)
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
#if !defined(MIN) || defined(__DOXYGEN__)
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
-
+
#if !defined(STRINGIFY) || defined(__DOXYGEN__)
/** Converts the given input into a string, via the C Preprocessor. This macro puts literal quotation
* marks around the input, converting the source into a string literal.
#if !defined(STRINGIFY) || defined(__DOXYGEN__)
/** Converts the given input into a string, via the C Preprocessor. This macro puts literal quotation
* marks around the input, converting the source into a string literal.
@@
-256,7
+256,7
@@
while (Milliseconds--)
{
__builtin_mtsr(AVR32_COUNT, 0);
while (Milliseconds--)
{
__builtin_mtsr(AVR32_COUNT, 0);
- while (__builtin_mfsr(AVR32_COUNT) < (F_CPU / 1000));
+ while (__builtin_mfsr(AVR32_COUNT) < (F_CPU / 1000));
}
#elif (ARCH == ARCH_XMEGA)
if (GCC_IS_COMPILE_CONST(Milliseconds))
}
#elif (ARCH == ARCH_XMEGA)
if (GCC_IS_COMPILE_CONST(Milliseconds))
@@
-267,7
+267,7
@@
{
while (Milliseconds--)
_delay_ms(1);
{
while (Milliseconds--)
_delay_ms(1);
- }
+ }
#endif
}
#endif
}
@@
-316,12
+316,12
@@
else
__builtin_csrf(AVR32_SR_GM_OFFSET);
#elif (ARCH == ARCH_XMEGA)
else
__builtin_csrf(AVR32_SR_GM_OFFSET);
#elif (ARCH == ARCH_XMEGA)
- SREG = GlobalIntState;
+ SREG = GlobalIntState;
#endif
#endif
-
+
GCC_MEMORY_BARRIER();
}
GCC_MEMORY_BARRIER();
}
-
+
/** Enables global interrupt handling for the device, allowing interrupts to be handled.
*
* \ingroup Group_GlobalInt
/** Enables global interrupt handling for the device, allowing interrupts to be handled.
*
* \ingroup Group_GlobalInt
@@
-340,7
+340,7
@@
#endif
GCC_MEMORY_BARRIER();
#endif
GCC_MEMORY_BARRIER();
- }
+ }
/** Disabled global interrupt handling for the device, preventing interrupts from being handled.
*
/** Disabled global interrupt handling for the device, preventing interrupts from being handled.
*
diff --git
a/LUFA/Common/CompilerSpecific.h
b/LUFA/Common/CompilerSpecific.h
index
96d37cd
..
9186135
100644
(file)
--- a/
LUFA/Common/CompilerSpecific.h
+++ b/
LUFA/Common/CompilerSpecific.h
@@
-43,7
+43,7
@@
*
* Compiler specific definitions to expose certain compiler features which may increase the level of code optimization
* for a specific compiler, or correct certain issues that may be present such as memory barriers for use in conjunction
*
* Compiler specific definitions to expose certain compiler features which may increase the level of code optimization
* for a specific compiler, or correct certain issues that may be present such as memory barriers for use in conjunction
- * with atomic variable access.
+ * with atomic variable access.
*
* Where possible, on alternative compilers, these macros will either have no effect, or default to returning a sane value
* so that they can be used in existing code without the need for extra compiler checks in the user application code.
*
* Where possible, on alternative compilers, these macros will either have no effect, or default to returning a sane value
* so that they can be used in existing code without the need for extra compiler checks in the user application code.
@@
-77,7
+77,7
@@
* assembly output in an unexpected manner on sections of code that are ordering-specific.
*/
#define GCC_MEMORY_BARRIER() __asm__ __volatile__("" ::: "memory");
* assembly output in an unexpected manner on sections of code that are ordering-specific.
*/
#define GCC_MEMORY_BARRIER() __asm__ __volatile__("" ::: "memory");
-
+
/** Evaluates to boolean true if the specified value can be determined at compile time to be a constant value
* when compiling under GCC.
*
/** Evaluates to boolean true if the specified value can be determined at compile time to be a constant value
* when compiling under GCC.
*
diff --git
a/LUFA/Common/Endianness.h
b/LUFA/Common/Endianness.h
index
6b57ed6
..
f0b5b19
100644
(file)
--- a/
LUFA/Common/Endianness.h
+++ b/
LUFA/Common/Endianness.h
@@
-65,7
+65,7
@@
#if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
#endif
#if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
#endif
-
+
#if !(defined(ARCH_BIG_ENDIAN) || defined(ARCH_LITTLE_ENDIAN))
#error ARCH_BIG_ENDIAN or ARCH_LITTLE_ENDIAN not set for the specified architecture.
#endif
#if !(defined(ARCH_BIG_ENDIAN) || defined(ARCH_LITTLE_ENDIAN))
#error ARCH_BIG_ENDIAN or ARCH_LITTLE_ENDIAN not set for the specified architecture.
#endif
@@
-115,11
+115,11
@@
#define CPU_TO_LE16(x) SWAPENDIAN_16(x)
#define CPU_TO_LE32(x) SWAPENDIAN_32(x)
#define CPU_TO_BE16(x) (x)
#define CPU_TO_LE16(x) SWAPENDIAN_16(x)
#define CPU_TO_LE32(x) SWAPENDIAN_32(x)
#define CPU_TO_BE16(x) (x)
- #define CPU_TO_BE32(x) (x)
+ #define CPU_TO_BE32(x) (x)
#elif !defined(le16_to_cpu)
/** \name Run-time endianness conversion */
//@{
#elif !defined(le16_to_cpu)
/** \name Run-time endianness conversion */
//@{
-
+
/** Performs a conversion between a Little Endian encoded 16-bit piece of data and the
* Endianness of the currently selected CPU architecture.
*
/** Performs a conversion between a Little Endian encoded 16-bit piece of data and the
* Endianness of the currently selected CPU architecture.
*
@@
-398,7
+398,7
@@
{
if (GCC_IS_COMPILE_CONST(Word))
return SWAPENDIAN_16(Word);
{
if (GCC_IS_COMPILE_CONST(Word))
return SWAPENDIAN_16(Word);
-
+
uint8_t Temp;
union
uint8_t Temp;
union
@@
-486,3
+486,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
b/LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
index
dfb77fa
..
04a6a84
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
@@
-124,3
+124,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
b/LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
index
6965301
..
19d19ee
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
@@
-66,7
+66,7
@@
/* Macros: */
#define JOY_FMASK ((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7))
#define JOY_CMASK (1 << 6)
/* Macros: */
#define JOY_FMASK ((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7))
#define JOY_CMASK (1 << 6)
-
+
#define JOY_PORTC_MASK_SHIFT 3
#endif
#define JOY_PORTC_MASK_SHIFT 3
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
b/LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
index
b24c9bc
..
4cb6aeb
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
@@
-127,3
+127,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
b/LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
index
9030326
..
f211e65
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-82,7
+82,7
@@
DDRB |= LEDS_ALL_LEDS;
PORTB &= ~LEDS_ALL_LEDS;
}
DDRB |= LEDS_ALL_LEDS;
PORTB &= ~LEDS_ALL_LEDS;
}
-
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB |= LEDMask;
@@
-97,18
+97,18
@@
{
PORTB = ((PORTB & ~LEDS_ALL_LEDS) | LEDMask);
}
{
PORTB = ((PORTB & ~LEDS_ALL_LEDS) | LEDMask);
}
-
+
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
PORTB = ((PORTB & ~LEDMask) | ActiveMask);
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
PORTB = ((PORTB & ~LEDMask) | ActiveMask);
}
-
+
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTB ^= LEDMask;
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTB ^= LEDMask;
}
-
+
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
@@
-120,7
+120,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
b/LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
index
0d645c5
..
ef30a9b
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-35,7
+35,7
@@
* \note This file should not be included directly. It is automatically included as needed by the Buttons driver
* dispatch header located in LUFA/Drivers/Board/Buttons.h.
*/
* \note This file should not be included directly. It is automatically included as needed by the Buttons driver
* dispatch header located in LUFA/Drivers/Board/Buttons.h.
*/
-
+
/** \ingroup Group_Buttons
* \defgroup Group_Buttons_MINIMUS MINIMUS
* \brief Board specific Buttons driver header for the MINIMUS.
/** \ingroup Group_Buttons
* \defgroup Group_Buttons_MINIMUS MINIMUS
* \brief Board specific Buttons driver header for the MINIMUS.
@@
-60,12
+60,12
@@
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Button mask for the first button on the board. */
#define BUTTONS_BUTTON1 (1 << 7)
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Button mask for the first button on the board. */
#define BUTTONS_BUTTON1 (1 << 7)
-
+
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Buttons_Init(void)
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Buttons_Init(void)
@@
-85,7
+85,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
b/LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
index
a732548
..
124fbaa
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-82,7
+82,7
@@
DDRD |= LEDS_ALL_LEDS;
PORTD |= LEDS_ALL_LEDS;
}
DDRD |= LEDS_ALL_LEDS;
PORTD |= LEDS_ALL_LEDS;
}
-
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
@@
-97,18
+97,18
@@
{
PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
}
{
PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
}
-
+
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
PORTD = ((PORTD & ~LEDMask) | ActiveMask);
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
PORTD = ((PORTD & ~LEDMask) | ActiveMask);
}
-
+
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTD ^= LEDMask;
}
-
+
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
@@
-120,7
+120,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/STK525/Joystick.h
b/LUFA/Drivers/Board/AVR8/STK525/Joystick.h
index
3504d18
..
dcf7f2e
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK525/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/STK525/Joystick.h
@@
-66,7
+66,7
@@
/* Macros: */
#define JOY_BMASK ((1 << 5) | (1 << 6) | (1 << 7))
#define JOY_EMASK ((1 << 4) | (1 << 5))
/* Macros: */
#define JOY_BMASK ((1 << 5) | (1 << 6) | (1 << 7))
#define JOY_EMASK ((1 << 4) | (1 << 5))
-
+
#define JOY_PORTE_MASK_SHIFT 1
#endif
#define JOY_PORTE_MASK_SHIFT 1
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
b/LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
index
63b96b0
..
1722fe7
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
@@
-35,7
+35,7
@@
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
-
+
/** \ingroup Group_LEDs
* \defgroup Group_LEDs_TEENSY2 TEENSY2
* \brief Board specific LED driver header for the PJRC Teensy 2 boards.
/** \ingroup Group_LEDs
* \defgroup Group_LEDs_TEENSY2 TEENSY2
* \brief Board specific LED driver header for the PJRC Teensy 2 boards.
@@
-88,7
+88,7
@@
DDRD |= LEDS_ALL_LEDS;
#if (BOARD == BOARD_TEENSY2)
DDRD |= LEDS_ALL_LEDS;
#if (BOARD == BOARD_TEENSY2)
- PORTD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
#else
PORTD |= LEDS_ALL_LEDS;
#endif
#else
PORTD |= LEDS_ALL_LEDS;
#endif
@@
-97,7
+97,7
@@
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
- PORTD |= LEDMask;
+ PORTD |= LEDMask;
#else
PORTD &= ~LEDMask;
#endif
#else
PORTD &= ~LEDMask;
#endif
@@
-106,7
+106,7
@@
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
- PORTD &= ~LEDMask;
+ PORTD &= ~LEDMask;
#else
PORTD |= LEDMask;
#endif
#else
PORTD |= LEDMask;
#endif
@@
-125,7
+125,7
@@
const uint8_t ActiveMask)
{
#if (BOARD == BOARD_TEENSY2)
const uint8_t ActiveMask)
{
#if (BOARD == BOARD_TEENSY2)
- PORTD = ((PORTD & ~LEDMask) | ActiveMask);
+ PORTD = ((PORTD & ~LEDMask) | ActiveMask);
#else
PORTD = ((PORTD | LEDMask) & ~ActiveMask);
#endif
#else
PORTD = ((PORTD | LEDMask) & ~ActiveMask);
#endif
@@
-140,7
+140,7
@@
static inline uint8_t LEDs_GetLEDs(void)
{
#if (BOARD == BOARD_TEENSY2)
static inline uint8_t LEDs_GetLEDs(void)
{
#if (BOARD == BOARD_TEENSY2)
- return (PORTD & LEDS_ALL_LEDS);
+ return (PORTD & LEDS_ALL_LEDS);
#else
return (~PORTD & LEDS_ALL_LEDS);
#endif
#else
return (~PORTD & LEDS_ALL_LEDS);
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
b/LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
index
bbb1b5c
..
4e1e500
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
@@
-99,3
+99,4
@@
\r
/** @} */
\r
\r
\r
/** @} */
\r
\r
+
diff --git
a/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
b/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
index
97a24ba
..
541da26
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
@@
-170,3
+170,4
@@
\r
/** @} */
\r
\r
\r
/** @} */
\r
\r
+
diff --git
a/LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
b/LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
index
65f3481
..
5e80a53
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
@@
-66,7
+66,7
@@
/* Macros: */
#define JOY_BMASK ((1 << 5) | (1 << 6) | (1 << 7))
#define JOY_EMASK ((1 << 4) | (1 << 5))
/* Macros: */
#define JOY_BMASK ((1 << 5) | (1 << 6) | (1 << 7))
#define JOY_EMASK ((1 << 4) | (1 << 5))
-
+
#define JOY_PORTE_MASK_SHIFT 1
#endif
#define JOY_PORTE_MASK_SHIFT 1
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
b/LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
index
f7bb398
..
e4a7002
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
@@
-130,3
+130,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/AVR8/XPLAIN/Dataflash.h
b/LUFA/Drivers/Board/AVR8/XPLAIN/Dataflash.h
index
ebbd211
..
6a867ca
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/XPLAIN/Dataflash.h
+++ b/
LUFA/Drivers/Board/AVR8/XPLAIN/Dataflash.h
@@
-35,7
+35,7
@@
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
-
+
/** \ingroup Group_Dataflash
* \defgroup Group_Dataflash_XPLAIN_REV1 XPLAIN_REV1
* \brief Board specific Dataflash driver header for the original Atmel XPLAIN, revision 1.
/** \ingroup Group_Dataflash
* \defgroup Group_Dataflash_XPLAIN_REV1 XPLAIN_REV1
* \brief Board specific Dataflash driver header for the original Atmel XPLAIN, revision 1.
diff --git
a/LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
b/LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
index
50e150e
..
3abe98e
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
@@
-35,7
+35,7
@@
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
-
+
/** \ingroup Group_LEDs
* \defgroup Group_LEDs_XPLAIN_REV1 XPLAIN_REV1
* \brief Board specific LED driver header for the original Atmel XPLAIN, revision 1.
/** \ingroup Group_LEDs
* \defgroup Group_LEDs_XPLAIN_REV1 XPLAIN_REV1
* \brief Board specific LED driver header for the original Atmel XPLAIN, revision 1.
diff --git
a/LUFA/Drivers/Board/Buttons.h
b/LUFA/Drivers/Board/Buttons.h
index
67bbc0b
..
f60dbb5
100644
(file)
--- a/
LUFA/Drivers/Board/Buttons.h
+++ b/
LUFA/Drivers/Board/Buttons.h
@@
-78,7
+78,7
@@
* // Display which button was pressed (assuming two board buttons)
* printf("Button pressed: %s\r\n", (ButtonPress == BUTTONS_BUTTON1) ? "Button 1" : "Button 2");
* \endcode
* // 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
f3d6dc4
..
cd85237
100644
(file)
--- a/
LUFA/Drivers/Board/Dataflash.h
+++ b/
LUFA/Drivers/Board/Dataflash.h
@@
-233,7
+233,7
@@
#elif (BOARD == BOARD_EVK527)
#include "AVR8/EVK527/Dataflash.h"
#elif (BOARD == BOARD_A3BU_XPLAINED)
#elif (BOARD == BOARD_EVK527)
#include "AVR8/EVK527/Dataflash.h"
#elif (BOARD == BOARD_A3BU_XPLAINED)
- #include "XMEGA/A3BU_XPLAINED/Dataflash.h"
+ #include "XMEGA/A3BU_XPLAINED/Dataflash.h"
#else
#include "Board/Dataflash.h"
#endif
#else
#include "Board/Dataflash.h"
#endif
diff --git
a/LUFA/Drivers/Board/Joystick.h
b/LUFA/Drivers/Board/Joystick.h
index
afbe97d
..
95e90fa
100644
(file)
--- a/
LUFA/Drivers/Board/Joystick.h
+++ b/
LUFA/Drivers/Board/Joystick.h
@@
-76,7
+76,7
@@
*
* // Display which direction the joystick was moved in
* printf("Joystick moved:\r\n");
*
* // 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_UP | JOY_DOWN))
* printf("%s ", (JoystickMovement & JOY_UP) ? "Up" : "Down");
*
diff --git
a/LUFA/Drivers/Board/LEDs.h
b/LUFA/Drivers/Board/LEDs.h
index
55920d0
..
e1f6b4c
100644
(file)
--- a/
LUFA/Drivers/Board/LEDs.h
+++ b/
LUFA/Drivers/Board/LEDs.h
@@
-78,13
+78,13
@@
* LEDs_Init();
*
* // Turn on each of the four LEDs in turn
* LEDs_Init();
*
* // Turn on each of the four LEDs in turn
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED1);
* Delay_MS(500);
* Delay_MS(500);
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED1);
* Delay_MS(500);
* Delay_MS(500);
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED1);
* Delay_MS(500);
* Delay_MS(500);
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED1);
* Delay_MS(500);
*
* // Turn on all LEDs
* Delay_MS(500);
*
* // Turn on all LEDs
@@
-166,7
+166,7
@@
#elif (BOARD == BOARD_EVK1101)
#include "UC3/EVK1101/LEDs.h"
#elif (BOARD == BOARD_TUL)
#elif (BOARD == BOARD_EVK1101)
#include "UC3/EVK1101/LEDs.h"
#elif (BOARD == BOARD_TUL)
- #include "AVR8/TUL/LEDs.h"
+ #include "AVR8/TUL/LEDs.h"
#elif (BOARD == BOARD_EVK1100)
#include "UC3/EVK1100/LEDs.h"
#elif (BOARD == BOARD_EVK1104)
#elif (BOARD == BOARD_EVK1100)
#include "UC3/EVK1100/LEDs.h"
#elif (BOARD == BOARD_EVK1104)
diff --git
a/LUFA/Drivers/Board/Temperature.h
b/LUFA/Drivers/Board/Temperature.h
index
b41c762
..
8b38442
100644
(file)
--- a/
LUFA/Drivers/Board/Temperature.h
+++ b/
LUFA/Drivers/Board/Temperature.h
@@
-60,7
+60,7
@@
* // Display converted temperature in degrees Celsius
* printf("Current Temperature: %d Degrees\r\n", Temperature_GetTemperature());
* \endcode
* // Display converted temperature in degrees Celsius
* printf("Current Temperature: %d Degrees\r\n", Temperature_GetTemperature());
* \endcode
- *
+ *
* @{
*/
* @{
*/
@@
-91,7
+91,7
@@
/** ADC channel MUX mask for the temperature sensor. */
#define TEMP_ADC_CHANNEL_MASK ADC_CHANNEL0
/** ADC channel MUX mask for the temperature sensor. */
#define TEMP_ADC_CHANNEL_MASK ADC_CHANNEL0
-
+
/** Size of the temperature sensor lookup table, in lookup values */
#define TEMP_TABLE_SIZE 120
/** Size of the temperature sensor lookup table, in lookup values */
#define TEMP_TABLE_SIZE 120
diff --git
a/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
b/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
index
2f05f2c
..
10f02cf
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-44,7
+44,7
@@
*
* @{
*/
*
* @{
*/
-
+
#ifndef __BUTTONS_EVK1100_H__
#define __BUTTONS_EVK1100_H__
#ifndef __BUTTONS_EVK1100_H__
#define __BUTTONS_EVK1100_H__
@@
-60,7
+60,7
@@
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
-
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
@@
-97,7
+97,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
b/LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
index
e35d1b3
..
aaf729b
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-44,7
+44,7
@@
*
* @{
*/
*
* @{
*/
-
+
#ifndef __JOYSTICK_EVK1100_H__
#define __JOYSTICK_EVK1100_H__
#ifndef __JOYSTICK_EVK1100_H__
#define __JOYSTICK_EVK1100_H__
@@
-67,7
+67,7
@@
#define JOY_PORT 0
#define JOY_MASK ((1UL << 28) | (1UL << 27) | (1UL << 26) | (1UL << 25) | (1UL << 20))
#endif
#define JOY_PORT 0
#define JOY_MASK ((1UL << 28) | (1UL << 27) | (1UL << 26) | (1UL << 25) | (1UL << 20))
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Mask for the joystick being pushed in the left direction. */
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Mask for the joystick being pushed in the left direction. */
@@
-84,7
+84,7
@@
/** Mask for the joystick being pushed inward. */
#define JOY_PRESS (1UL << 20)
/** Mask for the joystick being pushed inward. */
#define JOY_PRESS (1UL << 20)
-
+
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
@@
-92,7
+92,7
@@
AVR32_GPIO.port[JOY_PORT].gpers = JOY_MASK;
AVR32_GPIO.port[JOY_PORT].gpers = JOY_MASK;
};
AVR32_GPIO.port[JOY_PORT].gpers = JOY_MASK;
AVR32_GPIO.port[JOY_PORT].gpers = JOY_MASK;
};
-
+
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
@@
-108,3
+108,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
b/LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
index
484cede
..
6fd1ac8
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-92,7
+92,7
@@
/** LED mask for the eighth LED on the board. */
#define LEDS_LED8 (1UL << 30)
/** LED mask for the eighth LED on the board. */
#define LEDS_LED8 (1UL << 30)
-
+
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4 \
LEDS_LED5 | LEDS_LED6 | LEDS_LED7 | LEDS_LED8)
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4 \
LEDS_LED5 | LEDS_LED6 | LEDS_LED7 | LEDS_LED8)
@@
-108,7
+108,7
@@
AVR32_GPIO.port[LEDS_PORT].oders = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
AVR32_GPIO.port[LEDS_PORT].oders = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
-
+
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
@@
-124,7
+124,7
@@
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
}
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
}
-
+
static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDMask;
static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDMask;
@@
-135,7
+135,7
@@
{
AVR32_GPIO.port[LEDS_PORT].ovrt = LEDMask;
}
{
AVR32_GPIO.port[LEDS_PORT].ovrt = LEDMask;
}
-
+
static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t LEDs_GetLEDs(void)
{
static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t LEDs_GetLEDs(void)
{
@@
-147,7
+147,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
b/LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
index
f6770a2
..
18c7117
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-44,7
+44,7
@@
*
* @{
*/
*
* @{
*/
-
+
#ifndef __BUTTONS_EVK1101_H__
#define __BUTTONS_EVK1101_H__
#ifndef __BUTTONS_EVK1101_H__
#define __BUTTONS_EVK1101_H__
@@
-60,7
+60,7
@@
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
-
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
@@
-94,7
+94,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
b/LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
index
892474d
..
0481f83
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-44,7
+44,7
@@
*
* @{
*/
*
* @{
*/
-
+
#ifndef __JOYSTICK_EVK1101_H__
#define __JOYSTICK_EVK1101_H__
#ifndef __JOYSTICK_EVK1101_H__
#define __JOYSTICK_EVK1101_H__
@@
-69,7
+69,7
@@
#define JOY_PRESS_PORT 0
#define JOY_PRESS_MASK (1UL << 13)
#endif
#define JOY_PRESS_PORT 0
#define JOY_PRESS_MASK (1UL << 13)
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Mask for the joystick being pushed in the left direction. */
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Mask for the joystick being pushed in the left direction. */
@@
-86,7
+86,7
@@
/** Mask for the joystick being pushed inward. */
#define JOY_PRESS (1UL << 13)
/** Mask for the joystick being pushed inward. */
#define JOY_PRESS (1UL << 13)
-
+
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
@@
-97,7
+97,7
@@
AVR32_GPIO.port[JOY_MOVE_PORT].puers = JOY_MOVE_MASK;
AVR32_GPIO.port[JOY_PRESS_PORT].puers = JOY_PRESS_MASK;
};
AVR32_GPIO.port[JOY_MOVE_PORT].puers = JOY_MOVE_MASK;
AVR32_GPIO.port[JOY_PRESS_PORT].puers = JOY_PRESS_MASK;
};
-
+
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
@@
-114,3
+114,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
b/LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
index
08b19fb
..
6feadbc
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-95,7
+95,7
@@
AVR32_GPIO.port[LEDS_PORT].oders = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
AVR32_GPIO.port[LEDS_PORT].oders = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
-
+
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
@@
-111,7
+111,7
@@
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
}
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
}
-
+
static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDMask;
static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDMask;
@@
-122,7
+122,7
@@
{
AVR32_GPIO.port[LEDS_PORT].ovrt = LEDMask;
}
{
AVR32_GPIO.port[LEDS_PORT].ovrt = LEDMask;
}
-
+
static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t LEDs_GetLEDs(void)
{
static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t LEDs_GetLEDs(void)
{
@@
-134,7
+134,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
b/LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
index
0b30c23
..
934f922
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-44,7
+44,7
@@
*
* @{
*/
*
* @{
*/
-
+
#ifndef __BUTTONS_EVK1104_H__
#define __BUTTONS_EVK1104_H__
#ifndef __BUTTONS_EVK1104_H__
#define __BUTTONS_EVK1104_H__
@@
-60,7
+60,7
@@
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
#if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
-
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
@@
-91,7
+91,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
b/LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
index
6e26cc8
..
5813e89
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-100,7
+100,7
@@
AVR32_GPIO.port[3].oders = LEDS_LEDMASK3;
AVR32_GPIO.port[3].ovrs = LEDS_LEDMASK3;
}
AVR32_GPIO.port[3].oders = LEDS_LEDMASK3;
AVR32_GPIO.port[3].ovrs = LEDS_LEDMASK3;
}
-
+
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[2].ovrc = (LEDMask & LEDS_LEDMASK2);
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[2].ovrc = (LEDMask & LEDS_LEDMASK2);
@@
-121,7
+121,7
@@
AVR32_GPIO.port[3].ovrs = LEDS_LEDMASK3;
AVR32_GPIO.port[3].ovrc = (LEDMask & LEDS_LEDMASK3);
}
AVR32_GPIO.port[3].ovrs = LEDS_LEDMASK3;
AVR32_GPIO.port[3].ovrc = (LEDMask & LEDS_LEDMASK3);
}
-
+
static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask)
{
AVR32_GPIO.port[2].ovrs = (LEDMask & LEDS_LEDMASK2);
static inline void LEDs_ChangeLEDs(const uint32_t LEDMask, const uint32_t ActiveMask)
{
AVR32_GPIO.port[2].ovrs = (LEDMask & LEDS_LEDMASK2);
@@
-136,7
+136,7
@@
AVR32_GPIO.port[2].ovrt = (LEDMask & LEDS_LEDMASK2);
AVR32_GPIO.port[3].ovrt = (LEDMask & LEDS_LEDMASK3);
}
AVR32_GPIO.port[2].ovrt = (LEDMask & LEDS_LEDMASK2);
AVR32_GPIO.port[3].ovrt = (LEDMask & LEDS_LEDMASK3);
}
-
+
static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t LEDs_GetLEDs(void)
{
static inline uint32_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t LEDs_GetLEDs(void)
{
@@
-148,7
+148,8
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
b/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
index
9da328d
..
1665fa4
100644
(file)
--- a/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
+++ b/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-44,7
+44,7
@@
*
* @{
*/
*
* @{
*/
-
+
#ifndef __BUTTONS_A3BU_XPLAINED_H__
#define __BUTTONS_A3BU_XPLAINED_H__
#ifndef __BUTTONS_A3BU_XPLAINED_H__
#define __BUTTONS_A3BU_XPLAINED_H__
@@
-78,7
+78,7
@@
{
PORTE_OUTCLR = BUTTONS_BUTTON1;
PORTF_OUTCLR = (BUTTONS_BUTTON2 | BUTTONS_BUTTON3);
{
PORTE_OUTCLR = BUTTONS_BUTTON1;
PORTF_OUTCLR = (BUTTONS_BUTTON2 | BUTTONS_BUTTON3);
-
+
PORTE_PIN5CTRL = PORT_OPC_PULLUP_gc;
PORTF_PIN1CTRL = PORT_OPC_PULLUP_gc;
PORTF_PIN2CTRL = PORT_OPC_PULLUP_gc;
PORTE_PIN5CTRL = PORT_OPC_PULLUP_gc;
PORTF_PIN1CTRL = PORT_OPC_PULLUP_gc;
PORTF_PIN2CTRL = PORT_OPC_PULLUP_gc;
@@
-100,4
+100,3
@@
/** @} */
/** @} */
-
diff --git
a/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
b/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
index
c49ad03
..
d555ac2
100644
(file)
--- a/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
+++ b/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-124,4
+124,3
@@
/** @} */
/** @} */
-
diff --git
a/LUFA/Drivers/Misc/RingBuffer.h
b/LUFA/Drivers/Misc/RingBuffer.h
index
5b509b6
..
4b98498
100644
(file)
--- a/
LUFA/Drivers/Misc/RingBuffer.h
+++ b/
LUFA/Drivers/Misc/RingBuffer.h
@@
-39,7
+39,7
@@
* or deletions) must not overlap. If there is possibility of two or more of the same kind of
* operating occurring at the same point in time, atomic (mutex) locking should be used.
*/
* or deletions) must not overlap. If there is possibility of two or more of the same kind of
* operating occurring at the same point in time, atomic (mutex) locking should be used.
*/
-
+
/** \ingroup Group_MiscDrivers
* \defgroup Group_RingBuff Generic Byte Ring Buffer - LUFA/Drivers/Misc/RingBuffer.h
* \brief Lightweight ring buffer, for fast insertion/deletion of bytes.
/** \ingroup Group_MiscDrivers
* \defgroup Group_RingBuff Generic Byte Ring Buffer - LUFA/Drivers/Misc/RingBuffer.h
* \brief Lightweight ring buffer, for fast insertion/deletion of bytes.
@@
-134,7
+134,7
@@
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
Buffer->In = DataPtr;
Buffer->Out = DataPtr;
Buffer->Start = &DataPtr[0];
Buffer->In = DataPtr;
Buffer->Out = DataPtr;
Buffer->Start = &DataPtr[0];
@@
-166,7
+166,7
@@
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
Count = Buffer->Count;
SetGlobalInterruptMask(CurrentGlobalInt);
Count = Buffer->Count;
SetGlobalInterruptMask(CurrentGlobalInt);
@@
-244,7
+244,7
@@
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
Buffer->Count++;
SetGlobalInterruptMask(CurrentGlobalInt);
Buffer->Count++;
SetGlobalInterruptMask(CurrentGlobalInt);
@@
-264,7
+264,7
@@
static inline uint8_t RingBuffer_Remove(RingBuffer_t* Buffer)
{
GCC_FORCE_POINTER_ACCESS(Buffer);
static inline uint8_t RingBuffer_Remove(RingBuffer_t* Buffer)
{
GCC_FORCE_POINTER_ACCESS(Buffer);
-
+
uint8_t Data = *Buffer->Out;
if (++Buffer->Out == Buffer->End)
uint8_t Data = *Buffer->Out;
if (++Buffer->Out == Buffer->End)
@@
-272,7
+272,7
@@
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
Buffer->Count--;
SetGlobalInterruptMask(CurrentGlobalInt);
Buffer->Count--;
SetGlobalInterruptMask(CurrentGlobalInt);
diff --git
a/LUFA/Drivers/Misc/TerminalCodes.h
b/LUFA/Drivers/Misc/TerminalCodes.h
index
f8c51bc
..
0126018
100644
(file)
--- a/
LUFA/Drivers/Misc/TerminalCodes.h
+++ b/
LUFA/Drivers/Misc/TerminalCodes.h
@@
-115,7
+115,7
@@
*/
#define ESC_STRIKETHROUGH_OFF ANSI_ESCAPE_SEQUENCE("29m")
//@}
*/
#define ESC_STRIKETHROUGH_OFF ANSI_ESCAPE_SEQUENCE("29m")
//@}
-
+
/** \name Text Colour Control Sequences */
//@{
/** Sets the foreground (text) colour to black. */
/** \name Text Colour Control Sequences */
//@{
/** Sets the foreground (text) colour to black. */
diff --git
a/LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
b/LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
index
a0e9a87
..
fe01730
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
+++ b/
LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
@@
-104,7
+104,7
@@
#define _ADC_GET_MUX_MASK2(y) ADC_CHANNEL ## y
#define _ADC_GET_MUX_MASK(y) _ADC_GET_MUX_MASK2(y)
#endif
#define _ADC_GET_MUX_MASK2(y) ADC_CHANNEL ## y
#define _ADC_GET_MUX_MASK(y) _ADC_GET_MUX_MASK2(y)
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name ADC Reference Configuration Masks */
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name ADC Reference Configuration Masks */
@@
-118,7
+118,7
@@
/** Reference mask, for using the internally generated 2.56V reference voltage as the ADC reference. */
#define ADC_REFERENCE_INT2560MV ((1 << REFS1) | (1 << REFS0))
//@}
/** Reference mask, for using the internally generated 2.56V reference voltage as the ADC reference. */
#define ADC_REFERENCE_INT2560MV ((1 << REFS1) | (1 << REFS0))
//@}
-
+
/** \name ADC Result Adjustment Configuration Masks */
//@{
/** Left-adjusts the 10-bit ADC result, so that the upper 8 bits of the value returned by the
/** \name ADC Result Adjustment Configuration Masks */
//@{
/** Left-adjusts the 10-bit ADC result, so that the upper 8 bits of the value returned by the
@@
-144,7
+144,7
@@
*/
#define ADC_SINGLE_CONVERSION (0 << ADATE)
//@}
*/
#define ADC_SINGLE_CONVERSION (0 << ADATE)
//@}
-
+
/** \name ADC Prescaler Configuration Masks */
//@{
/** Sets the ADC input clock to prescale by a factor of 2 the AVR's system clock. */
/** \name ADC Prescaler Configuration Masks */
//@{
/** Sets the ADC input clock to prescale by a factor of 2 the AVR's system clock. */
diff --git
a/LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
b/LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
index
48b8740
..
d6dc248
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
+++ b/
LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
@@
-70,7
+70,7
@@
* // Send a byte, and store the received byte from the same transaction
* uint8_t ResponseByte = SPI_TransferByte(0xDC);
* \endcode
* // Send a byte, and store the received byte from the same transaction
* uint8_t ResponseByte = SPI_TransferByte(0xDC);
* \endcode
- *
+ *
* @{
*/
* @{
*/
@@
-139,7
+139,7
@@
/** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should be sampled on the trailing edge. */
#define SPI_SAMPLE_TRAILING (1 << CPHA)
//@}
/** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should be sampled on the trailing edge. */
#define SPI_SAMPLE_TRAILING (1 << CPHA)
//@}
-
+
/** \name SPI Data Ordering Configuration Masks */
//@{
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
/** \name SPI Data Ordering Configuration Masks */
//@{
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
@@
-148,7
+148,7
@@
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out LSB first. */
#define SPI_ORDER_LSB_FIRST (1 << DORD)
//@}
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out LSB first. */
#define SPI_ORDER_LSB_FIRST (1 << DORD)
//@}
-
+
/** \name SPI Mode Configuration Masks */
//@{
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */
/** \name SPI Mode Configuration Masks */
//@{
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */
@@
-157,7
+157,7
@@
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */
#define SPI_MODE_MASTER (1 << MSTR)
//@}
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */
#define SPI_MODE_MASTER (1 << MSTR)
//@}
-
+
/* Inline Functions: */
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
* SPI routines.
/* Inline Functions: */
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
* SPI routines.
@@
-195,7
+195,7
@@
SPCR = 0;
SPSR = 0;
}
SPCR = 0;
SPSR = 0;
}
-
+
/** Retrieves the currently selected SPI mode, once the SPI interface has been configured.
*
* \return \ref SPI_MODE_MASTER if the interface is currently in SPI Master mode, \ref SPI_MODE_SLAVE otherwise
/** Retrieves the currently selected SPI mode, once the SPI interface has been configured.
*
* \return \ref SPI_MODE_MASTER if the interface is currently in SPI Master mode, \ref SPI_MODE_SLAVE otherwise
diff --git
a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
index
7b7f5d6
..
70f9f58
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
+++ b/
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
@@
-87,3
+87,4
@@
void Serial_SendData(const uint8_t* Buffer, uint16_t Length)
while (Length--)
Serial_SendByte(*(Buffer++));
}
while (Length--)
Serial_SendByte(*(Buffer++));
}
+
diff --git
a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
index
639b3c3
..
55e18f9
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
+++ b/
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.h
@@
-70,7
+70,7
@@
/* Includes: */
#include "../../../Common/Common.h"
#include "../../Misc/TerminalCodes.h"
/* Includes: */
#include "../../../Common/Common.h"
#include "../../Misc/TerminalCodes.h"
-
+
#include <stdio.h>
/* Enable C linkage for C++ Compilers: */
#include <stdio.h>
/* Enable C linkage for C++ Compilers: */
@@
-87,7
+87,7
@@
#if !defined(__DOXYGEN__)
/* External Variables: */
extern FILE USARTSerialStream;
#if !defined(__DOXYGEN__)
/* External Variables: */
extern FILE USARTSerialStream;
-
+
/* Function Prototypes: */
int Serial_putchar(char DataByte,
FILE *Stream);
/* Function Prototypes: */
int Serial_putchar(char DataByte,
FILE *Stream);
@@
-127,7
+127,7
@@
* \param[in] StringPtr Pointer to a string located in SRAM space.
*/
void Serial_SendString(const char* StringPtr) ATTR_NON_NULL_PTR_ARG(1);
* \param[in] StringPtr Pointer to a string located in SRAM space.
*/
void Serial_SendString(const char* StringPtr) ATTR_NON_NULL_PTR_ARG(1);
-
+
/** Transmits a given buffer located in SRAM memory through the USART.
*
* \param[in] Buffer Pointer to a buffer containing the data to send.
/** Transmits a given buffer located in SRAM memory through the USART.
*
* \param[in] Buffer Pointer to a buffer containing the data to send.
@@
-190,7
+190,7
@@
stdin = Stream;
stdout = Stream;
}
stdin = Stream;
stdout = Stream;
}
-
+
*Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
}
*Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
}
@@
-244,7
+244,7
@@
{
if (!(Serial_IsCharReceived()))
return -1;
{
if (!(Serial_IsCharReceived()))
return -1;
-
+
return UDR1;
}
return UDR1;
}
diff --git
a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
index
d6db37d
..
b77aa08
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
+++ b/
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
@@
-119,9
+119,9
@@
bool TWI_ReceiveByte(uint8_t* const Byte,
TWCR = TWCRMask;
while (!(TWCR & (1 << TWINT)));
*Byte = TWDR;
TWCR = TWCRMask;
while (!(TWCR & (1 << TWINT)));
*Byte = TWDR;
-
+
uint8_t Status = (TWSR & TW_STATUS_MASK);
uint8_t Status = (TWSR & TW_STATUS_MASK);
-
+
return ((LastByte) ? (Status == TW_MR_DATA_NACK) : (Status == TW_MR_DATA_ACK));
}
return ((LastByte) ? (Status == TW_MR_DATA_NACK) : (Status == TW_MR_DATA_ACK));
}
@@
-133,19
+133,19
@@
uint8_t TWI_ReadPacket(const uint8_t SlaveAddress,
uint8_t Length)
{
uint8_t ErrorCode;
uint8_t Length)
{
uint8_t ErrorCode;
-
+
if ((ErrorCode = TWI_StartTransmission((SlaveAddress & TWI_DEVICE_ADDRESS_MASK) | TWI_ADDRESS_WRITE,
TimeoutMS)) == TWI_ERROR_NoError)
{
while (InternalAddressLen--)
{
if (!(TWI_SendByte(*(InternalAddress++))))
if ((ErrorCode = TWI_StartTransmission((SlaveAddress & TWI_DEVICE_ADDRESS_MASK) | TWI_ADDRESS_WRITE,
TimeoutMS)) == TWI_ERROR_NoError)
{
while (InternalAddressLen--)
{
if (!(TWI_SendByte(*(InternalAddress++))))
- {
+ {
ErrorCode = TWI_ERROR_SlaveNAK;
break;
}
}
ErrorCode = TWI_ERROR_SlaveNAK;
break;
}
}
-
+
if ((ErrorCode = TWI_StartTransmission((SlaveAddress & TWI_DEVICE_ADDRESS_MASK) | TWI_ADDRESS_READ,
TimeoutMS)) == TWI_ERROR_NoError)
{
if ((ErrorCode = TWI_StartTransmission((SlaveAddress & TWI_DEVICE_ADDRESS_MASK) | TWI_ADDRESS_READ,
TimeoutMS)) == TWI_ERROR_NoError)
{
@@
-157,11
+157,11
@@
uint8_t TWI_ReadPacket(const uint8_t SlaveAddress,
break;
}
}
break;
}
}
-
+
TWI_StopTransmission();
}
}
TWI_StopTransmission();
}
}
-
+
return ErrorCode;
}
return ErrorCode;
}
@@
-180,7
+180,7
@@
uint8_t TWI_WritePacket(const uint8_t SlaveAddress,
while (InternalAddressLen--)
{
if (!(TWI_SendByte(*(InternalAddress++))))
while (InternalAddressLen--)
{
if (!(TWI_SendByte(*(InternalAddress++))))
- {
+ {
ErrorCode = TWI_ERROR_SlaveNAK;
break;
}
ErrorCode = TWI_ERROR_SlaveNAK;
break;
}
@@
-194,9
+194,10
@@
uint8_t TWI_WritePacket(const uint8_t SlaveAddress,
break;
}
}
break;
}
}
-
+
TWI_StopTransmission();
}
TWI_StopTransmission();
}
-
+
return ErrorCode;
}
return ErrorCode;
}
+
diff --git
a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
index
5a6c296
..
75dffb5
100644
(file)
--- a/
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
+++ b/
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.h
@@
-88,7
+88,7
@@
* }
* }
* \endcode
* }
* }
* \endcode
- *
+ *
* <b>High Level API Example:</b>
* \code
* // Initialize the TWI driver before first use at 200KHz
* <b>High Level API Example:</b>
* \code
* // Initialize the TWI driver before first use at 200KHz
@@
-154,10
+154,10
@@
* or \ref TWI_ADDRESS_WRITE to obtain the device's read and write address respectively.
*/
#define TWI_DEVICE_ADDRESS_MASK 0xFE
* or \ref TWI_ADDRESS_WRITE to obtain the device's read and write address respectively.
*/
#define TWI_DEVICE_ADDRESS_MASK 0xFE
-
+
/** Bit length prescaler for \ref TWI_Init(). This mask multiplies the TWI bit length prescaler by 1. */
#define TWI_BIT_PRESCALE_1 ((0 << TWPS1) | (0 << TWPS0))
/** Bit length prescaler for \ref TWI_Init(). This mask multiplies the TWI bit length prescaler by 1. */
#define TWI_BIT_PRESCALE_1 ((0 << TWPS1) | (0 << TWPS0))
-
+
/** Bit length prescaler for \ref TWI_Init(). This mask multiplies the TWI bit length prescaler by 4. */
#define TWI_BIT_PRESCALE_4 ((0 << TWPS1) | (1 << TWPS0))
/** Bit length prescaler for \ref TWI_Init(). This mask multiplies the TWI bit length prescaler by 4. */
#define TWI_BIT_PRESCALE_4 ((0 << TWPS1) | (1 << TWPS0))
@@
-166,7
+166,7
@@
/** Bit length prescaler for \ref TWI_Init(). This mask multiplies the TWI bit length prescaler by 64. */
#define TWI_BIT_PRESCALE_64 ((1 << TWPS1) | (1 << TWPS0))
/** Bit length prescaler for \ref TWI_Init(). This mask multiplies the TWI bit length prescaler by 64. */
#define TWI_BIT_PRESCALE_64 ((1 << TWPS1) | (1 << TWPS0))
-
+
/** Calculates the length of each bit on the TWI bus for a given target frequency. This may be used with
* the \ref TWI_Init() function to convert a bus frequency to a number of clocks for the \c BitLength
* parameter.
/** Calculates the length of each bit on the TWI bus for a given target frequency. This may be used with
* the \ref TWI_Init() function to convert a bus frequency to a number of clocks for the \c BitLength
* parameter.
@@
-189,7
+189,7
@@
TWI_ERROR_SlaveNotReady = 4, /**< Slave NAKed the TWI bus START condition. */
TWI_ERROR_SlaveNAK = 5, /**< Slave NAKed whilst attempting to send data to the device. */
};
TWI_ERROR_SlaveNotReady = 4, /**< Slave NAKed the TWI bus START condition. */
TWI_ERROR_SlaveNAK = 5, /**< Slave NAKed whilst attempting to send data to the device. */
};
-
+
/* Inline Functions: */
/** Initializes the TWI hardware into master mode, ready for data transmission and reception. This must be
* before any other TWI operations.
/* Inline Functions: */
/** Initializes the TWI hardware into master mode, ready for data transmission and reception. This must be
* before any other TWI operations.
@@
-256,7
+256,7
@@
const bool LastByte) ATTR_NON_NULL_PTR_ARG(1);
bool TWI_ReceiveByte(uint8_t* const Byte,
const bool LastByte);
const bool LastByte) ATTR_NON_NULL_PTR_ARG(1);
bool TWI_ReceiveByte(uint8_t* const Byte,
const bool LastByte);
-
+
/** High level function to perform a complete packet transfer over the TWI bus to the specified
* device.
*
/** High level function to perform a complete packet transfer over the TWI bus to the specified
* device.
*
diff --git
a/LUFA/Drivers/Peripheral/SPI.h
b/LUFA/Drivers/Peripheral/SPI.h
index
3902a90
..
49a07b5
100644
(file)
--- a/
LUFA/Drivers/Peripheral/SPI.h
+++ b/
LUFA/Drivers/Peripheral/SPI.h
@@
-67,9
+67,10
@@
#if (ARCH == ARCH_AVR8)
#include "AVR8/SPI_AVR8.h"
#elif (ARCH == ARCH_XMEGA)
#if (ARCH == ARCH_AVR8)
#include "AVR8/SPI_AVR8.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/SPI_XMEGA.h"
+ #include "XMEGA/SPI_XMEGA.h"
#else
#error The SPI peripheral driver is not currently available for your selected architecture.
#endif
#endif
#else
#error The SPI peripheral driver is not currently available for your selected architecture.
#endif
#endif
+
diff --git
a/LUFA/Drivers/Peripheral/Serial.h
b/LUFA/Drivers/Peripheral/Serial.h
index
856c54b
..
d216b75
100644
(file)
--- a/
LUFA/Drivers/Peripheral/Serial.h
+++ b/
LUFA/Drivers/Peripheral/Serial.h
@@
-71,3
+71,4
@@
#endif
#endif
#endif
#endif
+
diff --git
a/LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h
b/LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h
index
91e86c3
..
0fe7142
100644
(file)
--- a/
LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h
+++ b/
LUFA/Drivers/Peripheral/XMEGA/SPI_XMEGA.h
@@
-67,7
+67,7
@@
* // Send a byte, and store the received byte from the same transaction
* uint8_t ResponseByte = SPI_TransferByte(&SPIC, 0xDC);
* \endcode
* // Send a byte, and store the received byte from the same transaction
* uint8_t ResponseByte = SPI_TransferByte(&SPIC, 0xDC);
* \endcode
- *
+ *
* @{
*/
* @{
*/
@@
-136,7
+136,7
@@
/** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should be sampled on the trailing edge. */
#define SPI_SAMPLE_TRAILING SPI_MODE0_bm
//@}
/** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should be sampled on the trailing edge. */
#define SPI_SAMPLE_TRAILING SPI_MODE0_bm
//@}
-
+
/** \name SPI Data Ordering Configuration Masks */
//@{
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
/** \name SPI Data Ordering Configuration Masks */
//@{
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
@@
-145,7
+145,7
@@
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out LSB first. */
#define SPI_ORDER_LSB_FIRST SPI_DORD_bm
//@}
/** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out LSB first. */
#define SPI_ORDER_LSB_FIRST SPI_DORD_bm
//@}
-
+
/** \name SPI Mode Configuration Masks */
//@{
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */
/** \name SPI Mode Configuration Masks */
//@{
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */
@@
-154,7
+154,7
@@
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */
#define SPI_MODE_MASTER SPI_MASTER_bm
//@}
/** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */
#define SPI_MODE_MASTER SPI_MASTER_bm
//@}
-
+
/* Inline Functions: */
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
* SPI routines.
/* Inline Functions: */
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
* SPI routines.
@@
-177,7
+177,7
@@
{
SPI->CTRL &= ~SPI_ENABLE_bm;
}
{
SPI->CTRL &= ~SPI_ENABLE_bm;
}
-
+
/** Retrieves the currently selected SPI mode, once the SPI interface has been configured.
*
* \param[in, out] SPI Pointer to the base of the SPI peripheral within the device.
/** Retrieves the currently selected SPI mode, once the SPI interface has been configured.
*
* \param[in, out] SPI Pointer to the base of the SPI peripheral within the device.
diff --git
a/LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
b/LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
index
00eedd8
..
c2528d9
100644
(file)
--- a/
LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
+++ b/
LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
@@
-73,3
+73,4
@@
\r
/** @} */
\r
\r
\r
/** @} */
\r
\r
+
diff --git
a/LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
b/LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
index
45e7ca5
..
b9a8dd5
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
@@
-125,3
+125,4
@@
\r
/** @} */
\r
\r
\r
/** @} */
\r
\r
+
diff --git
a/LUFA/Drivers/USB/Class/Common/AudioClassCommon.h
b/LUFA/Drivers/USB/Class/Common/AudioClassCommon.h
index
32a6640
..
8f9a107
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/AudioClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/AudioClassCommon.h
@@
-218,7
+218,7
@@
* allows for pitch adjustments to be made via control requests directed at the endpoint.
*/
#define AUDIO_EP_PITCH_CONTROL (1 << 1)
* allows for pitch adjustments to be made via control requests directed at the endpoint.
*/
#define AUDIO_EP_PITCH_CONTROL (1 << 1)
-
+
/* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Audio
* device class.
/* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Audio
* device class.
@@
-244,7
+244,7
@@
* interface belongs to the Streaming Audio protocol.
*/
};
* interface belongs to the Streaming Audio protocol.
*/
};
-
+
/** Audio class specific interface description subtypes, for the Audio Control interface. */
enum Audio_CSInterface_AC_SubTypes_t
{
/** Audio class specific interface description subtypes, for the Audio Control interface. */
enum Audio_CSInterface_AC_SubTypes_t
{
@@
-287,7
+287,7
@@
AUDIO_REQ_GetMemory = 0x85, /**< Audio class-specific request to get the memory value of a parameter within the device. */
AUDIO_REQ_GetStatus = 0xFF, /**< Audio class-specific request to get the device status. */
};
AUDIO_REQ_GetMemory = 0x85, /**< Audio class-specific request to get the memory value of a parameter within the device. */
AUDIO_REQ_GetStatus = 0xFF, /**< Audio class-specific request to get the device status. */
};
-
+
/** Enum for Audio class specific Endpoint control modifiers which can be set and retrieved by a USB host, if the corresponding
* endpoint control is indicated to be supported in the Endpoint's Audio-class specific endpoint descriptor.
*/
/** Enum for Audio class specific Endpoint control modifiers which can be set and retrieved by a USB host, if the corresponding
* endpoint control is indicated to be supported in the Endpoint's Audio-class specific endpoint descriptor.
*/
diff --git
a/LUFA/Drivers/USB/Class/Common/CDCClassCommon.h
b/LUFA/Drivers/USB/Class/Common/CDCClassCommon.h
index
45e0c58
..
1d01c82
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/CDCClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/CDCClassCommon.h
@@
-111,7
+111,7
@@
*/
#define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
//@}
*/
#define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
//@}
-
+
/** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a
* uniform structure but variable sized data payloads, thus cannot be represented accurately by
* a single typedef struct. A macro is used instead so that functional descriptors can be created
/** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a
* uniform structure but variable sized data payloads, thus cannot be represented accurately by
* a single typedef struct. A macro is used instead so that functional descriptors can be created
@@
-161,7
+161,7
@@
* belongs to no specific protocol of the CDC data class.
*/
};
* belongs to no specific protocol of the CDC data class.
*/
};
-
+
/** Enum for the CDC class specific control requests that can be issued by the USB bus host. */
enum CDC_ClassRequests_t
{
/** Enum for the CDC class specific control requests that can be issued by the USB bus host. */
enum CDC_ClassRequests_t
{
@@
-355,7
+355,7
@@
uint8_t bMasterInterface; /**< Interface number of the CDC Control interface. */
uint8_t bSlaveInterface0; /**< Interface number of the CDC Data interface. */
} ATTR_PACKED USB_CDC_StdDescriptor_FunctionalUnion_t;
uint8_t bMasterInterface; /**< Interface number of the CDC Control interface. */
uint8_t bSlaveInterface0; /**< Interface number of the CDC Data interface. */
} ATTR_PACKED USB_CDC_StdDescriptor_FunctionalUnion_t;
-
+
/** \brief CDC Virtual Serial Port Line Encoding Settings Structure.
*
* Type define for a CDC Line Encoding structure, used to hold the various encoding parameters for a virtual
/** \brief CDC Virtual Serial Port Line Encoding Settings Structure.
*
* Type define for a CDC Line Encoding structure, used to hold the various encoding parameters for a virtual
diff --git
a/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h
b/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h
index
95b3484
..
6e5187b
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/HIDClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/HIDClassCommon.h
@@
-91,7
+91,7
@@
/** Constant for a keyboard report modifier byte, indicating that the keyboard's right GUI key is currently pressed. */
#define HID_KEYBOARD_MODIFIER_RIGHTGUI (1 << 7)
//@}
/** Constant for a keyboard report modifier byte, indicating that the keyboard's right GUI key is currently pressed. */
#define HID_KEYBOARD_MODIFIER_RIGHTGUI (1 << 7)
//@}
-
+
/** \name Keyboard Standard Report LED Masks */
//@{
/** Constant for a keyboard output report LED byte, indicating that the host's NUM LOCK mode is currently set. */
/** \name Keyboard Standard Report LED Masks */
//@{
/** Constant for a keyboard output report LED byte, indicating that the host's NUM LOCK mode is currently set. */
@@
-108,7
+108,7
@@
//@}
/** \name Keyboard Standard Report Key Scan-codes */
//@}
/** \name Keyboard Standard Report Key Scan-codes */
- //@{
+ //@{
#define HID_KEYBOARD_SC_ERROR_ROLLOVER 0x01
#define HID_KEYBOARD_SC_POST_FAIL 0x02
#define HID_KEYBOARD_SC_ERROR_UNDEFINED 0x03
#define HID_KEYBOARD_SC_ERROR_ROLLOVER 0x01
#define HID_KEYBOARD_SC_POST_FAIL 0x02
#define HID_KEYBOARD_SC_ERROR_UNDEFINED 0x03
@@
-208,7
+208,7
@@
#define HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP 0x61
#define HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT 0x62
#define HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE 0x63
#define HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP 0x61
#define HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT 0x62
#define HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE 0x63
- #define HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE 0x64
+ #define HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE 0x64
#define HID_KEYBOARD_SC_POWER 0x66
#define HID_KEYBOARD_SC_EQUAL_SIGN 0x67
#define HID_KEYBOARD_SC_F13 0x68
#define HID_KEYBOARD_SC_POWER 0x66
#define HID_KEYBOARD_SC_EQUAL_SIGN 0x67
#define HID_KEYBOARD_SC_F13 0x68
@@
-496,7
+496,7
@@
* \param[in] VendorPageNum Vendor Defined HID Usage Page index, ranging from 0x00 to 0xFF.
* \param[in] CollectionUsage Vendor Usage for the encompassing report IN and OUT collection, ranging from 0x00 to 0xFF.
* \param[in] DataINUsage Vendor Usage for the IN report data, ranging from 0x00 to 0xFF.
* \param[in] VendorPageNum Vendor Defined HID Usage Page index, ranging from 0x00 to 0xFF.
* \param[in] CollectionUsage Vendor Usage for the encompassing report IN and OUT collection, ranging from 0x00 to 0xFF.
* \param[in] DataINUsage Vendor Usage for the IN report data, ranging from 0x00 to 0xFF.
- * \param[in] DataOUTUsage Vendor Usage for the OUT report data, ranging from 0x00 to 0xFF.
+ * \param[in] DataOUTUsage Vendor Usage for the OUT report data, ranging from 0x00 to 0xFF.
* \param[in] NumBytes Length of the data IN and OUT reports.
*/
#define HID_DESCRIPTOR_VENDOR(VendorPageNum, CollectionUsage, DataINUsage, DataOUTUsage, NumBytes) \
* \param[in] NumBytes Length of the data IN and OUT reports.
*/
#define HID_DESCRIPTOR_VENDOR(VendorPageNum, CollectionUsage, DataINUsage, DataOUTUsage, NumBytes) \
@@
-517,7
+517,7
@@
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), \
HID_RI_END_COLLECTION(0)
//@}
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), \
HID_RI_END_COLLECTION(0)
//@}
-
+
/* Type Defines: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the HID
* device class.
/* Type Defines: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the HID
* device class.
@@
-543,7
+543,7
@@
* belongs to the Mouse HID boot protocol.
*/
};
* belongs to the Mouse HID boot protocol.
*/
};
-
+
/** Enum for the HID class specific control requests that can be issued by the USB bus host. */
enum HID_ClassRequests_t
{
/** Enum for the HID class specific control requests that can be issued by the USB bus host. */
enum HID_ClassRequests_t
{
diff --git
a/LUFA/Drivers/USB/Class/Common/HIDParser.c
b/LUFA/Drivers/USB/Class/Common/HIDParser.c
index
903b039
..
24b284c
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/HIDParser.c
+++ b/
LUFA/Drivers/USB/Class/Common/HIDParser.c
@@
-98,7
+98,7
@@
uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
case HID_RI_USAGE_PAGE(0):
if ((HIDReportItem & HID_RI_DATA_SIZE_MASK) == HID_RI_DATA_BITS_32)
CurrStateTable->Attributes.Usage.Page = (ReportItemData >> 16);
case HID_RI_USAGE_PAGE(0):
if ((HIDReportItem & HID_RI_DATA_SIZE_MASK) == HID_RI_DATA_BITS_32)
CurrStateTable->Attributes.Usage.Page = (ReportItemData >> 16);
-
+
CurrStateTable->Attributes.Usage.Page = ReportItemData;
break;
case HID_RI_LOGICAL_MINIMUM(0):
CurrStateTable->Attributes.Usage.Page = ReportItemData;
break;
case HID_RI_LOGICAL_MINIMUM(0):
@@
-359,3
+359,4
@@
uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData,
return 0;
}
return 0;
}
+
diff --git
a/LUFA/Drivers/USB/Class/Common/HIDParser.h
b/LUFA/Drivers/USB/Class/Common/HIDParser.h
index
3e3bb23
..
25e201b
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/HIDParser.h
+++ b/
LUFA/Drivers/USB/Class/Common/HIDParser.h
@@
-71,7
+71,7
@@
#include "HIDReportData.h"
#include "HIDClassCommon.h"
#include "HIDReportData.h"
#include "HIDClassCommon.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
diff --git
a/LUFA/Drivers/USB/Class/Common/HIDReportData.h
b/LUFA/Drivers/USB/Class/Common/HIDReportData.h
index
2b96eea
..
2c36e8e
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/HIDReportData.h
+++ b/
LUFA/Drivers/USB/Class/Common/HIDReportData.h
@@
-63,15
+63,15
@@
#define HID_RI_DATA_BITS_32 0x03
#define HID_RI_DATA_BITS(DataBits) HID_RI_DATA_BITS_ ## DataBits
#define HID_RI_DATA_BITS_32 0x03
#define HID_RI_DATA_BITS(DataBits) HID_RI_DATA_BITS_ ## DataBits
- #define _HID_RI_ENCODE_0(Data)
+ #define _HID_RI_ENCODE_0(Data)
#define _HID_RI_ENCODE_8(Data) , (Data & 0xFF)
#define _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_8(Data) _HID_RI_ENCODE_8(Data >> 8)
#define _HID_RI_ENCODE_32(Data) _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_16(Data >> 16)
#define _HID_RI_ENCODE(DataBits, ...) _HID_RI_ENCODE_ ## DataBits(__VA_ARGS__)
#define _HID_RI_ENCODE_8(Data) , (Data & 0xFF)
#define _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_8(Data) _HID_RI_ENCODE_8(Data >> 8)
#define _HID_RI_ENCODE_32(Data) _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_16(Data >> 16)
#define _HID_RI_ENCODE(DataBits, ...) _HID_RI_ENCODE_ ## DataBits(__VA_ARGS__)
-
+
#define _HID_RI_ENTRY(Type, Tag, DataBits, ...) (Type | Tag | HID_RI_DATA_BITS(DataBits)) _HID_RI_ENCODE(DataBits, (__VA_ARGS__))
#endif
#define _HID_RI_ENTRY(Type, Tag, DataBits, ...) (Type | Tag | HID_RI_DATA_BITS(DataBits)) _HID_RI_ENCODE(DataBits, (__VA_ARGS__))
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name HID Input, Output and Feature Report Descriptor Item Flags */
/* Public Interface - May be used in end-application: */
/* Macros: */
/** \name HID Input, Output and Feature Report Descriptor Item Flags */
@@
-95,7
+95,7
@@
#define HID_IOF_BUFFERED_BYTES (1 << 8)
#define HID_IOF_BITFIELD (0 << 8)
//@}
#define HID_IOF_BUFFERED_BYTES (1 << 8)
#define HID_IOF_BITFIELD (0 << 8)
//@}
-
+
/** \name HID Report Descriptor Item Macros */
//@{
#define HID_RI_INPUT(DataBits, ...) _HID_RI_ENTRY(HID_RI_TYPE_MAIN , 0x80, DataBits, __VA_ARGS__)
/** \name HID Report Descriptor Item Macros */
//@{
#define HID_RI_INPUT(DataBits, ...) _HID_RI_ENTRY(HID_RI_TYPE_MAIN , 0x80, DataBits, __VA_ARGS__)
diff --git
a/LUFA/Drivers/USB/Class/Common/MassStorageClassCommon.h
b/LUFA/Drivers/USB/Class/Common/MassStorageClassCommon.h
index
49246ba
..
9d37b3d
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/MassStorageClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/MassStorageClassCommon.h
@@
-117,7
+117,7
@@
/** SCSI Command Code for a MODE SENSE (10) command. */
#define SCSI_CMD_MODE_SENSE_10 0x5A
//@}
/** SCSI Command Code for a MODE SENSE (10) command. */
#define SCSI_CMD_MODE_SENSE_10 0x5A
//@}
-
+
/** \name SCSI Sense Key Values */
//@{
/** SCSI Sense Code to indicate no error has occurred. */
/** \name SCSI Sense Key Values */
//@{
/** SCSI Sense Code to indicate no error has occurred. */
@@
-164,7
+164,7
@@
/** SCSI Sense Code to indicate that the source data did not match the data read from the medium. */
#define SCSI_SENSE_KEY_MISCOMPARE 0x0E
//@}
/** SCSI Sense Code to indicate that the source data did not match the data read from the medium. */
#define SCSI_SENSE_KEY_MISCOMPARE 0x0E
//@}
-
+
/** \name SCSI Additional Sense Codes */
//@{
/** SCSI Additional Sense Code to indicate no additional sense information is available. */
/** \name SCSI Additional Sense Codes */
//@{
/** SCSI Additional Sense Code to indicate no additional sense information is available. */
@@
-196,7
+196,7
@@
/** SCSI Additional Sense Code to indicate that no removable medium is inserted into the device. */
#define SCSI_ASENSE_MEDIUM_NOT_PRESENT 0x3A
//@}
/** SCSI Additional Sense Code to indicate that no removable medium is inserted into the device. */
#define SCSI_ASENSE_MEDIUM_NOT_PRESENT 0x3A
//@}
-
+
/** \name SCSI Additional Sense Key Code Qualifiers */
//@{
/** SCSI Additional Sense Qualifier Code to indicate no additional sense qualifier information is available. */
/** \name SCSI Additional Sense Key Code Qualifiers */
//@{
/** SCSI Additional Sense Qualifier Code to indicate no additional sense qualifier information is available. */
@@
-213,7
+213,7
@@
/** SCSI Additional Sense Qualifier Code to indicate that an operation is currently in progress. */
#define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
//@}
/** SCSI Additional Sense Qualifier Code to indicate that an operation is currently in progress. */
#define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
//@}
-
+
/* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Mass
* Storage device class.
/* Enums: */
/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Mass
* Storage device class.
@@
-231,7
+231,7
@@
* belongs to the Bulk Only Transport protocol of the Mass Storage class.
*/
};
* belongs to the Bulk Only Transport protocol of the Mass Storage class.
*/
};
-
+
/** Enum for the Mass Storage class specific control requests that can be issued by the USB bus host. */
enum MS_ClassRequests_t
{
/** Enum for the Mass Storage class specific control requests that can be issued by the USB bus host. */
enum MS_ClassRequests_t
{
diff --git
a/LUFA/Drivers/USB/Class/Common/PrinterClassCommon.h
b/LUFA/Drivers/USB/Class/Common/PrinterClassCommon.h
index
3d52be3
..
c370bbc
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/PrinterClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/PrinterClassCommon.h
@@
-92,7
+92,7
@@
* belongs to the Bidirectional protocol of the Printer class.
*/
};
* belongs to the Bidirectional protocol of the Printer class.
*/
};
-
+
/** Enum for the Printer class specific control requests that can be issued by the USB bus host. */
enum PRNT_ClassRequests_t
{
/** Enum for the Printer class specific control requests that can be issued by the USB bus host. */
enum PRNT_ClassRequests_t
{
@@
-106,7
+106,7
@@
PRNT_REQ_SoftReset = 0x02, /**< Printer class-specific request to reset the device, ready for new
* printer commands.
*/
PRNT_REQ_SoftReset = 0x02, /**< Printer class-specific request to reset the device, ready for new
* printer commands.
*/
- };
+ };
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git
a/LUFA/Drivers/USB/Class/Common/RNDISClassCommon.h
b/LUFA/Drivers/USB/Class/Common/RNDISClassCommon.h
index
30840f5
..
82c2a95
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/RNDISClassCommon.h
+++ b/
LUFA/Drivers/USB/Class/Common/RNDISClassCommon.h
@@
-113,7
+113,7
@@
#define REMOTE_NDIS_MEDIA_STATE_CONNECTED 0x00000000UL
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL
//@}
#define REMOTE_NDIS_MEDIA_STATE_CONNECTED 0x00000000UL
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL
//@}
-
+
/** \name RNDIS Media Types */
//@{
#define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL
/** \name RNDIS Media Types */
//@{
#define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL
@@
-124,7
+124,7
@@
#define REMOTE_NDIS_DF_CONNECTIONLESS 0x00000001UL
#define REMOTE_NDIS_DF_CONNECTION_ORIENTED 0x00000002UL
//@}
#define REMOTE_NDIS_DF_CONNECTIONLESS 0x00000001UL
#define REMOTE_NDIS_DF_CONNECTION_ORIENTED 0x00000002UL
//@}
-
+
/** \name RNDIS Packet Types */
//@{
#define REMOTE_NDIS_PACKET_DIRECTED 0x00000001UL
/** \name RNDIS Packet Types */
//@{
#define REMOTE_NDIS_PACKET_DIRECTED 0x00000001UL
@@
-140,7
+140,7
@@
#define REMOTE_NDIS_PACKET_FUNCTIONAL 0x00004000UL
#define REMOTE_NDIS_PACKET_MAC_FRAME 0x00008000UL
//@}
#define REMOTE_NDIS_PACKET_FUNCTIONAL 0x00004000UL
#define REMOTE_NDIS_PACKET_MAC_FRAME 0x00008000UL
//@}
-
+
/** \name RNDIS OID Values */
//@{
#define OID_GEN_SUPPORTED_LIST 0x00010101UL
/** \name RNDIS OID Values */
//@{
#define OID_GEN_SUPPORTED_LIST 0x00010101UL
diff --git
a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
index
d8c5d29
..
3ac47d5
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
+++ b/
LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
@@
-50,16
+50,16
@@
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
{
bool EndpointFilterMatch = false;
else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
{
bool EndpointFilterMatch = false;
-
+
EndpointFilterMatch |= (AudioInterfaceInfo->Config.DataINEndpointNumber &&
((uint8_t)USB_ControlRequest.wIndex == (ENDPOINT_DIR_IN | AudioInterfaceInfo->Config.DataINEndpointNumber)));
EndpointFilterMatch |= (AudioInterfaceInfo->Config.DataINEndpointNumber &&
((uint8_t)USB_ControlRequest.wIndex == (ENDPOINT_DIR_IN | AudioInterfaceInfo->Config.DataINEndpointNumber)));
-
+
EndpointFilterMatch |= (AudioInterfaceInfo->Config.DataOUTEndpointNumber &&
((uint8_t)USB_ControlRequest.wIndex == (ENDPOINT_DIR_OUT | AudioInterfaceInfo->Config.DataOUTEndpointNumber)));
if (!(EndpointFilterMatch))
return;
EndpointFilterMatch |= (AudioInterfaceInfo->Config.DataOUTEndpointNumber &&
((uint8_t)USB_ControlRequest.wIndex == (ENDPOINT_DIR_OUT | AudioInterfaceInfo->Config.DataOUTEndpointNumber)));
if (!(EndpointFilterMatch))
return;
- }
+ }
switch (USB_ControlRequest.bRequest)
{
switch (USB_ControlRequest.bRequest)
{
@@
-92,20
+92,20
@@
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
uint8_t EndpointProperty = USB_ControlRequest.bRequest;
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
uint8_t EndpointProperty = USB_ControlRequest.bRequest;
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
-
+
if (CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
EndpointControl, NULL, NULL))
{
uint16_t ValueLength = USB_ControlRequest.wLength;
uint8_t Value[ValueLength];
if (CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
EndpointControl, NULL, NULL))
{
uint16_t ValueLength = USB_ControlRequest.wLength;
uint8_t Value[ValueLength];
-
+
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(Value, ValueLength);
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(Value, ValueLength);
- Endpoint_ClearIN();
+ Endpoint_ClearIN();
CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
EndpointControl, &ValueLength, Value);
CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
EndpointControl, &ValueLength, Value);
- }
+ }
}
break;
}
break;
@@
-126,7
+126,7
@@
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
{
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(Value, ValueLength);
{
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(Value, ValueLength);
- Endpoint_ClearOUT();
+ Endpoint_ClearOUT();
}
}
}
}
@@
-180,3
+180,4
@@
void Audio_Device_Event_Stub(void)
}
#endif
}
#endif
+
diff --git
a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
index
0f2185b
..
aba4248
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
+++ b/
LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
@@
-126,7
+126,7
@@
* \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state.
*/
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
* \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state.
*/
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
+
/** Audio class driver callback for the setting and retrieval of streaming endpoint properties. This callback must be implemented
* in the user application to handle property manipulations on streaming audio endpoints.
*
/** Audio class driver callback for the setting and retrieval of streaming endpoint properties. This callback must be implemented
* in the user application to handle property manipulations on streaming audio endpoints.
*
@@
-357,12
+357,12
@@
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_AUDIO_DEVICE_C)
void Audio_Device_Event_Stub(void) ATTR_CONST;
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_AUDIO_DEVICE_C)
void Audio_Device_Event_Stub(void) ATTR_CONST;
-
+
void EVENT_Audio_Device_StreamStartStop(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(Audio_Device_Event_Stub);
#endif
void EVENT_Audio_Device_StreamStartStop(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(Audio_Device_Event_Stub);
#endif
- #endif
+ #endif
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git
a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
index
e3b05e0
..
0167440
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
+++ b/
LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
@@
-78,7
+78,7
@@
void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const CDCInter
Endpoint_ClearOUT();
Endpoint_ClearStatusStage();
Endpoint_ClearOUT();
Endpoint_ClearStatusStage();
-
+
EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo);
}
EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo);
}
diff --git
a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
index
2494256
..
a172e4a
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
+++ b/
LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
@@
-334,7
+334,7
@@
#endif
void CDC_Device_Event_Stub(void) ATTR_CONST;
#endif
void CDC_Device_Event_Stub(void) ATTR_CONST;
-
+
void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
diff --git
a/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
b/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
index
9b5a7dd
..
071f55f
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
+++ b/
LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
@@
-64,7
+64,7
@@
void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData,
HIDInterfaceInfo->Config.PrevReportINBufferSize);
}
memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData,
HIDInterfaceInfo->Config.PrevReportINBufferSize);
}
-
+
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
Endpoint_ClearSETUP();
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
Endpoint_ClearSETUP();
@@
-84,7
+84,7
@@
void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearIN();
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearIN();
-
+
CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType,
&ReportData[ReportID ? 1 : 0], ReportSize - (ReportID ? 1 : 0));
}
CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType,
&ReportData[ReportID ? 1 : 0], ReportSize - (ReportID ? 1 : 0));
}
diff --git
a/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
b/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
index
3509780
..
603b05f
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
+++ b/
LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
@@
-91,7
+91,7
@@
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
-
+
struct
{
// No state information for this class
struct
{
// No state information for this class
diff --git
a/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
b/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
index
1e3fe34
..
d95b95e
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
+++ b/
LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c
@@
-160,7
+160,7
@@
static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInte
uint16_t BytesProcessed;
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
uint16_t BytesProcessed;
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
-
+
BytesProcessed = 0;
while (Endpoint_Read_Stream_LE(&MSInterfaceInfo->State.CommandBlock,
(sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) ==
BytesProcessed = 0;
while (Endpoint_Read_Stream_LE(&MSInterfaceInfo->State.CommandBlock,
(sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) ==
@@
-231,8
+231,9
@@
static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInt
if (MSInterfaceInfo->State.IsMassStoreReset)
return;
}
if (MSInterfaceInfo->State.IsMassStoreReset)
return;
}
-
+
Endpoint_ClearIN();
}
#endif
Endpoint_ClearIN();
}
#endif
+
diff --git
a/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
b/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
index
12115ee
..
1db5ec4
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
+++ b/
LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c
@@
-238,7
+238,7
@@
void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const
uint16_t ResponseSize;
QUERY_Response->MessageType = CPU_TO_LE32(REMOTE_NDIS_QUERY_CMPLT);
uint16_t ResponseSize;
QUERY_Response->MessageType = CPU_TO_LE32(REMOTE_NDIS_QUERY_CMPLT);
-
+
if (RNDIS_Device_ProcessNDISQuery(RNDISInterfaceInfo, Query_Oid, QueryData, le32_to_cpu(QUERY_Message->InformationBufferLength),
ResponseData, &ResponseSize))
{
if (RNDIS_Device_ProcessNDISQuery(RNDISInterfaceInfo, Query_Oid, QueryData, le32_to_cpu(QUERY_Message->InformationBufferLength),
ResponseData, &ResponseSize))
{
@@
-453,7
+453,7
@@
bool RNDIS_Device_IsPacketReceived(USB_ClassInfo_RNDIS_Device_t* const RNDISInte
{
return false;
}
{
return false;
}
-
+
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
return Endpoint_IsOUTReceived();
}
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
return Endpoint_IsOUTReceived();
}
@@
-467,15
+467,15
@@
uint8_t RNDIS_Device_ReadPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfa
{
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
{
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
-
+
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
-
+
*PacketLength = 0;
if (!(Endpoint_IsOUTReceived()))
return ENDPOINT_RWSTREAM_NoError;
*PacketLength = 0;
if (!(Endpoint_IsOUTReceived()))
return ENDPOINT_RWSTREAM_NoError;
- RNDIS_Packet_Message_t RNDISPacketHeader;
+ RNDIS_Packet_Message_t RNDISPacketHeader;
Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_Packet_Message_t), NULL);
if (le32_to_cpu(RNDISPacketHeader.DataLength) > ETHERNET_FRAME_SIZE_MAX)
Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_Packet_Message_t), NULL);
if (le32_to_cpu(RNDISPacketHeader.DataLength) > ETHERNET_FRAME_SIZE_MAX)
@@
-484,12
+484,12
@@
uint8_t RNDIS_Device_ReadPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfa
return RNDIS_ERROR_LOGICAL_CMD_FAILED;
}
return RNDIS_ERROR_LOGICAL_CMD_FAILED;
}
-
+
*PacketLength = (uint16_t)le32_to_cpu(RNDISPacketHeader.DataLength);
Endpoint_Read_Stream_LE(Buffer, *PacketLength, NULL);
Endpoint_ClearOUT();
*PacketLength = (uint16_t)le32_to_cpu(RNDISPacketHeader.DataLength);
Endpoint_Read_Stream_LE(Buffer, *PacketLength, NULL);
Endpoint_ClearOUT();
-
+
return ENDPOINT_RWSTREAM_NoError;
}
return ENDPOINT_RWSTREAM_NoError;
}
@@
-504,7
+504,7
@@
uint8_t RNDIS_Device_SendPacket(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfa
{
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
{
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
-
+
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber);
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber);
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
diff --git
a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
index
8ff6429
..
2bac70d
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
@@
-443,3
+443,4
@@
static int AOA_Host_getchar_Blocking(FILE* Stream)
\r
#endif
\r
\r
\r
#endif
\r
\r
+
diff --git
a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
index
262ecbe
..
a6d024a
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
+++ b/
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
@@
-325,3
+325,4
@@
\r
/** @} */
\r
\r
\r
/** @} */
\r
\r
+
diff --git
a/LUFA/Drivers/USB/Class/Host/AudioClassHost.c
b/LUFA/Drivers/USB/Class/Host/AudioClassHost.c
index
af6f0ec
..
8caea9b
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/AudioClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/AudioClassHost.c
@@
-68,7
+68,7
@@
uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
return AUDIO_ENUMERROR_NoCompatibleInterfaceFound;
}
return AUDIO_ENUMERROR_NoCompatibleInterfaceFound;
}
- AudioControlInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
+ AudioControlInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
DCOMP_Audio_Host_NextAudioStreamInterface) != DESCRIPTOR_SEARCH_COMP_Found)
if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
DCOMP_Audio_Host_NextAudioStreamInterface) != DESCRIPTOR_SEARCH_COMP_Found)
@@
-78,7
+78,7
@@
uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
}
AudioStreamingInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
}
AudioStreamingInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);
-
+
DataINEndpoint = NULL;
DataOUTEndpoint = NULL;
DataINEndpoint = NULL;
DataOUTEndpoint = NULL;
@@
-125,7
+125,7
@@
uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
{
continue;
}
{
continue;
}
-
+
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
@@
-137,7
+137,7
@@
uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
AudioInterfaceInfo->State.StreamingInterfaceNumber = AudioStreamingInterface->InterfaceNumber;
AudioInterfaceInfo->State.EnabledStreamingAltIndex = AudioStreamingInterface->AlternateSetting;
AudioInterfaceInfo->State.IsActive = true;
AudioInterfaceInfo->State.StreamingInterfaceNumber = AudioStreamingInterface->InterfaceNumber;
AudioInterfaceInfo->State.EnabledStreamingAltIndex = AudioStreamingInterface->AlternateSetting;
AudioInterfaceInfo->State.IsActive = true;
-
+
return AUDIO_ENUMERROR_NoError;
}
return AUDIO_ENUMERROR_NoError;
}
@@
-225,7
+225,7
@@
uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const Audi
RequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT);
else
RequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT);
RequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT);
else
RequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT);
-
+
Pipe_SelectPipe(DataPipeIndex);
EndpointAddress = Pipe_GetBoundEndpointAddress();
Pipe_SelectPipe(DataPipeIndex);
EndpointAddress = Pipe_GetBoundEndpointAddress();
diff --git
a/LUFA/Drivers/USB/Class/Host/AudioClassHost.h
b/LUFA/Drivers/USB/Class/Host/AudioClassHost.h
index
1940c0d
..
781220e
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/AudioClassHost.h
+++ b/
LUFA/Drivers/USB/Class/Host/AudioClassHost.h
@@
-98,7
+98,7
@@
*/
uint8_t ControlInterfaceNumber; /**< Interface index of the Audio Control interface within the attached device. */
uint8_t StreamingInterfaceNumber; /**< Interface index of the Audio Streaming interface within the attached device. */
*/
uint8_t ControlInterfaceNumber; /**< Interface index of the Audio Control interface within the attached device. */
uint8_t StreamingInterfaceNumber; /**< Interface index of the Audio Streaming interface within the attached device. */
-
+
uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */
uint16_t DataINPipeSize; /**< Size in bytes of the Audio interface's IN data pipe. */
uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */
uint16_t DataINPipeSize; /**< Size in bytes of the Audio interface's IN data pipe. */
@@
-331,7
+331,7
@@
const int8_t Sample)
{
(void)AudioInterfaceInfo;
const int8_t Sample)
{
(void)AudioInterfaceInfo;
-
+
Pipe_Write_8(Sample);
if (!(Pipe_IsReadWriteAllowed()))
Pipe_Write_8(Sample);
if (!(Pipe_IsReadWriteAllowed()))
@@
-357,7
+357,7
@@
const int16_t Sample)
{
(void)AudioInterfaceInfo;
const int16_t Sample)
{
(void)AudioInterfaceInfo;
-
+
Pipe_Write_16_LE(Sample);
if (!(Pipe_IsReadWriteAllowed()))
Pipe_Write_16_LE(Sample);
if (!(Pipe_IsReadWriteAllowed()))
@@
-395,7
+395,7
@@
Pipe_Freeze();
}
}
Pipe_Freeze();
}
}
-
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
diff --git
a/LUFA/Drivers/USB/Class/Host/CDCClassHost.c
b/LUFA/Drivers/USB/Class/Host/CDCClassHost.c
index
1844066
..
dfe491a
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/CDCClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/CDCClassHost.c
@@
-145,13
+145,13
@@
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
{
continue;
}
{
continue;
}
-
+
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return CDC_ENUMERROR_PipeConfigurationFailed;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return CDC_ENUMERROR_PipeConfigurationFailed;
}
-
+
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
diff --git
a/LUFA/Drivers/USB/Class/Host/CDCClassHost.h
b/LUFA/Drivers/USB/Class/Host/CDCClassHost.h
index
247bf24
..
3ab0192
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/CDCClassHost.h
+++ b/
LUFA/Drivers/USB/Class/Host/CDCClassHost.h
@@
-334,7
+334,7
@@
#endif
void CDC_Host_Event_Stub(void) ATTR_CONST;
#endif
void CDC_Host_Event_Stub(void) ATTR_CONST;
-
+
void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Host_Event_Stub);
void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Host_Event_Stub);
diff --git
a/LUFA/Drivers/USB/Class/Host/HIDClassHost.c
b/LUFA/Drivers/USB/Class/Host/HIDClassHost.c
index
88e3c49
..
5254f71
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/HIDClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/HIDClassHost.c
@@
-118,7
+118,7
@@
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
{
if (DataOUTEndpoint == NULL)
continue;
{
if (DataOUTEndpoint == NULL)
continue;
-
+
Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
EndpointAddress = DataOUTEndpoint->EndpointAddress;
Token = PIPE_TOKEN_OUT;
@@
-139,7
+139,7
@@
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
{
return HID_ENUMERROR_PipeConfigurationFailed;
}
{
return HID_ENUMERROR_PipeConfigurationFailed;
}
-
+
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
diff --git
a/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c
b/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c
index
109b075
..
6795d2a
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/MIDIClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/MIDIClassHost.c
@@
-171,7
+171,7
@@
void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
#if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
MIDI_Host_Flush(MIDIInterfaceInfo);
#if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
MIDI_Host_Flush(MIDIInterfaceInfo);
- #endif
+ #endif
}
uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
}
uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
diff --git
a/LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c
b/LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c
index
8a69d15
..
7422a5e
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c
@@
-103,7
+103,7
@@
uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
Token = PIPE_TOKEN_OUT;
Type = EP_TYPE_BULK;
DoubleBanked = MSInterfaceInfo->Config.DataOUTPipeDoubleBank;
Token = PIPE_TOKEN_OUT;
Type = EP_TYPE_BULK;
DoubleBanked = MSInterfaceInfo->Config.DataOUTPipeDoubleBank;
-
+
MSInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
else
MSInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
else
@@
-186,7
+186,7
@@
static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
{
return ErrorCode;
}
{
return ErrorCode;
}
-
+
Pipe_ClearOUT();
Pipe_WaitUntilReady();
Pipe_ClearOUT();
Pipe_WaitUntilReady();
@@
-195,14
+195,14
@@
static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
if (BufferPtr != NULL)
{
ErrorCode = MS_Host_SendReceiveData(MSInterfaceInfo, SCSICommandBlock, (void*)BufferPtr);
if (BufferPtr != NULL)
{
ErrorCode = MS_Host_SendReceiveData(MSInterfaceInfo, SCSICommandBlock, (void*)BufferPtr);
-
+
if ((ErrorCode != PIPE_RWSTREAM_NoError) && (ErrorCode != PIPE_RWSTREAM_PipeStalled))
{
Pipe_Freeze();
return ErrorCode;
}
}
if ((ErrorCode != PIPE_RWSTREAM_NoError) && (ErrorCode != PIPE_RWSTREAM_PipeStalled))
{
Pipe_Freeze();
return ErrorCode;
}
}
-
+
MS_CommandStatusWrapper_t SCSIStatusBlock;
return MS_Host_GetReturnedStatus(MSInterfaceInfo, &SCSIStatusBlock);
}
MS_CommandStatusWrapper_t SCSIStatusBlock;
return MS_Host_GetReturnedStatus(MSInterfaceInfo, &SCSIStatusBlock);
}
@@
-348,9
+348,9
@@
uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
-
+
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
-
+
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
diff --git
a/LUFA/Drivers/USB/Class/Host/MassStorageClassHost.h
b/LUFA/Drivers/USB/Class/Host/MassStorageClassHost.h
index
c03ba20
..
772c46b
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.h
+++ b/
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.h
@@
-149,7
+149,7
@@
void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
/** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface
void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
/** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface
- * and readying it for the next Mass Storage command. This should be called after a failed SCSI request to
+ * and readying it for the next Mass Storage command. This should be called after a failed SCSI request to
* ensure the attached Mass Storage device is ready to receive the next command.
*
* \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state.
* ensure the attached Mass Storage device is ready to receive the next command.
*
* \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state.
diff --git
a/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c
b/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c
index
61f1402
..
c06968c
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/RNDISClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/RNDISClassHost.c
@@
-147,13
+147,13
@@
uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfa
{
continue;
}
{
continue;
}
-
+
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return CDC_ENUMERROR_PipeConfigurationFailed;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return CDC_ENUMERROR_PipeConfigurationFailed;
}
-
+
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
@@
-241,7
+241,7
@@
static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const R
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
+
return USB_Host_SendControlRequest(Buffer);
}
return USB_Host_SendControlRequest(Buffer);
}
@@
-259,7
+259,7
@@
static uint8_t RNDIS_GetEncapsulatedResponse(USB_ClassInfo_RNDIS_Host_t* const R
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
+
return USB_Host_SendControlRequest(Buffer);
}
return USB_Host_SendControlRequest(Buffer);
}
diff --git
a/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
b/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
index
31f5813
..
62fe4e5
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
+++ b/
LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
@@
-133,13
+133,13
@@
uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
{
continue;
}
{
continue;
}
-
+
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return SI_ENUMERROR_PipeConfigurationFailed;
}
if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
{
return SI_ENUMERROR_PipeConfigurationFailed;
}
-
+
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
if (InterruptPeriod)
Pipe_SetInterruptPeriod(InterruptPeriod);
}
diff --git
a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
index
7da3bb2
..
97de055
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
+++ b/
LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
@@
-54,7
+54,7
@@
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@
-99,7
+99,7
@@
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
-
+
#if (!defined(NO_INTERNAL_SERIAL) && \
(defined(USB_SERIES_7_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_4_AVR) || \
(defined(USB_SERIES_2_AVR) && (!defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__))) || \
#if (!defined(NO_INTERNAL_SERIAL) && \
(defined(USB_SERIES_7_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_4_AVR) || \
(defined(USB_SERIES_2_AVR) && (!defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__))) || \
@@
-119,7
+119,7
@@
* model.
*/
#define INTERNAL_SERIAL_LENGTH_BITS 80
* model.
*/
#define INTERNAL_SERIAL_LENGTH_BITS 80
-
+
/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
* model.
*/
/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
* model.
*/
@@
-129,8
+129,8
@@
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
- #endif
-
+ #endif
+
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
@@
-221,14
+221,14
@@
{
return (UDADDR & (1 << ADDEN));
}
{
return (UDADDR & (1 << ADDEN));
}
-
+
#if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
#if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
@@
-246,7
+246,7
@@
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
}
#endif
SetGlobalInterruptMask(CurrentGlobalInt);
}
#endif
diff --git
a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
index
0990759
..
ff85e04
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
@@
-268,3
+268,4
@@
uint8_t Endpoint_Null_Stream(uint16_t Length,
#endif
\r
\r
#endif
#endif
\r
\r
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
index
9f7cec1
..
218dcf9
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
@@
-52,7
+52,7
@@
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
UECFG1X = UECFG1XData;
return Endpoint_IsConfigured();
UECFG1X = UECFG1XData;
return Endpoint_IsConfigured();
-#else
+#else
for (uint8_t EPNum = Number; EPNum < ENDPOINT_TOTAL_ENDPOINTS; EPNum++)
{
uint8_t UECFG0XTemp;
for (uint8_t EPNum = Number; EPNum < ENDPOINT_TOTAL_ENDPOINTS; EPNum++)
{
uint8_t UECFG0XTemp;
@@
-60,7
+60,7
@@
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
uint8_t UEIENXTemp;
Endpoint_SelectEndpoint(EPNum);
uint8_t UEIENXTemp;
Endpoint_SelectEndpoint(EPNum);
-
+
if (EPNum == Number)
{
UECFG0XTemp = UECFG0XData;
if (EPNum == Number)
{
UECFG0XTemp = UECFG0XData;
@@
-84,11
+84,11
@@
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
UECFG0X = UECFG0XTemp;
UECFG1X = UECFG1XTemp;
UEIENX = UEIENXTemp;
UECFG0X = UECFG0XTemp;
UECFG1X = UECFG1XTemp;
UEIENX = UEIENXTemp;
-
+
if (!(Endpoint_IsConfigured()))
if (!(Endpoint_IsConfigured()))
- return false;
+ return false;
}
}
-
+
Endpoint_SelectEndpoint(Number);
return true;
#endif
Endpoint_SelectEndpoint(Number);
return true;
#endif
@@
-155,7
+155,7
@@
uint8_t Endpoint_WaitUntilReady(void)
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
-
+
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
diff --git
a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
index
6aff5cc
..
25a0775
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
+++ b/
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
@@
-144,7
+144,7
@@
#endif
/* Public Interface - May be used in end-application: */
#endif
/* Public Interface - May be used in end-application: */
- /* Macros: */
+ /* Macros: */
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
diff --git
a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
index
55cd8f9
..
dde5b1b
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
@@
-254,7
+254,7
@@
static void USB_Host_ResetDevice(void)
USB_Host_ResetBus();
while (!(USB_Host_IsBusResetComplete()));
USB_Host_ResumeBus();
USB_Host_ResetBus();
while (!(USB_Host_IsBusResetComplete()));
USB_Host_ResumeBus();
-
+
USB_Host_ConfigurationNumber = 0;
bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);
USB_Host_ConfigurationNumber = 0;
bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);
diff --git
a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
index
9484abe
..
a484df1
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
@@
-56,7
+56,7
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
Pipe_SetInfiniteINRequests();
return Pipe_IsConfigured();
Pipe_SetInfiniteINRequests();
return Pipe_IsConfigured();
-#else
+#else
for (uint8_t PNum = Number; PNum < PIPE_TOTAL_PIPES; PNum++)
{
uint8_t UPCFG0XTemp;
for (uint8_t PNum = Number; PNum < PIPE_TOTAL_PIPES; PNum++)
{
uint8_t UPCFG0XTemp;
@@
-65,7
+65,7
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
uint8_t UPIENXTemp;
Pipe_SelectPipe(PNum);
uint8_t UPIENXTemp;
Pipe_SelectPipe(PNum);
-
+
if (PNum == Number)
{
UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
if (PNum == Number)
{
UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
@@
-83,7
+83,7
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
if (!(UPCFG1XTemp & (1 << ALLOC)))
continue;
if (!(UPCFG1XTemp & (1 << ALLOC)))
continue;
-
+
Pipe_DisablePipe();
UPCFG1X &= ~(1 << ALLOC);
Pipe_DisablePipe();
UPCFG1X &= ~(1 << ALLOC);
@@
-94,12
+94,12
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
UPIENX = UPIENXTemp;
Pipe_SetInfiniteINRequests();
UPIENX = UPIENXTemp;
Pipe_SetInfiniteINRequests();
-
+
if (!(Pipe_IsConfigured()))
if (!(Pipe_IsConfigured()))
- return false;
+ return false;
}
}
-
- Pipe_SelectPipe(Number);
+
+ Pipe_SelectPipe(Number);
return true;
#endif
}
return true;
#endif
}
diff --git
a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
index
277e282
..
308bd34
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
+++ b/
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
@@
-139,7
+139,7
@@
*/
#define PIPE_TOKEN_OUT (2 << PTOKEN0)
//@}
*/
#define PIPE_TOKEN_OUT (2 << PTOKEN0)
//@}
-
+
/** \name Pipe Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
/** \name Pipe Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
@@
-425,7
+425,7
@@
PIPE_ERRORFLAG_DATATGL)) |
(UPSTAX & (PIPE_ERRORFLAG_OVERFLOW | PIPE_ERRORFLAG_UNDERFLOW)));
}
PIPE_ERRORFLAG_DATATGL)) |
(UPSTAX & (PIPE_ERRORFLAG_OVERFLOW | PIPE_ERRORFLAG_UNDERFLOW)));
}
-
+
/** Retrieves the number of busy banks in the currently selected pipe, which have been queued for
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
/** Retrieves the number of busy banks in the currently selected pipe, which have been queued for
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
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
68f645b
..
55d137b
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c
@@
-81,3
+81,4
@@
uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
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
5d4fc42
..
36685f0
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c
@@
-90,3
+90,4
@@
uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
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
46b0063
..
7ed192d
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c
@@
-86,3
+86,4
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
#undef TEMPLATE_BUFFER_MOVE
#endif
+
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
bc8570d
..
daba216
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c
@@
-48,7
+48,7
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
Length -= *BytesProcessed;
TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed);
}
Length -= *BytesProcessed;
TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed);
}
-
+
while (Length)
{
if (!(Pipe_IsReadWriteAllowed()))
while (Length)
{
if (!(Pipe_IsReadWriteAllowed()))
@@
-85,3
+85,4
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
#undef TEMPLATE_BUFFER_MOVE
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
index
9f688db
..
c660fb3
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
+++ b/
LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
@@
-162,7
+162,7
@@
void USB_ResetInterface(void)
{
#if defined(USB_CAN_BE_HOST)
USB_PLL_On();
{
#if defined(USB_CAN_BE_HOST)
USB_PLL_On();
- while (!(USB_PLL_IsReady()));
+ while (!(USB_PLL_IsReady()));
#endif
}
#endif
}
@@
-191,7
+191,7
@@
static void USB_Init_Device(void)
#if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
USB_Descriptor_Device_t* DeviceDescriptorPtr;
#if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
USB_Descriptor_Device_t* DeviceDescriptorPtr;
-
+
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
uint8_t DescriptorAddressSpace;
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
uint8_t DescriptorAddressSpace;
@@
-215,7
+215,7
@@
static void USB_Init_Device(void)
#else
USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
#endif
#else
USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
#endif
- }
+ }
#endif
#endif
#endif
#endif
@@
-255,7
+255,7
@@
static void USB_Init_Host(void)
USB_INT_Enable(USB_INT_SRPI);
USB_INT_Enable(USB_INT_BCERRI);
USB_INT_Enable(USB_INT_SRPI);
USB_INT_Enable(USB_INT_BCERRI);
-
+
USB_Attach();
}
#endif
USB_Attach();
}
#endif
diff --git
a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
index
6115ec6
..
dad55f1
100644
(file)
--- a/
LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
+++ b/
LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.h
@@
-136,7
+136,7
@@
OTGIEN |= (1 << VBERRE);
break;
case USB_INT_SRPI:
OTGIEN |= (1 << VBERRE);
break;
case USB_INT_SRPI:
- OTGIEN |= (1 << SRPE);
+ OTGIEN |= (1 << SRPE);
break;
#endif
}
break;
#endif
}
@@
-194,12
+194,12
@@
OTGIEN &= ~(1 << VBERRE);
break;
case USB_INT_SRPI:
OTGIEN &= ~(1 << VBERRE);
break;
case USB_INT_SRPI:
- OTGIEN &= ~(1 << SRPE);
+ OTGIEN &= ~(1 << SRPE);
break;
#endif
}
}
break;
#endif
}
}
-
+
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
@@
-257,7
+257,7
@@
#endif
}
}
#endif
}
}
-
+
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
@@
-300,10
+300,10
@@
return (OTGIEN & (1 << SRPE));
#endif
}
return (OTGIEN & (1 << SRPE));
#endif
}
-
+
return false;
}
return false;
}
-
+
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
diff --git
a/LUFA/Drivers/USB/Core/ConfigDescriptor.h
b/LUFA/Drivers/USB/Core/ConfigDescriptor.h
index
b34937a
..
361ffa0
100644
(file)
--- a/
LUFA/Drivers/USB/Core/ConfigDescriptor.h
+++ b/
LUFA/Drivers/USB/Core/ConfigDescriptor.h
@@
-52,7
+52,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "HostStandardReq.h"
#include "StdDescriptors.h"
#include "HostStandardReq.h"
#include "StdDescriptors.h"
@@
-266,7
+266,7
@@
void** CurrConfigLoc)
{
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
void** CurrConfigLoc)
{
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
-
+
if (*BytesRem < CurrDescriptorSize)
CurrDescriptorSize = *BytesRem;
if (*BytesRem < CurrDescriptorSize)
CurrDescriptorSize = *BytesRem;
diff --git
a/LUFA/Drivers/USB/Core/Device.h
b/LUFA/Drivers/USB/Core/Device.h
index
ad837e1
..
fcc1b1c
100644
(file)
--- a/
LUFA/Drivers/USB/Core/Device.h
+++ b/
LUFA/Drivers/USB/Core/Device.h
@@
-51,7
+51,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "StdDescriptors.h"
#include "USBInterrupt.h"
#include "Endpoint.h"
#include "StdDescriptors.h"
#include "USBInterrupt.h"
#include "Endpoint.h"
@@
-145,7
+145,7
@@
#elif (ARCH == ARCH_UC3)
#include "UC3/Device_UC3.h"
#elif (ARCH == ARCH_XMEGA)
#elif (ARCH == ARCH_UC3)
#include "UC3/Device_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/Device_XMEGA.h"
+ #include "XMEGA/Device_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
#endif
/* Disable C linkage for C++ Compilers: */
diff --git
a/LUFA/Drivers/USB/Core/DeviceStandardReq.c
b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index
59d3f28
..
5e89659
100644
(file)
--- a/
LUFA/Drivers/USB/Core/DeviceStandardReq.c
+++ b/
LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@
-124,7
+124,7
@@
static void USB_Device_SetAddress(void)
uint8_t DeviceAddress = (USB_ControlRequest.wValue & 0x7F);
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint8_t DeviceAddress = (USB_ControlRequest.wValue & 0x7F);
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
Endpoint_ClearSETUP();
Endpoint_ClearStatusStage();
Endpoint_ClearSETUP();
Endpoint_ClearStatusStage();
@@
-133,7
+133,7
@@
static void USB_Device_SetAddress(void)
USB_Device_SetDeviceAddress(DeviceAddress);
USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
USB_Device_SetDeviceAddress(DeviceAddress);
USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
}
SetGlobalInterruptMask(CurrentGlobalInt);
}
@@
-156,7
+156,7
@@
static void USB_Device_SetConfiguration(void)
uint8_t MemoryAddressSpace;
#endif
#endif
uint8_t MemoryAddressSpace;
#endif
#endif
-
+
if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
@@
-185,7
+185,7
@@
static void USB_Device_SetConfiguration(void)
}
#else
if ((uint8_t)USB_ControlRequest.wValue > DevDescriptorPtr->NumberOfConfigurations)
}
#else
if ((uint8_t)USB_ControlRequest.wValue > DevDescriptorPtr->NumberOfConfigurations)
- return;
+ return;
#endif
#endif
#endif
#endif
@@
-224,7
+224,7
@@
static void USB_Device_GetInternalSerialDescriptor(void)
SignatureDescriptor.Header.Type = DTYPE_String;
SignatureDescriptor.Header.Size = USB_STRING_LEN(INTERNAL_SERIAL_LENGTH_BITS / 4);
SignatureDescriptor.Header.Type = DTYPE_String;
SignatureDescriptor.Header.Size = USB_STRING_LEN(INTERNAL_SERIAL_LENGTH_BITS / 4);
-
+
USB_Device_GetSerialString(SignatureDescriptor.UnicodeString);
Endpoint_ClearSETUP();
USB_Device_GetSerialString(SignatureDescriptor.UnicodeString);
Endpoint_ClearSETUP();
diff --git
a/LUFA/Drivers/USB/Core/DeviceStandardReq.h
b/LUFA/Drivers/USB/Core/DeviceStandardReq.h
index
f47d8f6
..
2369f48
100644
(file)
--- a/
LUFA/Drivers/USB/Core/DeviceStandardReq.h
+++ b/
LUFA/Drivers/USB/Core/DeviceStandardReq.h
@@
-43,7
+43,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "StdDescriptors.h"
#include "Events.h"
#include "StdRequestType.h"
#include "StdDescriptors.h"
#include "Events.h"
#include "StdRequestType.h"
diff --git
a/LUFA/Drivers/USB/Core/Endpoint.h
b/LUFA/Drivers/USB/Core/Endpoint.h
index
1ce7b50
..
8c895fd
100644
(file)
--- a/
LUFA/Drivers/USB/Core/Endpoint.h
+++ b/
LUFA/Drivers/USB/Core/Endpoint.h
@@
-74,7
+74,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git
a/LUFA/Drivers/USB/Core/EndpointStream.h
b/LUFA/Drivers/USB/Core/EndpointStream.h
index
9afb4d2
..
4236253
100644
(file)
--- a/
LUFA/Drivers/USB/Core/EndpointStream.h
+++ b/
LUFA/Drivers/USB/Core/EndpointStream.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-36,7
+36,7
@@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_EndpointRW
+/** \ingroup Group_EndpointRW
* \defgroup Group_EndpointStreamRW Read/Write of Multi-Byte Streams
* \brief Endpoint data stream transmission and reception management.
*
* \defgroup Group_EndpointStreamRW Read/Write of Multi-Byte Streams
* \brief Endpoint data stream transmission and reception management.
*
@@
-44,7
+44,7
@@
* and to endpoints.
*
* @{
* and to endpoints.
*
* @{
- */
+ */
#ifndef __ENDPOINT_STREAM_H__
#define __ENDPOINT_STREAM_H__
#ifndef __ENDPOINT_STREAM_H__
#define __ENDPOINT_STREAM_H__
@@
-89,7
+89,7
@@
* again to process the next chunk of data in the transfer.
*/
};
* again to process the next chunk of data in the transfer.
*/
};
-
+
/** Enum for the possible error return codes of the \c Endpoint_*_Control_Stream_* functions. */
enum Endpoint_ControlStream_RW_ErrorCodes_t
{
/** Enum for the possible error return codes of the \c Endpoint_*_Control_Stream_* functions. */
enum Endpoint_ControlStream_RW_ErrorCodes_t
{
@@
-110,7
+110,7
@@
#elif (ARCH == ARCH_UC3)
#include "UC3/EndpointStream_UC3.h"
#elif (ARCH == ARCH_XMEGA)
#elif (ARCH == ARCH_UC3)
#include "UC3/EndpointStream_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/EndpointStream_XMEGA.h"
+ #include "XMEGA/EndpointStream_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
#endif
/* Disable C linkage for C++ Compilers: */
diff --git
a/LUFA/Drivers/USB/Core/Events.h
b/LUFA/Drivers/USB/Core/Events.h
index
8afd3b5
..
f407661
100644
(file)
--- a/
LUFA/Drivers/USB/Core/Events.h
+++ b/
LUFA/Drivers/USB/Core/Events.h
@@
-217,7
+217,7
@@
void EVENT_USB_Device_Disconnect(void);
/** Event for control requests. This event fires when a the USB host issues a control request
void EVENT_USB_Device_Disconnect(void);
/** Event for control requests. This event fires when a the USB host issues a control request
- * to the mandatory device control endpoint (of address 0). This may either be a standard
+ * to the mandatory device control endpoint (of address 0). This may either be a standard
* request that the library may have a handler code for internally, or a class specific request
* issued to the device which must be handled appropriately. If a request is not processed in the
* user application via this event, it will be passed to the library for processing internally
* request that the library may have a handler code for internally, or a class specific request
* issued to the device which must be handled appropriately. If a request is not processed in the
* user application via this event, it will be passed to the library for processing internally
diff --git
a/LUFA/Drivers/USB/Core/Host.h
b/LUFA/Drivers/USB/Core/Host.h
index
a7e647d
..
adfdc25
100644
(file)
--- a/
LUFA/Drivers/USB/Core/Host.h
+++ b/
LUFA/Drivers/USB/Core/Host.h
@@
-51,7
+51,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@
-108,16
+108,16
@@
* bus address is being set.
*/
HOST_STATE_Default_PostAddressSet = 9, /**< This state indicates that the device's address has now been set, and the
* bus address is being set.
*/
HOST_STATE_Default_PostAddressSet = 9, /**< This state indicates that the device's address has now been set, and the
- * stack is has now completed the device enumeration process. This state causes
+ * stack is has now completed the device enumeration process. This state causes
* the stack to change the current USB device address to that set for the
* connected device, before progressing to the \ref HOST_STATE_Addressed state
* ready for use in the user application.
*/
HOST_STATE_Addressed = 10, /**< Indicates that the device has been enumerated and addressed, and is now waiting
* the stack to change the current USB device address to that set for the
* connected device, before progressing to the \ref HOST_STATE_Addressed state
* ready for use in the user application.
*/
HOST_STATE_Addressed = 10, /**< Indicates that the device has been enumerated and addressed, and is now waiting
- * for the user application to configure the device ready for use.
+ * for the user application to configure the device ready for use.
*/
HOST_STATE_Configured = 11, /**< Indicates that the device has been configured into a valid device configuration,
*/
HOST_STATE_Configured = 11, /**< Indicates that the device has been configured into a valid device configuration,
- * ready for general use by the user application.
+ * ready for general use by the user application.
*/
};
*/
};
diff --git
a/LUFA/Drivers/USB/Core/HostStandardReq.c
b/LUFA/Drivers/USB/Core/HostStandardReq.c
index
bb8ade3
..
cb0bc76
100644
(file)
--- a/
LUFA/Drivers/USB/Core/HostStandardReq.c
+++ b/
LUFA/Drivers/USB/Core/HostStandardReq.c
@@
-65,9
+65,9
@@
uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
uint8_t* HeaderStream = (uint8_t*)&USB_ControlRequest;
for (uint8_t HeaderByte = 0; HeaderByte < sizeof(USB_Request_Header_t); HeaderByte++)
uint8_t* HeaderStream = (uint8_t*)&USB_ControlRequest;
for (uint8_t HeaderByte = 0; HeaderByte < sizeof(USB_Request_Header_t); HeaderByte++)
- Pipe_Write_8(*(HeaderStream++));
+ Pipe_Write_8(*(HeaderStream++));
#endif
#endif
-
+
Pipe_ClearSETUP();
if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_SetupSent)) != HOST_SENDCONTROL_Successful)
Pipe_ClearSETUP();
if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_SetupSent)) != HOST_SENDCONTROL_Successful)
@@
-201,7
+201,7
@@
uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber)
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
+
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) == HOST_SENDCONTROL_Successful)
{
USB_Host_ConfigurationNumber = ConfigNumber;
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) == HOST_SENDCONTROL_Successful)
{
USB_Host_ConfigurationNumber = ConfigNumber;
diff --git
a/LUFA/Drivers/USB/Core/HostStandardReq.h
b/LUFA/Drivers/USB/Core/HostStandardReq.h
index
7b456c7
..
d076a8a
100644
(file)
--- a/
LUFA/Drivers/USB/Core/HostStandardReq.h
+++ b/
LUFA/Drivers/USB/Core/HostStandardReq.h
@@
-69,7
+69,7
@@
*/
#define USB_HOST_TIMEOUT_MS 1000
#endif
*/
#define USB_HOST_TIMEOUT_MS 1000
#endif
-
+
/* Enums: */
/** Enum for the \ref USB_Host_SendControlRequest() return code, indicating the reason for the error
* if the transfer of the request is unsuccessful.
/* Enums: */
/** Enum for the \ref USB_Host_SendControlRequest() return code, indicating the reason for the error
* if the transfer of the request is unsuccessful.
@@
-101,7
+101,7
@@
* \ingroup Group_Host
*/
extern uint8_t USB_Host_ConfigurationNumber;
* \ingroup Group_Host
*/
extern uint8_t USB_Host_ConfigurationNumber;
-
+
/* Function Prototypes: */
/** Sends the request stored in the \ref USB_ControlRequest global structure to the attached device,
* and transfers the data stored in the buffer to the device, or from the device to the buffer
/* Function Prototypes: */
/** Sends the request stored in the \ref USB_ControlRequest global structure to the attached device,
* and transfers the data stored in the buffer to the device, or from the device to the buffer
@@
-130,7
+130,7
@@
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber);
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
*/
uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber);
-
+
/** Sends a GET CONFIGURATION standard request to the attached device, to retrieve the currently selected
* device configuration index.
*
/** Sends a GET CONFIGURATION standard request to the attached device, to retrieve the currently selected
* device configuration index.
*
@@
-239,7
+239,7
@@
{
return USB_Host_GetDescriptor(DTYPE_Device, 0, DeviceDescriptorPtr, sizeof(USB_Descriptor_Device_t));
}
{
return USB_Host_GetDescriptor(DTYPE_Device, 0, DeviceDescriptorPtr, sizeof(USB_Descriptor_Device_t));
}
-
+
/** Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor
* of the specified index. This can be used to easily retrieve string descriptors from the device by
* index, after the index is obtained from the Device or Configuration descriptors. This is a convenience
/** Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor
* of the specified index. This can be used to easily retrieve string descriptors from the device by
* index, after the index is obtained from the Device or Configuration descriptors. This is a convenience
diff --git
a/LUFA/Drivers/USB/Core/OTG.h
b/LUFA/Drivers/USB/Core/OTG.h
index
59cb368
..
01cc059
100644
(file)
--- a/
LUFA/Drivers/USB/Core/OTG.h
+++ b/
LUFA/Drivers/USB/Core/OTG.h
@@
-52,8
+52,8
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
-
+ #include "USBMode.h"
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
diff --git
a/LUFA/Drivers/USB/Core/PipeStream.h
b/LUFA/Drivers/USB/Core/PipeStream.h
index
5d821f5
..
0712f65
100644
(file)
--- a/
LUFA/Drivers/USB/Core/PipeStream.h
+++ b/
LUFA/Drivers/USB/Core/PipeStream.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-27,7
+27,7
@@
arising out of or in connection with the use or performance of
this software.
*/
arising out of or in connection with the use or performance of
this software.
*/
-
+
/** \file
* \brief Pipe data stream transmission and reception management.
* \copydetails Group_PipeStreamRW
/** \file
* \brief Pipe data stream transmission and reception management.
* \copydetails Group_PipeStreamRW
@@
-36,7
+36,7
@@
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
* dispatch header located in LUFA/Drivers/USB/USB.h.
*/
-/** \ingroup Group_PipeRW
+/** \ingroup Group_PipeRW
* \defgroup Group_PipeStreamRW Read/Write of Multi-Byte Streams
* \brief Pipe data stream transmission and reception management.
*
* \defgroup Group_PipeStreamRW Read/Write of Multi-Byte Streams
* \brief Pipe data stream transmission and reception management.
*
@@
-52,7
+52,7
@@
/* Includes: */
#include "../../../Common/Common.h"
#include "USBMode.h"
/* Includes: */
#include "../../../Common/Common.h"
#include "USBMode.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@
-62,17
+62,17
@@
#if !defined(__INCLUDE_FROM_USB_DRIVER)
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
#endif
#if !defined(__INCLUDE_FROM_USB_DRIVER)
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
#endif
-
+
/* Public Interface - May be used in end-application: */
/* Enums: */
/** Enum for the possible error return codes of the Pipe_*_Stream_* functions. */
enum Pipe_Stream_RW_ErrorCodes_t
{
PIPE_RWSTREAM_NoError = 0, /**< Command completed successfully, no error. */
/* Public Interface - May be used in end-application: */
/* Enums: */
/** Enum for the possible error return codes of the Pipe_*_Stream_* functions. */
enum Pipe_Stream_RW_ErrorCodes_t
{
PIPE_RWSTREAM_NoError = 0, /**< Command completed successfully, no error. */
- PIPE_RWSTREAM_PipeStalled = 1, /**< The device stalled the pipe during the transfer. */
+ PIPE_RWSTREAM_PipeStalled = 1, /**< The device stalled the pipe during the transfer. */
PIPE_RWSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
* the transfer.
PIPE_RWSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
* the transfer.
- */
+ */
PIPE_RWSTREAM_Timeout = 3, /**< The device failed to accept or send the next packet
* within the software timeout period set by the
* \ref USB_STREAM_TIMEOUT_MS macro.
PIPE_RWSTREAM_Timeout = 3, /**< The device failed to accept or send the next packet
* within the software timeout period set by the
* \ref USB_STREAM_TIMEOUT_MS macro.
@@
-93,7
+93,7
@@
#if defined(__cplusplus)
}
#endif
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
#endif
/** @} */
diff --git
a/LUFA/Drivers/USB/Core/StdDescriptors.h
b/LUFA/Drivers/USB/Core/StdDescriptors.h
index
f5bacf8
..
6bece18
100644
(file)
--- a/
LUFA/Drivers/USB/Core/StdDescriptors.h
+++ b/
LUFA/Drivers/USB/Core/StdDescriptors.h
@@
-123,7
+123,7
@@
*/
#define USB_CONFIG_ATTR_REMOTEWAKEUP 0x20
//@}
*/
#define USB_CONFIG_ATTR_REMOTEWAKEUP 0x20
//@}
-
+
/** \name Endpoint Descriptor Attribute Masks */
//@{
/** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's
/** \name Endpoint Descriptor Attribute Masks */
//@{
/** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's
@@
-154,7
+154,7
@@
*/
#define ENDPOINT_ATTR_SYNC (3 << 2)
//@}
*/
#define ENDPOINT_ATTR_SYNC (3 << 2)
//@}
-
+
/** \name Endpoint Descriptor Usage Masks */
//@{
/** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's
/** \name Endpoint Descriptor Usage Masks */
//@{
/** Can be masked with other endpoint descriptor attributes for a \ref USB_Descriptor_Endpoint_t descriptor's
@@
-178,7
+178,7
@@
*/
#define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (2 << 4)
//@}
*/
#define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (2 << 4)
//@}
-
+
/* Enums: */
/** Enum for the possible standard descriptor types, as given in each descriptor's header. */
enum USB_DescriptorTypes_t
/* Enums: */
/** Enum for the possible standard descriptor types, as given in each descriptor's header. */
enum USB_DescriptorTypes_t
diff --git
a/LUFA/Drivers/USB/Core/StdRequestType.h
b/LUFA/Drivers/USB/Core/StdRequestType.h
index
e5cadfe
..
47d6ae1
100644
(file)
--- a/
LUFA/Drivers/USB/Core/StdRequestType.h
+++ b/
LUFA/Drivers/USB/Core/StdRequestType.h
@@
-51,7
+51,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@
-219,7
+219,7
@@
* via the \ref EVENT_USB_Device_ControlRequest() event when received in
* device mode. */
};
* via the \ref EVENT_USB_Device_ControlRequest() event when received in
* device mode. */
};
-
+
/** Feature Selector values for Set Feature and Clear Feature standard control requests directed to the device, interface
* and endpoint recipients.
*/
/** Feature Selector values for Set Feature and Clear Feature standard control requests directed to the device, interface
* and endpoint recipients.
*/
diff --git
a/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
b/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
index
a26d7c2
..
e79c3b0
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Device_UC3.h
+++ b/
LUFA/Drivers/USB/Core/UC3/Device_UC3.h
@@
-54,7
+54,7
@@
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@
-81,15
+81,15
@@
* USB interface should be initialized in full speed (12Mb/s) mode.
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
* USB interface should be initialized in full speed (12Mb/s) mode.
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
-
+
#if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)
/** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
* USB interface should be initialized in high speed (480Mb/s) mode.
*/
#if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)
/** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
* USB interface should be initialized in high speed (480Mb/s) mode.
*/
- #define USB_DEVICE_OPT_HIGHSPEED (1 << 1)
+ #define USB_DEVICE_OPT_HIGHSPEED (1 << 1)
#endif
//@}
#endif
//@}
-
+
#if (!defined(NO_INTERNAL_SERIAL) && \
(defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || \
defined(__DOXYGEN__)))
#if (!defined(NO_INTERNAL_SERIAL) && \
(defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || \
defined(__DOXYGEN__)))
@@
-103,7
+103,7
@@
* number for the device.
*/
#define USE_INTERNAL_SERIAL 0xDC
* number for the device.
*/
#define USE_INTERNAL_SERIAL 0xDC
-
+
/** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
* model.
*/
/** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
* model.
*/
@@
-119,7
+119,7
@@
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
#endif
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
#endif
-
+
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
@@
-225,7
+225,7
@@
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
uint8_t* SigReadAddress = (uint8_t*)INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
uint8_t* SigReadAddress = (uint8_t*)INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
@@
-243,7
+243,7
@@
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
}
#endif
SetGlobalInterruptMask(CurrentGlobalInt);
}
#endif
diff --git
a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
index
1437087
..
2bf143d
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
+++ b/
LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
@@
-228,3
+228,4
@@
uint8_t Endpoint_Null_Stream(uint16_t Length,
#include "Template/Template_Endpoint_Control_R.c"
\r
\r
#endif
#include "Template/Template_Endpoint_Control_R.c"
\r
\r
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
index
c8e3af7
..
0509494
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
@@
-61,7
+61,7
@@
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
uint32_t UECFG0Temp;
Endpoint_SelectEndpoint(EPNum);
uint32_t UECFG0Temp;
Endpoint_SelectEndpoint(EPNum);
-
+
if (EPNum == Number)
{
UECFG0Temp = UECFG0Data;
if (EPNum == Number)
{
UECFG0Temp = UECFG0Data;
@@
-79,11
+79,11
@@
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
Endpoint_EnableEndpoint();
(&AVR32_USBB.uecfg0)[EPNum] = UECFG0Temp;
Endpoint_EnableEndpoint();
(&AVR32_USBB.uecfg0)[EPNum] = UECFG0Temp;
-
+
if (!(Endpoint_IsConfigured()))
if (!(Endpoint_IsConfigured()))
- return false;
+ return false;
}
}
-
+
Endpoint_SelectEndpoint(Number);
return true;
#endif
Endpoint_SelectEndpoint(Number);
return true;
#endif
@@
-148,7
+148,7
@@
uint8_t Endpoint_WaitUntilReady(void)
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
-
+
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
diff --git
a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
index
0e316c8
..
85f04af
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
+++ b/
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
@@
-119,7
+119,7
@@
#define ENDPOINT_DETAILS_EP5 512, 3
#define ENDPOINT_DETAILS_EP6 512, 3
#define ENDPOINT_DETAILS_EP7 512, 3
#define ENDPOINT_DETAILS_EP5 512, 3
#define ENDPOINT_DETAILS_EP6 512, 3
#define ENDPOINT_DETAILS_EP7 512, 3
- #elif defined(USB_SERIES_UC3B0_AVR32) || defined(USB_SERIES_UC3B1_AVR32)
+ #elif defined(USB_SERIES_UC3B0_AVR32) || defined(USB_SERIES_UC3B1_AVR32)
#define ENDPOINT_DETAILS_MAXEP 7
#define ENDPOINT_DETAILS_EP0 64, 1
#define ENDPOINT_DETAILS_MAXEP 7
#define ENDPOINT_DETAILS_EP0 64, 1
@@
-154,14
+154,14
@@
void Endpoint_ClearEndpoints(void);
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
const uint32_t UECFGXData);
void Endpoint_ClearEndpoints(void);
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
const uint32_t UECFGXData);
-
+
/* External Variables: */
extern volatile uint32_t USB_Endpoint_SelectedEndpoint;
extern volatile uint8_t* USB_Endpoint_FIFOPos[];
#endif
/* Public Interface - May be used in end-application: */
/* External Variables: */
extern volatile uint32_t USB_Endpoint_SelectedEndpoint;
extern volatile uint8_t* USB_Endpoint_FIFOPos[];
#endif
/* Public Interface - May be used in end-application: */
- /* Macros: */
+ /* Macros: */
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
@@
-302,7
+302,7
@@
const uint8_t Banks)
{
return Endpoint_ConfigureEndpoint_Prv(Number, (AVR32_USBB_ALLOC_MASK |
const uint8_t Banks)
{
return Endpoint_ConfigureEndpoint_Prv(Number, (AVR32_USBB_ALLOC_MASK |
- ((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
+ ((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
((uint32_t)(Direction ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
((uint32_t)Banks << AVR32_USBB_EPBK_OFFSET) |
Endpoint_BytesToEPSizeMask(Size))));
((uint32_t)(Direction ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
((uint32_t)Banks << AVR32_USBB_EPBK_OFFSET) |
Endpoint_BytesToEPSizeMask(Size))));
@@
-422,7
+422,7
@@
while ((&AVR32_USBB.UECON0)[USB_Endpoint_SelectedEndpoint].killbk);
}
}
while ((&AVR32_USBB.UECON0)[USB_Endpoint_SelectedEndpoint].killbk);
}
}
-
+
/** Determines if the currently selected endpoint may be read from (if data is waiting in the endpoint
* bank and the endpoint is an OUT direction, or if the bank is not yet full if the endpoint is an IN
* direction). This function will return false if an error has occurred in the endpoint, if the endpoint
/** Determines if the currently selected endpoint may be read from (if data is waiting in the endpoint
* bank and the endpoint is an OUT direction, or if the bank is not yet full if the endpoint is an IN
* direction). This function will return false if an error has occurred in the endpoint, if the endpoint
diff --git
a/LUFA/Drivers/USB/Core/UC3/Host_UC3.c
b/LUFA/Drivers/USB/Core/UC3/Host_UC3.c
index
55cd8f9
..
dde5b1b
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Host_UC3.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Host_UC3.c
@@
-254,7
+254,7
@@
static void USB_Host_ResetDevice(void)
USB_Host_ResetBus();
while (!(USB_Host_IsBusResetComplete()));
USB_Host_ResumeBus();
USB_Host_ResetBus();
while (!(USB_Host_IsBusResetComplete()));
USB_Host_ResumeBus();
-
+
USB_Host_ConfigurationNumber = 0;
bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);
USB_Host_ConfigurationNumber = 0;
bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);
diff --git
a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
index
eca6cb8
..
f447a17
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
@@
-69,7
+69,7
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
uint32_t UPCFG0Temp;
Pipe_SelectPipe(PNum);
uint32_t UPCFG0Temp;
Pipe_SelectPipe(PNum);
-
+
if (PNum == Number)
{
UPCFG0Temp = (AVR32_USBB_ALLOC_MASK |
if (PNum == Number)
{
UPCFG0Temp = (AVR32_USBB_ALLOC_MASK |
@@
-85,7
+85,7
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
if (!(UPCFG0Temp & AVR32_USBB_ALLOC_MASK))
continue;
if (!(UPCFG0Temp & AVR32_USBB_ALLOC_MASK))
continue;
-
+
Pipe_DisablePipe();
(&AVR32_USBB.upcfg0)[PNum] &= ~AVR32_USBB_ALLOC_MASK;
Pipe_DisablePipe();
(&AVR32_USBB.upcfg0)[PNum] &= ~AVR32_USBB_ALLOC_MASK;
@@
-93,12
+93,12
@@
bool Pipe_ConfigurePipe(const uint8_t Number,
(&AVR32_USBB.upcfg0)[PNum] = UPCFG0Temp;
Pipe_SetInfiniteINRequests();
(&AVR32_USBB.upcfg0)[PNum] = UPCFG0Temp;
Pipe_SetInfiniteINRequests();
-
+
if (!(Pipe_IsConfigured()))
if (!(Pipe_IsConfigured()))
- return false;
+ return false;
}
}
-
- Pipe_SelectPipe(Number);
+
+ Pipe_SelectPipe(Number);
return true;
#endif
}
return true;
#endif
}
diff --git
a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
index
d99cfed
..
a047198
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
+++ b/
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
@@
-100,7
+100,7
@@
#if !defined(__DOXYGEN__)
/* Macros: */
#define PIPE_HSB_ADDRESS_SPACE_SIZE (64 * 1024UL)
#if !defined(__DOXYGEN__)
/* Macros: */
#define PIPE_HSB_ADDRESS_SPACE_SIZE (64 * 1024UL)
-
+
/* External Variables: */
extern volatile uint32_t USB_Pipe_SelectedPipe;
extern volatile uint8_t* USB_Pipe_FIFOPos[];
/* External Variables: */
extern volatile uint32_t USB_Pipe_SelectedPipe;
extern volatile uint8_t* USB_Pipe_FIFOPos[];
@@
-146,7
+146,7
@@
*/
#define PIPE_TOKEN_OUT AVR32_USBB_UPCFG0_PTOKEN_OUT
//@}
*/
#define PIPE_TOKEN_OUT AVR32_USBB_UPCFG0_PTOKEN_OUT
//@}
-
+
/** \name Pipe Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
/** \name Pipe Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
@@
-185,7
+185,7
@@
*/
#define PIPE_TOTAL_PIPES 8
#else
*/
#define PIPE_TOTAL_PIPES 8
#else
- #define PIPE_TOTAL_PIPES 7
+ #define PIPE_TOTAL_PIPES 7
#endif
/** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR
#endif
/** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR
@@
-446,7
+446,7
@@
static inline uint8_t Pipe_GetErrorFlags(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetErrorFlags(void)
{
static inline uint8_t Pipe_GetErrorFlags(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetErrorFlags(void)
{
-
+
return (((&AVR32_USBB.uperr0)[USB_Pipe_SelectedPipe] &
(PIPE_ERRORFLAG_CRC16 | PIPE_ERRORFLAG_TIMEOUT |
PIPE_ERRORFLAG_PID | PIPE_ERRORFLAG_DATAPID |
return (((&AVR32_USBB.uperr0)[USB_Pipe_SelectedPipe] &
(PIPE_ERRORFLAG_CRC16 | PIPE_ERRORFLAG_TIMEOUT |
PIPE_ERRORFLAG_PID | PIPE_ERRORFLAG_DATAPID |
@@
-454,7
+454,7
@@
(((&AVR32_USBB.upsta0)[USB_Pipe_SelectedPipe] << 8) &
PIPE_ERRORFLAG_OVERFLOW));
}
(((&AVR32_USBB.upsta0)[USB_Pipe_SelectedPipe] << 8) &
PIPE_ERRORFLAG_OVERFLOW));
}
-
+
/** Retrieves the number of busy banks in the currently selected pipe, which have been queued for
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
/** Retrieves the number of busy banks in the currently selected pipe, which have been queued for
* transmission via the \ref Pipe_ClearOUT() command, or are awaiting acknowledgement via the
* \ref Pipe_ClearIN() command.
@@
-902,7
+902,7
@@
#if !defined(ENDPOINT_CONTROLEP)
#define ENDPOINT_CONTROLEP 0
#endif
#if !defined(ENDPOINT_CONTROLEP)
#define ENDPOINT_CONTROLEP 0
#endif
-
+
/* Inline Functions: */
static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes)
/* Inline Functions: */
static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes)
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
68f645b
..
55d137b
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c
@@
-81,3
+81,4
@@
uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
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
5d4fc42
..
36685f0
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c
@@
-90,3
+90,4
@@
uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
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
46b0063
..
7ed192d
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c
@@
-86,3
+86,4
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
#undef TEMPLATE_BUFFER_MOVE
#endif
+
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
bc8570d
..
daba216
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c
+++ b/
LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c
@@
-48,7
+48,7
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
Length -= *BytesProcessed;
TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed);
}
Length -= *BytesProcessed;
TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed);
}
-
+
while (Length)
{
if (!(Pipe_IsReadWriteAllowed()))
while (Length)
{
if (!(Pipe_IsReadWriteAllowed()))
@@
-85,3
+85,4
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
#undef TEMPLATE_BUFFER_MOVE
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
index
93ed03e
..
965971f
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
+++ b/
LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
@@
-59,7
+59,7
@@
void USB_Init(
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
-
+
#if defined(USB_CAN_BE_BOTH)
if (Mode == USB_MODE_UID)
{
#if defined(USB_CAN_BE_BOTH)
if (Mode == USB_MODE_UID)
{
@@
-73,7
+73,7
@@
void USB_Init(
USB_CurrentMode = Mode;
}
#else
USB_CurrentMode = Mode;
}
#else
- AVR32_USBB.USBCON.uide = false;
+ AVR32_USBB.USBCON.uide = false;
#endif
USB_IsInitialized = true;
#endif
USB_IsInitialized = true;
@@
-172,13
+172,13
@@
static void USB_Init_Device(void)
else
{
#if defined(USB_DEVICE_OPT_HIGHSPEED)
else
{
#if defined(USB_DEVICE_OPT_HIGHSPEED)
- if (USB_Options & USB_DEVICE_OPT_HIGHSPEED)
+ if (USB_Options & USB_DEVICE_OPT_HIGHSPEED)
USB_Device_SetHighSpeed();
else
USB_Device_SetFullSpeed();
#else
USB_Device_SetFullSpeed();
USB_Device_SetHighSpeed();
else
USB_Device_SetFullSpeed();
#else
USB_Device_SetFullSpeed();
- #endif
+ #endif
}
USB_INT_Enable(USB_INT_VBUSTI);
}
USB_INT_Enable(USB_INT_VBUSTI);
diff --git
a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
index
8ec5626
..
3f7ec5f
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
+++ b/
LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
@@
-270,13
+270,13
@@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
- /* Macros: */
+ /* Macros: */
#if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32)
#define USB_CLOCK_REQUIRED_FREQ 12000000UL
#else
#define USB_CLOCK_REQUIRED_FREQ 48000000UL
#endif
#if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32)
#define USB_CLOCK_REQUIRED_FREQ 12000000UL
#else
#define USB_CLOCK_REQUIRED_FREQ 48000000UL
#endif
-
+
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_USB_CONTROLLER_C)
#if defined(USB_CAN_BE_DEVICE)
/* Function Prototypes: */
#if defined(__INCLUDE_FROM_USB_CONTROLLER_C)
#if defined(USB_CAN_BE_DEVICE)
diff --git
a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
index
c4276d9
..
bf6d172
100644
(file)
--- a/
LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
+++ b/
LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.h
@@
-58,7
+58,7
@@
#if !defined(__DOXYGEN__)
/* External Variables: */
extern volatile uint32_t USB_Endpoint_SelectedEndpoint;
#if !defined(__DOXYGEN__)
/* External Variables: */
extern volatile uint32_t USB_Endpoint_SelectedEndpoint;
-
+
/* Enums: */
enum USB_Interrupts_t
{
/* Enums: */
enum USB_Interrupts_t
{
@@
-73,7
+73,7
@@
USB_INT_SOFI = 5,
USB_INT_RXSTPI = 6,
#endif
USB_INT_SOFI = 5,
USB_INT_RXSTPI = 6,
#endif
- #if (defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__))
+ #if (defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__))
USB_INT_HSOFI = 7,
USB_INT_DCONNI = 8,
USB_INT_DDISCI = 9,
USB_INT_HSOFI = 7,
USB_INT_DCONNI = 8,
USB_INT_DDISCI = 9,
@@
-82,11
+82,11
@@
USB_INT_VBERRI = 12,
#endif
};
USB_INT_VBERRI = 12,
#endif
};
-
+
/* Inline Functions: */
static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Enable(const uint8_t Interrupt)
/* Inline Functions: */
static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Enable(const uint8_t Interrupt)
- {
+ {
switch (Interrupt)
{
case USB_INT_VBUSTI:
switch (Interrupt)
{
case USB_INT_VBUSTI:
@@
-189,7
+189,7
@@
#endif
}
}
#endif
}
}
-
+
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
@@
-254,7
+254,7
@@
#endif
}
}
#endif
}
}
-
+
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
@@
-278,7
+278,7
@@
case USB_INT_RXSTPI:
return (&AVR32_USBB.UECON0)[USB_Endpoint_SelectedEndpoint].rxstpe;
#endif
case USB_INT_RXSTPI:
return (&AVR32_USBB.UECON0)[USB_Endpoint_SelectedEndpoint].rxstpe;
#endif
- #if defined(USB_CAN_BE_HOST)
+ #if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI:
return AVR32_USBB.UHINTE.hsofie;
case USB_INT_DCONNI:
case USB_INT_HSOFI:
return AVR32_USBB.UHINTE.hsofie;
case USB_INT_DCONNI:
@@
-293,10
+293,10
@@
return AVR32_USBB.USBCON.vberre;
#endif
}
return AVR32_USBB.USBCON.vberre;
#endif
}
-
+
return false;
}
return false;
}
-
+
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
@@
-360,7
+360,7
@@
#else
ISR(USB_GEN_vect);
#endif
#else
ISR(USB_GEN_vect);
#endif
-
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
diff --git
a/LUFA/Drivers/USB/Core/USBController.h
b/LUFA/Drivers/USB/Core/USBController.h
index
1c44c16
..
1e4f326
100644
(file)
--- a/
LUFA/Drivers/USB/Core/USBController.h
+++ b/
LUFA/Drivers/USB/Core/USBController.h
@@
-50,7
+50,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@
-119,7
+119,7
@@
#elif (ARCH == ARCH_UC3)
#include "UC3/USBController_UC3.h"
#elif (ARCH == ARCH_XMEGA)
#elif (ARCH == ARCH_UC3)
#include "UC3/USBController_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/USBController_XMEGA.h"
+ #include "XMEGA/USBController_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
#endif
/* Disable C linkage for C++ Compilers: */
diff --git
a/LUFA/Drivers/USB/Core/USBInterrupt.h
b/LUFA/Drivers/USB/Core/USBInterrupt.h
index
f0b3181
..
3f88071
100644
(file)
--- a/
LUFA/Drivers/USB/Core/USBInterrupt.h
+++ b/
LUFA/Drivers/USB/Core/USBInterrupt.h
@@
-43,7
+43,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@
-61,7
+61,7
@@
#elif (ARCH == ARCH_UC3)
#include "UC3/USBInterrupt_UC3.h"
#elif (ARCH == ARCH_XMEGA)
#elif (ARCH == ARCH_UC3)
#include "UC3/USBInterrupt_UC3.h"
#elif (ARCH == ARCH_XMEGA)
- #include "XMEGA/USBInterrupt_XMEGA.h"
+ #include "XMEGA/USBInterrupt_XMEGA.h"
#endif
/* Disable C linkage for C++ Compilers: */
#endif
/* Disable C linkage for C++ Compilers: */
diff --git
a/LUFA/Drivers/USB/Core/USBMode.h
b/LUFA/Drivers/USB/Core/USBMode.h
index
debdc2d
..
0013077
100644
(file)
--- a/
LUFA/Drivers/USB/Core/USBMode.h
+++ b/
LUFA/Drivers/USB/Core/USBMode.h
@@
-91,7
+91,7
@@
* (i.e. AT32UC3A0*) when defined.
*/
#define USB_SERIES_UC3A0_AVR
* (i.e. AT32UC3A0*) when defined.
*/
#define USB_SERIES_UC3A0_AVR
-
+
/** Indicates that the target AVR microcontroller belongs to the AVR32 UC3A1 Series USB controller
* (i.e. AT32UC3A1*) when defined.
*/
/** Indicates that the target AVR microcontroller belongs to the AVR32 UC3A1 Series USB controller
* (i.e. AT32UC3A1*) when defined.
*/
@@
-111,7
+111,7
@@
* (i.e. AT32UC3B1*) when defined.
*/
#define USB_SERIES_UC3B1_AVR
* (i.e. AT32UC3B1*) when defined.
*/
#define USB_SERIES_UC3B1_AVR
-
+
/** Indicates that the target AVR microcontroller belongs to the XMEGA A1U Series USB controller
* (i.e. ATXMEGA*A1U) when defined.
*/
/** Indicates that the target AVR microcontroller belongs to the XMEGA A1U Series USB controller
* (i.e. ATXMEGA*A1U) when defined.
*/
@@
-219,7
+219,7
@@
#define USB_SERIES_B3_XMEGA
#define USB_CAN_BE_DEVICE
#endif
#define USB_SERIES_B3_XMEGA
#define USB_CAN_BE_DEVICE
#endif
-
+
#if (defined(USB_CAN_BE_DEVICE) && defined(USB_CAN_BE_HOST))
#define USB_CAN_BE_BOTH
#endif
#if (defined(USB_CAN_BE_DEVICE) && defined(USB_CAN_BE_HOST))
#define USB_CAN_BE_BOTH
#endif
@@
-241,7
+241,7
@@
#undef USB_CAN_BE_BOTH
#endif
#endif
#undef USB_CAN_BE_BOTH
#endif
#endif
-
+
#if (defined(USB_HOST_ONLY) && defined(USB_DEVICE_ONLY))
#error USB_HOST_ONLY and USB_DEVICE_ONLY are mutually exclusive.
#endif
#if (defined(USB_HOST_ONLY) && defined(USB_DEVICE_ONLY))
#error USB_HOST_ONLY and USB_DEVICE_ONLY are mutually exclusive.
#endif
@@
-259,3
+259,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Drivers/USB/Core/USBTask.h
b/LUFA/Drivers/USB/Core/USBTask.h
index
6084268
..
53eb719
100644
(file)
--- a/
LUFA/Drivers/USB/Core/USBTask.h
+++ b/
LUFA/Drivers/USB/Core/USBTask.h
@@
-43,7
+43,7
@@
/* Includes: */
#include "../../../Common/Common.h"
/* Includes: */
#include "../../../Common/Common.h"
- #include "USBMode.h"
+ #include "USBMode.h"
#include "USBController.h"
#include "Events.h"
#include "StdRequestType.h"
#include "USBController.h"
#include "Events.h"
#include "StdRequestType.h"
@@
-81,7
+81,7
@@
extern volatile bool USB_IsInitialized;
/** Structure containing the last received Control request when in Device mode (for use in user-applications
extern volatile bool USB_IsInitialized;
/** Structure containing the last received Control request when in Device mode (for use in user-applications
- * inside of the \ref EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to
+ * inside of the \ref EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to
* issue when in Host mode before calling \ref USB_Host_SendControlRequest().
*
* \note The contents of this structure is automatically endian-corrected for the current CPU architecture.
* issue when in Host mode before calling \ref USB_Host_SendControlRequest().
*
* \note The contents of this structure is automatically endian-corrected for the current CPU architecture.
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
index
91cc595
..
8fefbcb
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
+++ b/
LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
@@
-54,7
+54,7
@@
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
#include "../StdDescriptors.h"
#include "../USBInterrupt.h"
#include "../Endpoint.h"
-
+
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@
-97,7
+97,7
@@
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
*/
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
-
+
#if (!defined(NO_INTERNAL_SERIAL) || defined(__DOXYGEN__))
/** String descriptor index for the device's unique serial number string descriptor within the device.
* This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
#if (!defined(NO_INTERNAL_SERIAL) || defined(__DOXYGEN__))
/** String descriptor index for the device's unique serial number string descriptor within the device.
* This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
@@
-114,7
+114,7
@@
* model.
*/
#define INTERNAL_SERIAL_LENGTH_BITS (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0))))
* model.
*/
#define INTERNAL_SERIAL_LENGTH_BITS (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0))))
-
+
/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
* model.
*/
/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
* model.
*/
@@
-125,7
+125,7
@@
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
#endif
#define INTERNAL_SERIAL_LENGTH_BITS 0
#define INTERNAL_SERIAL_START_ADDRESS 0
#endif
-
+
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
* be taken out of suspended mode, and communications should resume.
@@
-211,17
+211,17
@@
{
return ((USB.ADDR != 0) ? true : false);
}
{
return ((USB.ADDR != 0) ? true : false);
}
-
+
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);
static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
-
+
uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
- {
+ {
uint8_t SerialByte;
NVM.CMD = NVM_CMD_READ_CALIB_ROW_gc;
uint8_t SerialByte;
NVM.CMD = NVM_CMD_READ_CALIB_ROW_gc;
@@
-239,7
+239,7
@@
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ?
(('A' - 10) + SerialByte) : ('0' + SerialByte));
}
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
}
SetGlobalInterruptMask(CurrentGlobalInt);
}
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
index
15ee479
..
feaffd6
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
@@
-268,3
+268,4
@@
uint8_t Endpoint_Null_Stream(uint16_t Length,
#endif
\r
\r
#endif
#endif
\r
\r
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
index
c301cc3
..
e737814
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
@@
-51,13
+51,13
@@
bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Number,
const uint8_t Size)
{
Endpoint_SelectEndpoint(Number | Direction);
const uint8_t Size)
{
Endpoint_SelectEndpoint(Number | Direction);
-
+
USB_Endpoint_SelectedHandle->CTRL = 0;
USB_Endpoint_SelectedHandle->STATUS = (Direction == ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
USB_Endpoint_SelectedHandle->CTRL = Config;
USB_Endpoint_SelectedHandle->CNT = 0;
USB_Endpoint_SelectedHandle->DATAPTR = (intptr_t)USB_Endpoint_SelectedFIFO->Data;
USB_Endpoint_SelectedHandle->CTRL = 0;
USB_Endpoint_SelectedHandle->STATUS = (Direction == ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
USB_Endpoint_SelectedHandle->CTRL = Config;
USB_Endpoint_SelectedHandle->CNT = 0;
USB_Endpoint_SelectedHandle->DATAPTR = (intptr_t)USB_Endpoint_SelectedFIFO->Data;
-
+
USB_Endpoint_SelectedFIFO->Length = (Direction == ENDPOINT_DIR_IN) ? Size : 0;
USB_Endpoint_SelectedFIFO->Position = 0;
USB_Endpoint_SelectedFIFO->Length = (Direction == ENDPOINT_DIR_IN) ? Size : 0;
USB_Endpoint_SelectedFIFO->Position = 0;
@@
-117,7
+117,7
@@
uint8_t Endpoint_WaitUntilReady(void)
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
-
+
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
uint8_t USB_DeviceState_LCL = USB_DeviceState;
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
index
2d4d7be
..
495aa97
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
+++ b/
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
@@
-104,7
+104,7
@@
uint8_t Length;
uint8_t Position;
} Endpoint_FIFO_t;
uint8_t Length;
uint8_t Position;
} Endpoint_FIFO_t;
-
+
typedef struct
{
Endpoint_FIFO_t OUT;
typedef struct
{
Endpoint_FIFO_t OUT;
@@
-143,7
+143,7
@@
#endif
/* Public Interface - May be used in end-application: */
#endif
/* Public Interface - May be used in end-application: */
- /* Macros: */
+ /* Macros: */
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
/** \name Endpoint Bank Mode Masks */
//@{
/** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
@@
-234,7
+234,7
@@
static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber)
{
USB_Endpoint_SelectedEndpoint = EndpointNumber;
static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber)
{
USB_Endpoint_SelectedEndpoint = EndpointNumber;
-
+
if (EndpointNumber & ENDPOINT_DIR_IN)
{
USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].IN;
if (EndpointNumber & ENDPOINT_DIR_IN)
{
USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].IN;
@@
-290,7
+290,7
@@
const uint8_t Banks)
{
uint8_t EPConfigMask = (USB_EP_INTDSBL_bm | Banks | Endpoint_BytesToEPSizeMask(Size));
const uint8_t Banks)
{
uint8_t EPConfigMask = (USB_EP_INTDSBL_bm | Banks | Endpoint_BytesToEPSizeMask(Size));
-
+
// TODO - Fix once limitations are lifted
if ((Banks != ENDPOINT_BANK_SINGLE) || (Size > 64))
return false;
// TODO - Fix once limitations are lifted
if ((Banks != ENDPOINT_BANK_SINGLE) || (Size > 64))
return false;
@@
-307,10
+307,10
@@
EPConfigMask |= USB_EP_TYPE_BULK_gc;
break;
}
EPConfigMask |= USB_EP_TYPE_BULK_gc;
break;
}
-
+
if (Type == EP_TYPE_CONTROL)
Endpoint_ConfigureEndpoint_PRV(Number, (Direction ^ ENDPOINT_DIR_IN), EPConfigMask, Size);
if (Type == EP_TYPE_CONTROL)
Endpoint_ConfigureEndpoint_PRV(Number, (Direction ^ ENDPOINT_DIR_IN), EPConfigMask, Size);
-
+
return Endpoint_ConfigureEndpoint_PRV(Number, Direction, EPConfigMask, Size);
}
return Endpoint_ConfigureEndpoint_PRV(Number, Direction, EPConfigMask, Size);
}
@@
-439,7
+439,7
@@
static inline bool Endpoint_IsINReady(void)
{
Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint | ENDPOINT_DIR_IN);
static inline bool Endpoint_IsINReady(void)
{
Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint | ENDPOINT_DIR_IN);
-
+
return ((USB_Endpoint_SelectedHandle->STATUS & USB_EP_BUSNACK0_bm) ? true : false);
}
return ((USB_Endpoint_SelectedHandle->STATUS & USB_EP_BUSNACK0_bm) ? true : false);
}
@@
-459,7
+459,7
@@
USB_Endpoint_SelectedFIFO->Length = USB_Endpoint_SelectedHandle->CNT;
return true;
}
USB_Endpoint_SelectedFIFO->Length = USB_Endpoint_SelectedHandle->CNT;
return true;
}
-
+
return false;
}
return false;
}
@@
-479,7
+479,7
@@
USB_Endpoint_SelectedFIFO->Length = USB_Endpoint_SelectedHandle->CNT;
return true;
}
USB_Endpoint_SelectedFIFO->Length = USB_Endpoint_SelectedHandle->CNT;
return true;
}
-
+
return false;
}
return false;
}
@@
-523,7
+523,7
@@
*/
static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_ClearOUT(void)
*/
static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE;
static inline void Endpoint_ClearOUT(void)
- {
+ {
USB_Endpoint_SelectedHandle->STATUS &= ~(USB_EP_TRNCOMPL0_bm | USB_EP_BUSNACK0_bm | USB_EP_OVF_bm);
USB_Endpoint_SelectedFIFO->Position = 0;
}
USB_Endpoint_SelectedHandle->STATUS &= ~(USB_EP_TRNCOMPL0_bm | USB_EP_BUSNACK0_bm | USB_EP_OVF_bm);
USB_Endpoint_SelectedFIFO->Position = 0;
}
@@
-543,7
+543,7
@@
static inline void Endpoint_StallTransaction(void)
{
USB_Endpoint_SelectedHandle->CTRL |= USB_EP_STALL_bm;
static inline void Endpoint_StallTransaction(void)
{
USB_Endpoint_SelectedHandle->CTRL |= USB_EP_STALL_bm;
-
+
if ((USB_Endpoint_SelectedHandle->CTRL & USB_EP_TYPE_gm) == USB_EP_TYPE_CONTROL_gc)
{
Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint ^ ENDPOINT_DIR_IN);
if ((USB_Endpoint_SelectedHandle->CTRL & USB_EP_TYPE_gm) == USB_EP_TYPE_CONTROL_gc)
{
Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint ^ ENDPOINT_DIR_IN);
@@
-636,7
+636,7
@@
{
uint16_t Byte0 = Endpoint_Read_8();
uint16_t Byte1 = Endpoint_Read_8();
{
uint16_t Byte0 = Endpoint_Read_8();
uint16_t Byte1 = Endpoint_Read_8();
-
+
return ((Byte1 << 8) | Byte0);
}
return ((Byte1 << 8) | Byte0);
}
@@
-652,7
+652,7
@@
{
uint16_t Byte0 = Endpoint_Read_8();
uint16_t Byte1 = Endpoint_Read_8();
{
uint16_t Byte0 = Endpoint_Read_8();
uint16_t Byte1 = Endpoint_Read_8();
-
+
return ((Byte0 << 8) | Byte1);
}
return ((Byte0 << 8) | Byte1);
}
@@
-709,7
+709,7
@@
uint32_t Byte1 = Endpoint_Read_8();
uint32_t Byte2 = Endpoint_Read_8();
uint32_t Byte3 = Endpoint_Read_8();
uint32_t Byte1 = Endpoint_Read_8();
uint32_t Byte2 = Endpoint_Read_8();
uint32_t Byte3 = Endpoint_Read_8();
-
+
return ((Byte3 << 24) | (Byte2 << 16) | (Byte1 << 8) | Byte0);
}
return ((Byte3 << 24) | (Byte2 << 16) | (Byte1 << 8) | Byte0);
}
@@
-727,7
+727,7
@@
uint32_t Byte1 = Endpoint_Read_8();
uint32_t Byte2 = Endpoint_Read_8();
uint32_t Byte3 = Endpoint_Read_8();
uint32_t Byte1 = Endpoint_Read_8();
uint32_t Byte2 = Endpoint_Read_8();
uint32_t Byte3 = Endpoint_Read_8();
-
+
return ((Byte0 << 24) | (Byte1 << 16) | (Byte2 << 8) | Byte3);
}
return ((Byte0 << 24) | (Byte1 << 16) | (Byte2 << 8) | Byte3);
}
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
b/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
index
4144a06
..
b9d9d76
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
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
68f645b
..
55d137b
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c
@@
-81,3
+81,4
@@
uint8_t TEMPLATE_FUNC_NAME (void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
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
5d4fc42
..
36685f0
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c
@@
-90,3
+90,4
@@
uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
#undef TEMPLATE_TRANSFER_BYTE
#endif
#undef TEMPLATE_TRANSFER_BYTE
#endif
+
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
46b0063
..
7ed192d
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c
@@
-86,3
+86,4
@@
uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer,
#undef TEMPLATE_BUFFER_MOVE
#endif
#undef TEMPLATE_BUFFER_MOVE
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
index
3b77930
..
1d678fb
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
@@
-61,9
+61,9
@@
void USB_Init(
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
-
+
USB_IsInitialized = true;
USB_IsInitialized = true;
-
+
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
@@
-71,7
+71,7
@@
void USB_Init(
USB.CAL0 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL0));
USB.CAL1 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL1));
NVM.CMD = 0;
USB.CAL0 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL0));
USB.CAL1 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL1));
NVM.CMD = 0;
-
+
USB.EPPTR = (intptr_t)&USB_EndpointTable;
USB.CTRLA = (USB_STFRNUM_bm | USB_MAXEP_gm);
USB.EPPTR = (intptr_t)&USB_EndpointTable;
USB.CTRLA = (USB_STFRNUM_bm | USB_MAXEP_gm);
@@
-95,7
+95,7
@@
void USB_Disable(void)
USB_Detach();
USB_Controller_Disable();
USB_Detach();
USB_Controller_Disable();
- USB_IsInitialized = false;
+ USB_IsInitialized = false;
}
void USB_ResetInterface(void)
}
void USB_ResetInterface(void)
@@
-104,14
+104,14
@@
void USB_ResetInterface(void)
CLK.USBCTRL = (((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp);
else
CLK.USBCTRL = (((F_USB / 48000000) - 1) << CLK_USBPSDIV_gp);
CLK.USBCTRL = (((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp);
else
CLK.USBCTRL = (((F_USB / 48000000) - 1) << CLK_USBPSDIV_gp);
-
+
if (USB_Options & USB_OPT_PLLCLKSRC)
CLK.USBCTRL |= (CLK_USBSRC_PLL_gc | CLK_USBSEN_bm);
else
CLK.USBCTRL |= (CLK_USBSRC_RC32M_gc | CLK_USBSEN_bm);
USB_Device_SetDeviceAddress(0);
if (USB_Options & USB_OPT_PLLCLKSRC)
CLK.USBCTRL |= (CLK_USBSRC_PLL_gc | CLK_USBSEN_bm);
else
CLK.USBCTRL |= (CLK_USBSRC_RC32M_gc | CLK_USBSEN_bm);
USB_Device_SetDeviceAddress(0);
-
+
USB_INT_DisableAllInterrupts();
USB_INT_ClearAllInterrupts();
USB_INT_DisableAllInterrupts();
USB_INT_ClearAllInterrupts();
@@
-135,7
+135,7
@@
static void USB_Init_Device(void)
#if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
USB_Descriptor_Device_t* DeviceDescriptorPtr;
#if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
USB_Descriptor_Device_t* DeviceDescriptorPtr;
-
+
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
uint8_t DescriptorAddressSpace;
#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
!(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
uint8_t DescriptorAddressSpace;
@@
-159,7
+159,7
@@
static void USB_Init_Device(void)
#else
USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
#endif
#else
USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
#endif
- }
+ }
#endif
#endif
#endif
#endif
@@
-177,3
+177,4
@@
static void USB_Init_Device(void)
USB_Attach();
}
#endif
USB_Attach();
}
#endif
+
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
index
2c31697
..
77d422a
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
+++ b/
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
@@
-67,12
+67,12
@@
} Endpoints[16];
uint16_t FrameNum;
} ATTR_PACKED USB_EndpointTable_t;
} Endpoints[16];
uint16_t FrameNum;
} ATTR_PACKED USB_EndpointTable_t;
-
+
/* External Variables: */
extern USB_EndpointTable_t USB_EndpointTable;
/* External Variables: */
extern USB_EndpointTable_t USB_EndpointTable;
-
+
#endif
#endif
-
+
/* Includes: */
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
#include "../Device.h"
/* Includes: */
#if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
#include "../Device.h"
@@
-94,7
+94,7
@@
#if !defined(F_USB)
#error F_USB is not defined. You must define F_USB to the frequency of the unprescaled USB controller clock in your project makefile.
#endif
#if !defined(F_USB)
#error F_USB is not defined. You must define F_USB to the frequency of the unprescaled USB controller clock in your project makefile.
#endif
-
+
#if (F_USB % 6000000)
#error Invalid F_USB specified. F_USB must be a multiple of 6MHz for USB Low Speed operation, and a multiple of 48MHz for Full Speed operation.
#endif
#if (F_USB % 6000000)
#error Invalid F_USB specified. F_USB must be a multiple of 6MHz for USB Low Speed operation, and a multiple of 48MHz for Full Speed operation.
#endif
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
index
62fbf2d
..
2dce0e6
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
+++ b/
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
@@
-70,7
+70,7
@@
ISR(USB_BUSEVENT_vect)
if (USB_INT_HasOccurred(USB_INT_BUSEVENTI_Resume))
{
USB_INT_Clear(USB_INT_BUSEVENTI_Resume);
if (USB_INT_HasOccurred(USB_INT_BUSEVENTI_Resume))
{
USB_INT_Clear(USB_INT_BUSEVENTI_Resume);
-
+
if (USB_Device_ConfigurationNumber)
USB_DeviceState = DEVICE_STATE_Configured;
else
if (USB_Device_ConfigurationNumber)
USB_DeviceState = DEVICE_STATE_Configured;
else
@@
-86,7
+86,7
@@
ISR(USB_BUSEVENT_vect)
if (USB_INT_HasOccurred(USB_INT_BUSEVENTI_Reset))
{
USB_INT_Clear(USB_INT_BUSEVENTI_Reset);
if (USB_INT_HasOccurred(USB_INT_BUSEVENTI_Reset))
{
USB_INT_Clear(USB_INT_BUSEVENTI_Reset);
-
+
USB_DeviceState = DEVICE_STATE_Default;
USB_Device_ConfigurationNumber = 0;
USB_DeviceState = DEVICE_STATE_Default;
USB_Device_ConfigurationNumber = 0;
diff --git
a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
index
f27ea60
..
c2436ca
100644
(file)
--- a/
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
+++ b/
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.h
@@
-76,8
+76,8
@@
USB.INTCTRLA |= USB_BUSEVIE_bm;
return;
case USB_INT_SOFI:
USB.INTCTRLA |= USB_BUSEVIE_bm;
return;
case USB_INT_SOFI:
- USB.INTCTRLA |= USB_SOFIE_bm;
- return;
+ USB.INTCTRLA |= USB_SOFIE_bm;
+ return;
}
}
}
}
@@
-90,11
+90,11
@@
USB.INTCTRLA &= ~USB_BUSEVIE_bm;
return;
case USB_INT_SOFI:
USB.INTCTRLA &= ~USB_BUSEVIE_bm;
return;
case USB_INT_SOFI:
- USB.INTCTRLA &= ~USB_SOFIE_bm;
- return;
+ USB.INTCTRLA &= ~USB_SOFIE_bm;
+ return;
}
}
}
}
-
+
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
@@
-110,11
+110,11
@@
USB.INTFLAGSACLR = USB_RSTIF_bm;
return;
case USB_INT_SOFI:
USB.INTFLAGSACLR = USB_RSTIF_bm;
return;
case USB_INT_SOFI:
- USB.INTFLAGSACLR = USB_SOFIF_bm;
- return;
+ USB.INTFLAGSACLR = USB_SOFIF_bm;
+ return;
}
}
}
}
-
+
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
@@
-125,10
+125,10
@@
case USB_INT_SOFI:
return ((USB.INTCTRLA & USB_SOFIE_bm) ? true : false);
}
case USB_INT_SOFI:
return ((USB.INTCTRLA & USB_SOFIE_bm) ? true : false);
}
-
+
return false;
}
return false;
}
-
+
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
@@
-143,7
+143,7
@@
case USB_INT_SOFI:
return ((USB.INTFLAGSACLR & USB_SOFIF_bm) ? true : false);
}
case USB_INT_SOFI:
return ((USB.INTFLAGSACLR & USB_SOFIF_bm) ? true : false);
}
-
+
return false;
}
return false;
}
diff --git
a/LUFA/Drivers/USB/USB.h
b/LUFA/Drivers/USB/USB.h
index
7525529
..
b633336
100644
(file)
--- a/
LUFA/Drivers/USB/USB.h
+++ b/
LUFA/Drivers/USB/USB.h
@@
-392,7
+392,7
@@
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
#include "Core/OTG.h"
#endif
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
#include "Core/OTG.h"
#endif
-
+
#include "Class/AndroidAccessoryClass.h"
#include "Class/AudioClass.h"
#include "Class/CDCClass.h"
#include "Class/AndroidAccessoryClass.h"
#include "Class/AudioClass.h"
#include "Class/CDCClass.h"
diff --git
a/LUFA/Platform/UC3/ClockManagement.h
b/LUFA/Platform/UC3/ClockManagement.h
index
bb5679a
..
ef2a1b5
100644
(file)
--- a/
LUFA/Platform/UC3/ClockManagement.h
+++ b/
LUFA/Platform/UC3/ClockManagement.h
@@
-55,7
+55,7
@@
* {
* // 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 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 CPU clock, switch CPU to it
* AVR32CLK_StartPLL(0, CLOCK_SRC_OSC0, 12000000, F_CPU);
* AVR32CLK_SetCPUClockSource(CLOCK_SRC_PLL0, F_CPU);
@@
-88,7
+88,7
@@
EXOSC_MODE_900KHZ_MAX = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G0, /**< External crystal oscillator equal to or slower than 900KHz. */
EXOSC_MODE_3MHZ_MAX = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G1, /**< External crystal oscillator equal to or slower than 3MHz. */
EXOSC_MODE_8MHZ_MAX = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G2, /**< External crystal oscillator equal to or slower than 8MHz. */
EXOSC_MODE_900KHZ_MAX = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G0, /**< External crystal oscillator equal to or slower than 900KHz. */
EXOSC_MODE_3MHZ_MAX = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G1, /**< External crystal oscillator equal to or slower than 3MHz. */
EXOSC_MODE_8MHZ_MAX = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G2, /**< External crystal oscillator equal to or slower than 8MHz. */
- EXOSC_MODE_8MHZ_OR_MORE = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G3, /**< External crystal oscillator equal to or faster than 8MHz. */
+ EXOSC_MODE_8MHZ_OR_MORE = AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G3, /**< External crystal oscillator equal to or faster than 8MHz. */
};
/** Enum for the possible external oscillator statup times. */
};
/** Enum for the possible external oscillator statup times. */
@@
-102,7
+102,7
@@
EXOSC_START_8192CLK = AVR32_PM_OSCCTRL0_STARTUP_8192_RCOSC, /**< Wait 8192 clock cyles before startup for stability. */
EXOSC_START_16384CLK = AVR32_PM_OSCCTRL0_STARTUP_16384_RCOSC, /**< Wait 16384 clock cyles before startup for stability. */
};
EXOSC_START_8192CLK = AVR32_PM_OSCCTRL0_STARTUP_8192_RCOSC, /**< Wait 8192 clock cyles before startup for stability. */
EXOSC_START_16384CLK = AVR32_PM_OSCCTRL0_STARTUP_16384_RCOSC, /**< Wait 16384 clock cyles before startup for stability. */
};
-
+
/** Enum for the possible module clock sources. */
enum UC3_System_ClockSource_t
{
/** Enum for the possible module clock sources. */
enum UC3_System_ClockSource_t
{
@@
-182,7
+182,7
@@
{
if (SourceFreq > Frequency)
return false;
{
if (SourceFreq > Frequency)
return false;
-
+
switch (Source)
{
case CLOCK_SRC_OSC0:
switch (Source)
{
case CLOCK_SRC_OSC0:
@@
-212,7
+212,7
@@
{
AVR32_PM.PLL[Channel].pllen = false;
}
{
AVR32_PM.PLL[Channel].pllen = false;
}
-
+
/** Starts the given Generic Clock of the UC3 microcontroller, with the given options.
*
* \param[in] Channel Index of the Generic Clock to start.
/** Starts the given Generic Clock of the UC3 microcontroller, with the given options.
*
* \param[in] Channel Index of the Generic Clock to start.
@@
-252,17
+252,17
@@
default:
return false;
}
default:
return false;
}
-
+
if (SourceFreq < Frequency)
return false;
AVR32_PM.GCCTRL[Channel].diven = (SourceFreq > Frequency) ? true : false;
AVR32_PM.GCCTRL[Channel].div = (((SourceFreq / Frequency) - 1) / 2);
AVR32_PM.GCCTRL[Channel].cen = true;
if (SourceFreq < Frequency)
return false;
AVR32_PM.GCCTRL[Channel].diven = (SourceFreq > Frequency) ? true : false;
AVR32_PM.GCCTRL[Channel].div = (((SourceFreq / Frequency) - 1) / 2);
AVR32_PM.GCCTRL[Channel].cen = true;
-
+
return true;
}
return true;
}
-
+
/** Stops the given generic clock of the UC3 microcontroller.
*
* \param[in] Channel Index of the generic clock to stop.
/** Stops the given generic clock of the UC3 microcontroller.
*
* \param[in] Channel Index of the generic clock to stop.
@@
-272,7
+272,7
@@
{
AVR32_PM.GCCTRL[Channel].cen = false;
}
{
AVR32_PM.GCCTRL[Channel].cen = false;
}
-
+
/** Sets the clock source for the main microcontroller core. The given clock source should be configured
* and ready for use before this function is called.
*
/** Sets the clock source for the main microcontroller core. The given clock source should be configured
* and ready for use before this function is called.
*
@@
-310,7
+310,7
@@
default:
return false;
}
default:
return false;
}
-
+
return true;
}
return true;
}
@@
-322,3
+322,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Platform/UC3/InterruptManagement.c
b/LUFA/Platform/UC3/InterruptManagement.c
index
98d1e45
..
ce2a819
100644
(file)
--- a/
LUFA/Platform/UC3/InterruptManagement.c
+++ b/
LUFA/Platform/UC3/InterruptManagement.c
@@
-60,3
+60,4
@@
void INTC_Init(void)
__builtin_mtsr(AVR32_EVBA, (uintptr_t)&EVBA_Table);
}
__builtin_mtsr(AVR32_EVBA, (uintptr_t)&EVBA_Table);
}
+
diff --git
a/LUFA/Platform/UC3/InterruptManagement.h
b/LUFA/Platform/UC3/InterruptManagement.h
index
dd70675
..
6bd7f0a
100644
(file)
--- a/
LUFA/Platform/UC3/InterruptManagement.h
+++ b/
LUFA/Platform/UC3/InterruptManagement.h
@@
-137,7
+137,7
@@
InterruptHandlers[GroupNumber] = Handler;
AVR32_INTC.ipr[GroupNumber] = Autovector_Table[InterruptLevel];
}
InterruptHandlers[GroupNumber] = Handler;
AVR32_INTC.ipr[GroupNumber] = Autovector_Table[InterruptLevel];
}
-
+
/** Retrieves the pending interrupts for a given interrupt group. The result of this function should be masked
* against interrupt request indexes converted to a request line number via the \ref INTC_IRQ_LINE() macro. To
* obtain the group number of a given interrupt request, use the \ref INTC_IRQ_GROUP() macro.
/** Retrieves the pending interrupts for a given interrupt group. The result of this function should be masked
* against interrupt request indexes converted to a request line number via the \ref INTC_IRQ_LINE() macro. To
* obtain the group number of a given interrupt request, use the \ref INTC_IRQ_GROUP() macro.
@@
-151,7
+151,7
@@
{
return AVR32_INTC.irr[GroupNumber];
}
{
return AVR32_INTC.irr[GroupNumber];
}
-
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
@@
-160,3
+160,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/LUFA/Platform/XMEGA/ClockManagement.h
b/LUFA/Platform/XMEGA/ClockManagement.h
index
1305d0e
..
20606a1
100644
(file)
--- 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>
* Usage Example:
* \code
* #include <LUFA/Platform/XMEGA/ClockManagement.h>
- *
+ *
* void main(void)
* {
* // Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it
* XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, 32000000);
* XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL, F_CPU);
* void main(void)
* {
* // Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it
* XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, 32000000);
* XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL, F_CPU);
- *
+ *
* // Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference
* XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
* XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, 48000000);
* // Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference
* XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
* XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, 48000000);
@@
-85,7
+85,7
@@
EXOSC_FREQ_2MHZ_MAX = OSC_FRQRANGE_04TO2_gc, /**< External crystal oscillator equal to or slower than 2MHz. */
EXOSC_FREQ_9MHZ_MAX = OSC_FRQRANGE_2TO9_gc, /**< External crystal oscillator equal to or slower than 9MHz. */
EXOSC_FREQ_12MHZ_MAX = OSC_FRQRANGE_9TO12_gc, /**< External crystal oscillator equal to or slower than 12MHz. */
EXOSC_FREQ_2MHZ_MAX = OSC_FRQRANGE_04TO2_gc, /**< External crystal oscillator equal to or slower than 2MHz. */
EXOSC_FREQ_9MHZ_MAX = OSC_FRQRANGE_2TO9_gc, /**< External crystal oscillator equal to or slower than 9MHz. */
EXOSC_FREQ_12MHZ_MAX = OSC_FRQRANGE_9TO12_gc, /**< External crystal oscillator equal to or slower than 12MHz. */
- EXOSC_FREQ_16MHZ_MAX = OSC_FRQRANGE_12TO16_gc, /**< External crystal oscillator equal to or slower than 16MHz. */
+ EXOSC_FREQ_16MHZ_MAX = OSC_FRQRANGE_12TO16_gc, /**< External crystal oscillator equal to or slower than 16MHz. */
};
/** Enum for the possible external oscillator statup times. */
};
/** Enum for the possible external oscillator statup times. */
@@
-97,7
+97,7
@@
EXOSC_START_1KCLK = OSC_XOSCSEL_XTAL_1KCLK_gc, /**< Wait 1K clock cycles before startup. */
EXOSC_START_16KCLK = OSC_XOSCSEL_XTAL_16KCLK_gc, /**< Wait 16K clock cycles before startup. */
};
EXOSC_START_1KCLK = OSC_XOSCSEL_XTAL_1KCLK_gc, /**< Wait 1K clock cycles before startup. */
EXOSC_START_16KCLK = OSC_XOSCSEL_XTAL_16KCLK_gc, /**< Wait 16K clock cycles before startup. */
};
-
+
/** Enum for the possible module clock sources. */
enum XMEGA_System_ClockSource_t
{
/** Enum for the possible module clock sources. */
enum XMEGA_System_ClockSource_t
{
@@
-132,8
+132,8
@@
{
OSC.XOSCCTRL = (FreqRange | ((Startup == EXOSC_START_32KCLK) ? OSC_X32KLPM_bm : 0) | Startup);
OSC.CTRL |= OSC_XOSCEN_bm;
{
OSC.XOSCCTRL = (FreqRange | ((Startup == EXOSC_START_32KCLK) ? OSC_X32KLPM_bm : 0) | Startup);
OSC.CTRL |= OSC_XOSCEN_bm;
-
- while (!(OSC.STATUS & OSC_XOSCRDY_bm));
+
+ while (!(OSC.STATUS & OSC_XOSCRDY_bm));
return true;
}
return true;
}
@@
-162,14
+162,14
@@
return true;
case CLOCK_SRC_INT_RC32MHZ:
OSC.CTRL |= OSC_RC32MEN_bm;
return true;
case CLOCK_SRC_INT_RC32MHZ:
OSC.CTRL |= OSC_RC32MEN_bm;
- while (!(OSC.STATUS & OSC_RC32MRDY_bm));
+ while (!(OSC.STATUS & OSC_RC32MRDY_bm));
return true;
case CLOCK_SRC_INT_RC32KHZ:
OSC.CTRL |= OSC_RC32KEN_bm;
return true;
case CLOCK_SRC_INT_RC32KHZ:
OSC.CTRL |= OSC_RC32KEN_bm;
- while (!(OSC.STATUS & OSC_RC32KRDY_bm));
+ while (!(OSC.STATUS & OSC_RC32KRDY_bm));
return true;
}
return true;
}
-
+
return false;
}
return false;
}
@@
-178,7
+178,7
@@
* \param[in] Source Internal oscillator to stop, a value from \ref XMEGA_System_ClockSource_t.
*
* \return Boolean \c true if the internal oscillator was successfully stopped, \c false if invalid parameters specified.
* \param[in] Source Internal oscillator to stop, a value from \ref XMEGA_System_ClockSource_t.
*
* \return Boolean \c true if the internal oscillator was successfully stopped, \c false if invalid parameters specified.
- */
+ */
static inline bool XMEGACLK_StopInternalOscillator(const uint8_t Source) ATTR_ALWAYS_INLINE;
static inline bool XMEGACLK_StopInternalOscillator(const uint8_t Source)
{
static inline bool XMEGACLK_StopInternalOscillator(const uint8_t Source) ATTR_ALWAYS_INLINE;
static inline bool XMEGACLK_StopInternalOscillator(const uint8_t Source)
{
@@
-194,7
+194,7
@@
OSC.CTRL &= ~OSC_RC32KEN_bm;
return true;
}
OSC.CTRL &= ~OSC_RC32KEN_bm;
return true;
}
-
+
return false;
}
return false;
}
@@
-216,10
+216,10
@@
const uint32_t Frequency)
{
uint8_t MulFactor = (Frequency / SourceFreq);
const uint32_t Frequency)
{
uint8_t MulFactor = (Frequency / SourceFreq);
-
+
if (SourceFreq > Frequency)
if (SourceFreq > Frequency)
- return false;
-
+ return false;
+
switch (Source)
{
case CLOCK_SRC_INT_RC2MHZ:
switch (Source)
{
case CLOCK_SRC_INT_RC2MHZ:
@@
-236,7
+236,7
@@
}
OSC.CTRL |= OSC_PLLEN_bm;
}
OSC.CTRL |= OSC_PLLEN_bm;
-
+
while (!(OSC.STATUS & OSC_PLLRDY_bm));
return true;
}
while (!(OSC.STATUS & OSC_PLLRDY_bm));
return true;
}
@@
-247,7
+247,7
@@
{
OSC.CTRL &= ~OSC_PLLEN_bm;
}
{
OSC.CTRL &= ~OSC_PLLEN_bm;
}
-
+
/** Starts the DFLL of the XMEGA microcontroller, with the given options.
*
* \param[in] Source RC Clock source for the DFLL, a value from \ref XMEGA_System_ClockSource_t.
/** Starts the DFLL of the XMEGA microcontroller, with the given options.
*
* \param[in] Source RC Clock source for the DFLL, a value from \ref XMEGA_System_ClockSource_t.
@@
-264,7
+264,7
@@
const uint32_t Frequency)
{
uint16_t DFLLCompare = (Frequency / 1000);
const uint32_t Frequency)
{
uint16_t DFLLCompare = (Frequency / 1000);
-
+
switch (Source)
{
case CLOCK_SRC_INT_RC2MHZ:
switch (Source)
{
case CLOCK_SRC_INT_RC2MHZ:
@@
-291,7
+291,7
@@
default:
return false;
}
default:
return false;
}
-
+
return true;
}
return true;
}
@@
-315,7
+315,7
@@
default:
return false;
}
default:
return false;
}
-
+
return true;
}
return true;
}
@@
-333,7
+333,7
@@
const uint32_t SourceFreq)
{
uint8_t ClockSourceMask = 0;
const uint32_t SourceFreq)
{
uint8_t ClockSourceMask = 0;
-
+
switch (Source)
{
case CLOCK_SRC_INT_RC2MHZ:
switch (Source)
{
case CLOCK_SRC_INT_RC2MHZ:
@@
-354,16
+354,16
@@
default:
return false;
}
default:
return false;
}
-
+
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
CCP = CCP_IOREG_gc;
CLK_CTRL = ClockSourceMask;
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
CCP = CCP_IOREG_gc;
CLK_CTRL = ClockSourceMask;
-
+
SetGlobalInterruptMask(CurrentGlobalInt);
SetGlobalInterruptMask(CurrentGlobalInt);
-
- Delay_MS(1);
+
+ Delay_MS(1);
return (CLK.CTRL == ClockSourceMask);
}
return (CLK.CTRL == ClockSourceMask);
}
@@
-375,3
+375,4
@@
#endif
/** @} */
#endif
/** @} */
+
diff --git
a/Projects/AVRISP-MKII/Descriptors.h
b/Projects/AVRISP-MKII/Descriptors.h
index
786e487
..
dd3663c
100644
(file)
--- a/
Projects/AVRISP-MKII/Descriptors.h
+++ b/
Projects/AVRISP-MKII/Descriptors.h
@@
-67,7
+67,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Atmel AVRISP-MKII Interface
USB_Descriptor_Interface_t AVRISP_Interface;
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
// Atmel AVRISP-MKII Interface
USB_Descriptor_Interface_t AVRISP_Interface;
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
index
797fa36
..
7368125
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
@@
-150,7
+150,7
@@
void ISPProtocol_ProgramMemory(uint8_t V2Command)
Endpoint_Read_Stream_LE(&Write_Memory_Params, (sizeof(Write_Memory_Params) -
sizeof(Write_Memory_Params.ProgData)), NULL);
Write_Memory_Params.BytesToWrite = SwapEndian_16(Write_Memory_Params.BytesToWrite);
Endpoint_Read_Stream_LE(&Write_Memory_Params, (sizeof(Write_Memory_Params) -
sizeof(Write_Memory_Params.ProgData)), NULL);
Write_Memory_Params.BytesToWrite = SwapEndian_16(Write_Memory_Params.BytesToWrite);
-
+
if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))
{
Endpoint_ClearOUT();
if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))
{
Endpoint_ClearOUT();
@@
-236,7
+236,7
@@
void ISPProtocol_ProgramMemory(uint8_t V2Command)
/* Must reset the polling address afterwards, so it is not erroneously used for the next byte */
PollAddress = 0;
}
/* Must reset the polling address afterwards, so it is not erroneously used for the next byte */
PollAddress = 0;
}
-
+
/* EEPROM just increments the address each byte, flash needs to increment on each word and
* also check to ensure that a LOAD EXTENDED ADDRESS command is issued each time the extended
* address boundary has been crossed during FLASH memory programming */
/* EEPROM just increments the address each byte, flash needs to increment on each word and
* also check to ensure that a LOAD EXTENDED ADDRESS command is issued each time the extended
* address boundary has been crossed during FLASH memory programming */
@@
-248,7
+248,7
@@
void ISPProtocol_ProgramMemory(uint8_t V2Command)
MustLoadExtendedAddress = true;
}
}
MustLoadExtendedAddress = true;
}
}
-
+
/* If the current page must be committed, send the PROGRAM PAGE command to the target */
if (Write_Memory_Params.ProgrammingMode & PROG_MODE_COMMIT_PAGE_MASK)
{
/* If the current page must be committed, send the PROGRAM PAGE command to the target */
if (Write_Memory_Params.ProgrammingMode & PROG_MODE_COMMIT_PAGE_MASK)
{
@@
-271,7
+271,7
@@
void ISPProtocol_ProgramMemory(uint8_t V2Command)
/* Check to see if the FLASH address has crossed the extended address boundary */
if ((V2Command == CMD_PROGRAM_FLASH_ISP) && !(CurrentAddress & 0xFFFF))
MustLoadExtendedAddress = true;
/* Check to see if the FLASH address has crossed the extended address boundary */
if ((V2Command == CMD_PROGRAM_FLASH_ISP) && !(CurrentAddress & 0xFFFF))
MustLoadExtendedAddress = true;
- }
+ }
Endpoint_Write_8(V2Command);
Endpoint_Write_8(ProgrammingStatus);
Endpoint_Write_8(V2Command);
Endpoint_Write_8(ProgrammingStatus);
@@
-293,7
+293,7
@@
void ISPProtocol_ReadMemory(uint8_t V2Command)
Endpoint_Read_Stream_LE(&Read_Memory_Params, sizeof(Read_Memory_Params), NULL);
Read_Memory_Params.BytesToRead = SwapEndian_16(Read_Memory_Params.BytesToRead);
Endpoint_Read_Stream_LE(&Read_Memory_Params, sizeof(Read_Memory_Params), NULL);
Read_Memory_Params.BytesToRead = SwapEndian_16(Read_Memory_Params.BytesToRead);
-
+
Endpoint_ClearOUT();
Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_ClearOUT();
Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
@@
-526,3
+526,4
@@
void ISPProtocol_DelayMS(uint8_t DelayMS)
}
#endif
}
#endif
+
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
index
a6ec536
..
04bfcb5
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
@@
-178,7
+178,7
@@
void ISPTarget_DisableTargetISP(void)
{
DDRB &= ~((1 << 1) | (1 << 2));
PORTB &= ~((1 << 0) | (1 << 3));
{
DDRB &= ~((1 << 1) | (1 << 2));
PORTB &= ~((1 << 0) | (1 << 3));
-
+
/* Must re-enable rescue clock once software ISP has exited, as the timer for the rescue clock is
* re-purposed for software SPI */
ISPTarget_ConfigureRescueClock();
/* Must re-enable rescue clock once software ISP has exited, as the timer for the rescue clock is
* re-purposed for software SPI */
ISPTarget_ConfigureRescueClock();
@@
-195,7
+195,7
@@
void ISPTarget_ConfigureRescueClock(void)
#if defined(XCK_RESCUE_CLOCK_ENABLE)
/* Configure XCK as an output for the specified AVR model */
DDRD |= (1 << 5);
#if defined(XCK_RESCUE_CLOCK_ENABLE)
/* Configure XCK as an output for the specified AVR model */
DDRD |= (1 << 5);
-
+
/* Start USART to generate a 4MHz clock on the XCK pin */
UBRR1 = ((F_CPU / 2 / ISP_RESCUE_CLOCK_SPEED) - 1);
UCSR1B = (1 << TXEN1);
/* Start USART to generate a 4MHz clock on the XCK pin */
UBRR1 = ((F_CPU / 2 / ISP_RESCUE_CLOCK_SPEED) - 1);
UCSR1B = (1 << TXEN1);
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
index
350283f
..
d8ace7a
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
@@
-113,7
+113,7
@@
if (HardwareSPIMode)
return ~SPI_ReceiveByte();
else
if (HardwareSPIMode)
return ~SPI_ReceiveByte();
else
- return ~ISPTarget_TransferSoftSPIByte(0x00);
+ return ~ISPTarget_TransferSoftSPIByte(0x00);
#endif
}
#endif
}
@@
-135,7
+135,7
@@
if (HardwareSPIMode)
return ~SPI_TransferByte(Byte);
else
if (HardwareSPIMode)
return ~SPI_TransferByte(Byte);
else
- return ~ISPTarget_TransferSoftSPIByte(Byte);
+ return ~ISPTarget_TransferSoftSPIByte(Byte);
#endif
}
#endif
}
diff --git
a/Projects/AVRISP-MKII/Lib/V2Protocol.c
b/Projects/AVRISP-MKII/Lib/V2Protocol.c
index
65e34fa
..
8f00810
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/V2Protocol.c
+++ b/
Projects/AVRISP-MKII/Lib/V2Protocol.c
@@
-61,7
+61,7
@@
void V2Protocol_Init(void)
#endif
V2Params_LoadNonVolatileParamValues();
#endif
V2Params_LoadNonVolatileParamValues();
-
+
#if defined(ENABLE_ISP_PROTOCOL)
ISPTarget_ConfigureRescueClock();
#endif
#if defined(ENABLE_ISP_PROTOCOL)
ISPTarget_ConfigureRescueClock();
#endif
diff --git
a/Projects/AVRISP-MKII/Lib/V2Protocol.h
b/Projects/AVRISP-MKII/Lib/V2Protocol.h
index
33ef431
..
59752e5
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/V2Protocol.h
+++ b/
Projects/AVRISP-MKII/Lib/V2Protocol.h
@@
-40,7
+40,7
@@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
-
+
#include <LUFA/Drivers/USB/USB.h>
#include "../Descriptors.h"
#include <LUFA/Drivers/USB/USB.h>
#include "../Descriptors.h"
@@
-61,11
+61,11
@@
#if defined(USB_SERIES_4_AVR) && ((VTARGET_ADC_CHANNEL == 2) || (VTARGET_ADC_CHANNEL == 3)) && !defined(NO_VTARGET_DETECT)
#error The U4 AVR chips do not contain ADC channels 2 or 3. Please change VTARGET_ADC_CHANNEL or define NO_VTARGET_DETECT in the makefile.
#endif
#if defined(USB_SERIES_4_AVR) && ((VTARGET_ADC_CHANNEL == 2) || (VTARGET_ADC_CHANNEL == 3)) && !defined(NO_VTARGET_DETECT)
#error The U4 AVR chips do not contain ADC channels 2 or 3. Please change VTARGET_ADC_CHANNEL or define NO_VTARGET_DETECT in the makefile.
#endif
-
+
#if defined(VTARGET_USE_INTERNAL_REF)
#undef VTARGET_REF_VOLTS
#define VTARGET_REF_VOLTS 2.56
#if defined(VTARGET_USE_INTERNAL_REF)
#undef VTARGET_REF_VOLTS
#define VTARGET_REF_VOLTS 2.56
-
+
#define VTARGET_REF_MASK ADC_REFERENCE_INT2560MV
#else
#define VTARGET_REF_MASK ADC_REFERENCE_AVCC
#define VTARGET_REF_MASK ADC_REFERENCE_INT2560MV
#else
#define VTARGET_REF_MASK ADC_REFERENCE_AVCC
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
index
8d74dd4
..
526837c
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
@@
-151,7
+151,7
@@
void TINYNVM_DisableTPI(void)
/* Clear the NVMEN bit in the TPI STATUS register to disable TPI mode */
XPROGTarget_SendByte(TPI_CMD_SSTCS | TPI_STATUS_REG);
XPROGTarget_SendByte(0x00);
/* Clear the NVMEN bit in the TPI STATUS register to disable TPI mode */
XPROGTarget_SendByte(TPI_CMD_SSTCS | TPI_STATUS_REG);
XPROGTarget_SendByte(0x00);
-
+
/* Read back the STATUS register, check to see if it took effect */
XPROGTarget_SendByte(TPI_CMD_SLDCS | PDI_RESET_REG);
} while (XPROGTarget_ReceiveByte() != 0x00);
/* Read back the STATUS register, check to see if it took effect */
XPROGTarget_SendByte(TPI_CMD_SLDCS | PDI_RESET_REG);
} while (XPROGTarget_ReceiveByte() != 0x00);
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
index
71fa782
..
d0e6d73
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
@@
-149,7
+149,7
@@
void XMEGANVM_DisablePDI(void)
{
XMEGANVM_WaitWhileNVMBusBusy();
{
XMEGANVM_WaitWhileNVMBusBusy();
- /* Clear the RESET key in the RESET PDI register to allow the XMEGA to run - must perform this until the
+ /* Clear the RESET key in the RESET PDI register to allow the XMEGA to run - must perform this until the
* change takes effect, as in some cases it takes multiple writes (silicon bug?).
*/
do
* change takes effect, as in some cases it takes multiple writes (silicon bug?).
*/
do
@@
-157,7
+157,7
@@
void XMEGANVM_DisablePDI(void)
/* Clear reset register */
XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);
XPROGTarget_SendByte(0x00);
/* Clear reset register */
XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);
XPROGTarget_SendByte(0x00);
-
+
/* Read back the reset register, check to see if it took effect */
XPROGTarget_SendByte(PDI_CMD_LDCS | PDI_RESET_REG);
} while (XPROGTarget_ReceiveByte() != 0x00);
/* Read back the reset register, check to see if it took effect */
XPROGTarget_SendByte(PDI_CMD_LDCS | PDI_RESET_REG);
} while (XPROGTarget_ReceiveByte() != 0x00);
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
index
72cc536
..
132acf1
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
@@
-143,7
+143,7
@@
static void XPROGProtocol_LeaveXPROGMode(void)
TINYNVM_DisableTPI();
#if defined(XCK_RESCUE_CLOCK_ENABLE) && defined(ENABLE_ISP_PROTOCOL)
TINYNVM_DisableTPI();
#if defined(XCK_RESCUE_CLOCK_ENABLE) && defined(ENABLE_ISP_PROTOCOL)
- /* If the XCK rescue clock option is enabled, we need to restart it once the
+ /* If the XCK rescue clock option is enabled, we need to restart it once the
* XPROG mode has been exited, since the XPROG protocol stops it after use. */
ISPTarget_ConfigureRescueClock();
#endif
* XPROG mode has been exited, since the XPROG protocol stops it after use. */
ISPTarget_ConfigureRescueClock();
#endif
@@
-258,7
+258,7
@@
static void XPROGProtocol_WriteMemory(void)
Endpoint_ClearOUT();
Endpoint_WaitUntilReady();
}
Endpoint_ClearOUT();
Endpoint_WaitUntilReady();
}
-
+
Endpoint_ClearOUT();
Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_ClearOUT();
Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index
58df785
..
0ba3c76
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@
-120,7
+120,7
@@
void XPROGTarget_DisableTargetTPI(void)
/* Set all USART lines as inputs, tristate */
DDRD &= ~((1 << 5) | (1 << 3));
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
/* Set all USART lines as inputs, tristate */
DDRD &= ~((1 << 5) | (1 << 3));
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
-
+
/* Tristate target /RESET line */
AUX_LINE_DDR &= ~AUX_LINE_MASK;
AUX_LINE_PORT &= ~AUX_LINE_MASK;
/* Tristate target /RESET line */
AUX_LINE_DDR &= ~AUX_LINE_MASK;
AUX_LINE_PORT &= ~AUX_LINE_MASK;
@@
-164,7
+164,7
@@
void XPROGTarget_SendIdle(void)
/* Switch to Tx mode if currently in Rx mode */
if (!(IsSending))
XPROGTarget_SetTxMode();
/* Switch to Tx mode if currently in Rx mode */
if (!(IsSending))
XPROGTarget_SetTxMode();
-
+
/* Need to do nothing for a full frame to send an IDLE */
for (uint8_t i = 0; i < BITS_IN_USART_FRAME; i++)
{
/* Need to do nothing for a full frame to send an IDLE */
for (uint8_t i = 0; i < BITS_IN_USART_FRAME; i++)
{
diff --git
a/Projects/Benito/Benito.c
b/Projects/Benito/Benito.c
index
2c8f2cd
..
3e63ae1
100644
(file)
--- a/
Projects/Benito/Benito.c
+++ b/
Projects/Benito/Benito.c
@@
-150,7
+150,7
@@
int main(void)
{
break;
}
{
break;
}
-
+
/* Dequeue the already sent byte from the buffer now we have confirmed that no transmission error occurred */
RingBuffer_Remove(&USARTtoUSB_Buffer);
}
/* Dequeue the already sent byte from the buffer now we have confirmed that no transmission error occurred */
RingBuffer_Remove(&USARTtoUSB_Buffer);
}
diff --git
a/Projects/HIDReportViewer/HIDReportViewer.c
b/Projects/HIDReportViewer/HIDReportViewer.c
index
f3126c0
..
14302c2
100644
(file)
--- a/
Projects/HIDReportViewer/HIDReportViewer.c
+++ b/
Projects/HIDReportViewer/HIDReportViewer.c
@@
-33,7
+33,7
@@
* Main source file for the HIDReportViewer project. This file contains the main tasks of
* the project and is responsible for the initial application hardware configuration.
*/
* Main source file for the HIDReportViewer project. This file contains the main tasks of
* the project and is responsible for the initial application hardware configuration.
*/
-
+
#include "HIDReportViewer.h"
/** Processed HID report descriptor items structure, containing information on each HID report element */
#include "HIDReportViewer.h"
/** Processed HID report descriptor items structure, containing information on each HID report element */
@@
-75,7
+75,7
@@
int main(void)
for (;;)
{
RetrieveDeviceData();
for (;;)
{
RetrieveDeviceData();
-
+
HID_Host_USBTask(&Device_HID_Interface);
USB_USBTask();
}
HID_Host_USBTask(&Device_HID_Interface);
USB_USBTask();
}
@@
-88,12
+88,12
@@
void RetrieveDeviceData(void)
{
if (USB_CurrentMode != USB_MODE_Host)
return;
{
if (USB_CurrentMode != USB_MODE_Host)
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
-
+
OutputReportSizes();
OutputParsedReportItems();
OutputReportSizes();
OutputParsedReportItems();
-
+
LEDs_SetAllLEDs(LEDMASK_USB_READY);
USB_Host_SetDeviceConfiguration(0);
}
LEDs_SetAllLEDs(LEDMASK_USB_READY);
USB_Host_SetDeviceConfiguration(0);
}
@@
-168,7
+168,7
@@
void OutputParsedReportItems(void)
RItem->Attributes.Logical.Maximum,
RItem->Attributes.Physical.Minimum,
RItem->Attributes.Physical.Maximum);
RItem->Attributes.Logical.Maximum,
RItem->Attributes.Physical.Minimum,
RItem->Attributes.Physical.Maximum);
-
+
OutputCollectionPath(RItem->CollectionPath);
}
}
OutputCollectionPath(RItem->CollectionPath);
}
}
@@
-188,10
+188,10
@@
void OutputCollectionPath(const HID_CollectionPath_t* const CollectionPath)
" - Type: 0x%02" PRIX8 "\r\n"
" - Usage: 0x%02" PRIX8 "\r\n"),
CurrentNode->Type, CurrentNode->Usage);
" - Type: 0x%02" PRIX8 "\r\n"
" - Usage: 0x%02" PRIX8 "\r\n"),
CurrentNode->Type, CurrentNode->Usage);
-
+
CurrentNode = CurrentNode->Parent;
}
CurrentNode = CurrentNode->Parent;
}
-
+
printf_P(PSTR(" |\r\n"
" END\r\n"));
}
printf_P(PSTR(" |\r\n"
" END\r\n"));
}
diff --git
a/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
index
0ebc367
..
e77ccc1
100644
(file)
--- a/
Projects/Incomplete/StandaloneProgrammer/Descriptors.h
+++ b/
Projects/Incomplete/StandaloneProgrammer/Descriptors.h
@@
-74,7
+74,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
diff --git
a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
index
96db710
..
1a547eb
100644
(file)
--- a/
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
+++ b/
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
@@
-66,7
+66,7
@@
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
-
+
/* Function Prototypes: */
#if defined(USB_CAN_BE_DEVICE)
void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
/* Function Prototypes: */
#if defined(USB_CAN_BE_DEVICE)
void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
diff --git
a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
index
4d41717
..
82f8832
100644
(file)
--- a/
Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
+++ b/
Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
@@
-190,3
+190,4
@@
FRESULT pf_readdir (DIR*, FILINFO*); /* Read a directory item from the open di
#endif /* _FATFS */
#endif /* _FATFS */
+
diff --git
a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
index
04469ca
..
a6a1c0d
100644
(file)
--- a/
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
+++ b/
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
@@
-288,7
+288,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@
-307,7
+307,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
return false;
}
return false;
}
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@
-341,4
+341,4
@@
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
return true;
}
-#endif
\ No newline at end of file
+#endif
diff --git
a/Projects/LEDNotifier/Descriptors.h
b/Projects/LEDNotifier/Descriptors.h
index
5ce8f34
..
fba6e03
100644
(file)
--- a/
Projects/LEDNotifier/Descriptors.h
+++ b/
Projects/LEDNotifier/Descriptors.h
@@
-65,14
+65,14
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Command Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
// CDC Command Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git
a/Projects/MIDIToneGenerator/MIDIToneGenerator.c
b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
index
851db25
..
a068d75
100644
(file)
--- a/
Projects/MIDIToneGenerator/MIDIToneGenerator.c
+++ b/
Projects/MIDIToneGenerator/MIDIToneGenerator.c
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-90,7
+90,7
@@
int main(void)
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
-
+
for (;;)
{
MIDI_EventPacket_t ReceivedMIDIEvent;
for (;;)
{
MIDI_EventPacket_t ReceivedMIDIEvent;
@@
-99,7
+99,7
@@
int main(void)
if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
DDSNoteData* LRUNoteStruct = &NoteData[0];
if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
DDSNoteData* LRUNoteStruct = &NoteData[0];
-
+
/* Find a free entry in the note table to use for the note being turned on */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
/* Find a free entry in the note table to use for the note being turned on */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
@@
-112,13
+112,13
@@
int main(void)
}
else if (NoteData[i].LRUAge >= LRUNoteStruct->LRUAge)
{
}
else if (NoteData[i].LRUAge >= LRUNoteStruct->LRUAge)
{
- /* If an older entry that the current entry has been found, prefer overwriting that one */
+ /* If an older entry that the current entry has been found, prefer overwriting that one */
LRUNoteStruct = &NoteData[i];
}
LRUNoteStruct = &NoteData[i];
}
-
+
NoteData[i].LRUAge++;
}
NoteData[i].LRUAge++;
}
-
+
/* Update the oldest note entry with the new note data and reset its age */
LRUNoteStruct->Pitch = ReceivedMIDIEvent.Data2;
LRUNoteStruct->TableIncrement = (uint32_t)(BASE_INCREMENT * SCALE_FACTOR) +
/* Update the oldest note entry with the new note data and reset its age */
LRUNoteStruct->Pitch = ReceivedMIDIEvent.Data2;
LRUNoteStruct->TableIncrement = (uint32_t)(BASE_INCREMENT * SCALE_FACTOR) +
@@
-133,7
+133,7
@@
int main(void)
else if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_OFF >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
bool FoundActiveNote = false;
else if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_OFF >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
bool FoundActiveNote = false;
-
+
/* Find the note in the note table to turn off */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
/* Find the note in the note table to turn off */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
@@
-142,13
+142,13
@@
int main(void)
else if (NoteData[i].Pitch)
FoundActiveNote = true;
}
else if (NoteData[i].Pitch)
FoundActiveNote = true;
}
-
+
/* If all notes off, turn off the indicator LED */
if (!(FoundActiveNote))
LEDs_SetAllLEDs(LEDS_NO_LEDS);
}
}
/* If all notes off, turn off the indicator LED */
if (!(FoundActiveNote))
LEDs_SetAllLEDs(LEDS_NO_LEDS);
}
}
-
+
MIDI_Device_USBTask(&Keyboard_MIDI_Interface);
USB_USBTask();
}
MIDI_Device_USBTask(&Keyboard_MIDI_Interface);
USB_USBTask();
}
@@
-158,7
+158,7
@@
int main(void)
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
uint16_t MixedSample = 0;
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
uint16_t MixedSample = 0;
-
+
/* Sum together all the active notes to form a single sample */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
/* Sum together all the active notes to form a single sample */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
@@
-167,13
+167,13
@@
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
/* Use the top 8 bits of the table position as the sample table index */
uint8_t TableIndex = (NoteData[i].TablePosition >> 24);
{
/* Use the top 8 bits of the table position as the sample table index */
uint8_t TableIndex = (NoteData[i].TablePosition >> 24);
-
+
/* Add the new tone sample to the accumulator and increment the table position */
MixedSample += SineTable[TableIndex];
NoteData[i].TablePosition += NoteData[i].TableIncrement;
}
}
/* Add the new tone sample to the accumulator and increment the table position */
MixedSample += SineTable[TableIndex];
NoteData[i].TablePosition += NoteData[i].TableIncrement;
}
}
-
+
/* Output clamped mixed sample value to the PWM */
OCR3A = (MixedSample <= 0xFF) ? MixedSample : 0xFF;
}
/* Output clamped mixed sample value to the PWM */
OCR3A = (MixedSample <= 0xFF) ? MixedSample : 0xFF;
}
@@
-187,7
+187,7
@@
void SetupHardware(void)
/* Disable clock division */
clock_prescale_set(clock_div_1);
/* Disable clock division */
clock_prescale_set(clock_div_1);
-
+
/* Hardware Initialization */
LEDs_Init();
USB_Init();
/* Hardware Initialization */
LEDs_Init();
USB_Init();
@@
-234,7
+234,7
@@
void EVENT_USB_Device_ConfigurationChanged(void)
bool ConfigSuccess = true;
ConfigSuccess &= MIDI_Device_ConfigureEndpoints(&Keyboard_MIDI_Interface);
bool ConfigSuccess = true;
ConfigSuccess &= MIDI_Device_ConfigureEndpoints(&Keyboard_MIDI_Interface);
-
+
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
@@
-243,3
+243,4
@@
void EVENT_USB_Device_ControlRequest(void)
{
MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
}
{
MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
}
+
diff --git
a/Projects/MIDIToneGenerator/MIDIToneGenerator.h
b/Projects/MIDIToneGenerator/MIDIToneGenerator.h
index
cf04b9f
..
333938d
100644
(file)
--- a/
Projects/MIDIToneGenerator/MIDIToneGenerator.h
+++ b/
Projects/MIDIToneGenerator/MIDIToneGenerator.h
@@
-1,7
+1,7
@@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@
-9,13
+9,13
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@
-32,7
+32,7
@@
*
* Header file for AudioOutput.c.
*/
*
* Header file for AudioOutput.c.
*/
-
+
#ifndef _AUDIO_OUTPUT_H_
#define _AUDIO_OUTPUT_H_
#ifndef _AUDIO_OUTPUT_H_
#define _AUDIO_OUTPUT_H_
@@
-45,7
+45,7
@@
#include <stdbool.h>
#include "Descriptors.h"
#include <stdbool.h>
#include "Descriptors.h"
-
+
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Peripheral/ADC.h>
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Peripheral/ADC.h>
@@
-63,27
+63,27
@@
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
-
+
/** Scale factor used to convert the floating point frequencies and ratios into a fixed point number */
#define SCALE_FACTOR 65536
/** Scale factor used to convert the floating point frequencies and ratios into a fixed point number */
#define SCALE_FACTOR 65536
-
+
/** Base (lowest) allowable MIDI note frequency */
#define BASE_FREQUENCY 27.5
/** Base (lowest) allowable MIDI note frequency */
#define BASE_FREQUENCY 27.5
-
+
/** Ratio between each note in an octave */
#define NOTE_OCTIVE_RATIO 1.05946
/** Ratio between each note in an octave */
#define NOTE_OCTIVE_RATIO 1.05946
-
+
/** Lowest valid MIDI pitch index */
#define BASE_PITCH_INDEX 21
/** Lowest valid MIDI pitch index */
#define BASE_PITCH_INDEX 21
-
+
/** Maximum number of MIDI notes that can be played simultaneously */
#define MAX_SIMULTANEOUS_NOTES 3
/** Maximum number of MIDI notes that can be played simultaneously */
#define MAX_SIMULTANEOUS_NOTES 3
-
+
/** Number of samples in the virtual sample table (can be expanded to lower maximum frequency, but allow for
* more simultaneous notes due to the reduced amount of processing time needed when the samples are spaced out)
*/
#define VIRTUAL_SAMPLE_TABLE_SIZE 512
/** Number of samples in the virtual sample table (can be expanded to lower maximum frequency, but allow for
* more simultaneous notes due to the reduced amount of processing time needed when the samples are spaced out)
*/
#define VIRTUAL_SAMPLE_TABLE_SIZE 512
-
+
/** Sample table increments per period for the base MIDI note frequency */
#define BASE_INCREMENT (((F_CPU / VIRTUAL_SAMPLE_TABLE_SIZE / 2) / BASE_FREQUENCY))
/** Sample table increments per period for the base MIDI note frequency */
#define BASE_INCREMENT (((F_CPU / VIRTUAL_SAMPLE_TABLE_SIZE / 2) / BASE_FREQUENCY))
@@
-98,10
+98,11
@@
/* Function Prototypes: */
void SetupHardware(void);
/* Function Prototypes: */
void SetupHardware(void);
-
+
void EVENT_USB_Device_Connect(void);
void EVENT_USB_Device_Disconnect(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
void EVENT_USB_Device_Connect(void);
void EVENT_USB_Device_Disconnect(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
-
+
#endif
#endif
+
diff --git
a/Projects/Magstripe/Descriptors.h
b/Projects/Magstripe/Descriptors.h
index
9a71ada
..
a543658
100644
(file)
--- a/
Projects/Magstripe/Descriptors.h
+++ b/
Projects/Magstripe/Descriptors.h
@@
-50,7
+50,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */
typedef struct
{
USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */
-
+
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */
USB_HID_Descriptor_HID_t HID_KeyboardHID; /**< Keyboard HID descriptor */
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */
USB_HID_Descriptor_HID_t HID_KeyboardHID; /**< Keyboard HID descriptor */
diff --git
a/Projects/MediaController/Descriptors.h
b/Projects/MediaController/Descriptors.h
index
74331c2
..
865b680
100644
(file)
--- a/
Projects/MediaController/Descriptors.h
+++ b/
Projects/MediaController/Descriptors.h
@@
-49,7
+49,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Media Controller HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MediaControlHID;
// Media Controller HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MediaControlHID;
diff --git
a/Projects/MediaController/MediaController.c
b/Projects/MediaController/MediaController.c
index
18f1a03
..
c1ec866
100644
(file)
--- a/
Projects/MediaController/MediaController.c
+++ b/
Projects/MediaController/MediaController.c
@@
-8,7
+8,7
@@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
+
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
diff --git
a/Projects/MissileLauncher/MissileLauncher.c
b/Projects/MissileLauncher/MissileLauncher.c
index
e143bec
..
f215cd3
100644
(file)
--- a/
Projects/MissileLauncher/MissileLauncher.c
+++ b/
Projects/MissileLauncher/MissileLauncher.c
@@
-104,7
+104,7
@@
int main(void)
{
Read_Joystick_Status();
DiscardNextReport();
{
Read_Joystick_Status();
DiscardNextReport();
-
+
USB_USBTask();
}
}
USB_USBTask();
}
}
diff --git
a/Projects/RelayBoard/Descriptors.h
b/Projects/RelayBoard/Descriptors.h
index
ac8a8e0
..
aeabfac
100644
(file)
--- a/
Projects/RelayBoard/Descriptors.h
+++ b/
Projects/RelayBoard/Descriptors.h
@@
-49,7
+49,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Relay Board Interface
USB_Descriptor_Interface_t RelayBoardInterface;
} USB_Descriptor_Configuration_t;
// Relay Board Interface
USB_Descriptor_Interface_t RelayBoardInterface;
} USB_Descriptor_Configuration_t;
diff --git
a/Projects/TempDataLogger/Descriptors.h
b/Projects/TempDataLogger/Descriptors.h
index
0ba6204
..
e311e90
100644
(file)
--- a/
Projects/TempDataLogger/Descriptors.h
+++ b/
Projects/TempDataLogger/Descriptors.h
@@
-43,12
+43,12
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
-
+
// Settings Management Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
// Settings Management Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
diff --git
a/Projects/TempDataLogger/Lib/DS1307.c
b/Projects/TempDataLogger/Lib/DS1307.c
index
2f84a18
..
8dbd596
100644
(file)
--- a/
Projects/TempDataLogger/Lib/DS1307.c
+++ b/
Projects/TempDataLogger/Lib/DS1307.c
@@
-34,7
+34,7
@@
bool DS1307_SetTimeDate(const TimeDate_t* NewTimeDate)
NewRegValues.Byte6.Fields.Month = (NewTimeDate->Month % 10);
NewRegValues.Byte7.Fields.TenYear = (NewTimeDate->Year / 10);
NewRegValues.Byte7.Fields.Year = (NewTimeDate->Year % 10);
NewRegValues.Byte6.Fields.Month = (NewTimeDate->Month % 10);
NewRegValues.Byte7.Fields.TenYear = (NewTimeDate->Year / 10);
NewRegValues.Byte7.Fields.Year = (NewTimeDate->Year % 10);
-
+
// Write the new Time and Date into the DS1307
if (TWI_WritePacket(DS1307_ADDRESS, 10, &WriteAddress, sizeof(WriteAddress),
(uint8_t*)&NewRegValues, sizeof(DS1307_DateTimeRegs_t)) != TWI_ERROR_NoError)
// Write the new Time and Date into the DS1307
if (TWI_WritePacket(DS1307_ADDRESS, 10, &WriteAddress, sizeof(WriteAddress),
(uint8_t*)&NewRegValues, sizeof(DS1307_DateTimeRegs_t)) != TWI_ERROR_NoError)
@@
-51,24
+51,24
@@
bool DS1307_GetTimeDate(TimeDate_t* const TimeDate)
TimeDate->Hour = 1;
TimeDate->Minute = 1;
TimeDate->Second = 1;
TimeDate->Hour = 1;
TimeDate->Minute = 1;
TimeDate->Second = 1;
-
+
TimeDate->Day = 1;
TimeDate->Month = 1;
TimeDate->Year = 1;
TimeDate->Day = 1;
TimeDate->Month = 1;
TimeDate->Year = 1;
-
+
return true;
#endif
DS1307_DateTimeRegs_t CurrentRegValues;
const uint8_t ReadAddress = 0;
return true;
#endif
DS1307_DateTimeRegs_t CurrentRegValues;
const uint8_t ReadAddress = 0;
-
+
// Read in the stored Time and Date from the DS1307
if (TWI_ReadPacket(DS1307_ADDRESS, 10, &ReadAddress, sizeof(ReadAddress),
(uint8_t*)&CurrentRegValues, sizeof(DS1307_DateTimeRegs_t)) != TWI_ERROR_NoError)
{
return false;
}
// Read in the stored Time and Date from the DS1307
if (TWI_ReadPacket(DS1307_ADDRESS, 10, &ReadAddress, sizeof(ReadAddress),
(uint8_t*)&CurrentRegValues, sizeof(DS1307_DateTimeRegs_t)) != TWI_ERROR_NoError)
{
return false;
}
-
+
// Convert stored time value into decimal
TimeDate->Second = (CurrentRegValues.Byte1.Fields.TenSec * 10) + CurrentRegValues.Byte1.Fields.Sec;
TimeDate->Minute = (CurrentRegValues.Byte2.Fields.TenMin * 10) + CurrentRegValues.Byte2.Fields.Min;
// Convert stored time value into decimal
TimeDate->Second = (CurrentRegValues.Byte1.Fields.TenSec * 10) + CurrentRegValues.Byte1.Fields.Sec;
TimeDate->Minute = (CurrentRegValues.Byte2.Fields.TenMin * 10) + CurrentRegValues.Byte2.Fields.Min;
diff --git
a/Projects/TempDataLogger/Lib/DS1307.h
b/Projects/TempDataLogger/Lib/DS1307.h
index
9d93f2c
..
65b8160
100644
(file)
--- a/
Projects/TempDataLogger/Lib/DS1307.h
+++ b/
Projects/TempDataLogger/Lib/DS1307.h
@@
-23,7
+23,7
@@
uint8_t Month;
uint8_t Year;
} TimeDate_t;
uint8_t Month;
uint8_t Year;
} TimeDate_t;
-
+
typedef struct
{
union
typedef struct
{
union
@@
-73,7
+73,7
@@
uint8_t IntVal;
} Byte4;
uint8_t IntVal;
} Byte4;
-
+
union
{
struct
union
{
struct
diff --git
a/Projects/TempDataLogger/Lib/FATFs/ff.c
b/Projects/TempDataLogger/Lib/FATFs/ff.c
index
4f76915
..
1b7c7ca
100644
(file)
--- a/
Projects/TempDataLogger/Lib/FATFs/ff.c
+++ b/
Projects/TempDataLogger/Lib/FATFs/ff.c
@@
-946,7
+946,7
@@
FRESULT remove_chain (
#if _USE_ERASE
if (ecl + 1 == nxt) { /* Next cluster is contiguous */
ecl = nxt;
#if _USE_ERASE
if (ecl + 1 == nxt) { /* Next cluster is contiguous */
ecl = nxt;
- } else { /* End of contiguous clusters */
+ } else { /* End of contiguous clusters */
resion[0] = clust2sect(fs, scl); /* Start sector */
resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
resion[0] = clust2sect(fs, scl); /* Start sector */
resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
@@
-2650,7
+2650,7
@@
FRESULT f_close (
#if _FS_REENTRANT
res = validate(fp->fs, fp->id);
if (res == FR_OK) {
#if _FS_REENTRANT
res = validate(fp->fs, fp->id);
if (res == FR_OK) {
- res = dec_lock(fp->lockid);
+ res = dec_lock(fp->lockid);
unlock_fs(fp->fs, FR_OK);
}
#else
unlock_fs(fp->fs, FR_OK);
}
#else
@@
-2749,7
+2749,7
@@
FRESULT f_getcwd (
res = dir_read(&dj);
if (res != FR_OK) break;
if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
res = dir_read(&dj);
if (res != FR_OK) break;
if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
- res = dir_next(&dj, 0);
+ res = dir_next(&dj, 0);
} while (res == FR_OK);
if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
if (res != FR_OK) break;
} while (res == FR_OK);
if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
if (res != FR_OK) break;
@@
-3978,3
+3978,4
@@
int f_printf (
#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */
#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */
+
diff --git
a/Projects/TempDataLogger/Lib/FATFs/ff.h
b/Projects/TempDataLogger/Lib/FATFs/ff.h
index
a3aad84
..
b6a7471
100644
(file)
--- a/
Projects/TempDataLogger/Lib/FATFs/ff.h
+++ b/
Projects/TempDataLogger/Lib/FATFs/ff.h
@@
-333,3
+333,4
@@
int ff_del_syncobj (_SYNC_t); /* Delete a sync object */
#endif
#endif /* _FATFS */
#endif
#endif /* _FATFS */
+
diff --git
a/Projects/TempDataLogger/Lib/SCSI.c
b/Projects/TempDataLogger/Lib/SCSI.c
index
a13fd1a
..
bf7f5f5
100644
(file)
--- a/
Projects/TempDataLogger/Lib/SCSI.c
+++ b/
Projects/TempDataLogger/Lib/SCSI.c
@@
-287,7
+287,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@
-306,7
+306,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
return false;
}
return false;
}
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@
-340,3
+340,4
@@
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
return true;
}
+
diff --git
a/Projects/TempDataLogger/TempDataLogger.c
b/Projects/TempDataLogger/TempDataLogger.c
index
e8d7987
..
8435541
100644
(file)
--- a/
Projects/TempDataLogger/TempDataLogger.c
+++ b/
Projects/TempDataLogger/TempDataLogger.c
@@
-304,7
+304,7
@@
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
const uint16_t ReportSize)
{
Device_Report_t* ReportParams = (Device_Report_t*)ReportData;
const uint16_t ReportSize)
{
Device_Report_t* ReportParams = (Device_Report_t*)ReportData;
-
+
DS1307_SetTimeDate(&ReportParams->TimeDate);
/* If the logging interval has changed from its current value, write it to EEPROM */
DS1307_SetTimeDate(&ReportParams->TimeDate);
/* If the logging interval has changed from its current value, write it to EEPROM */
diff --git
a/Projects/USBtoSerial/Descriptors.h
b/Projects/USBtoSerial/Descriptors.h
index
5ce8f34
..
fba6e03
100644
(file)
--- a/
Projects/USBtoSerial/Descriptors.h
+++ b/
Projects/USBtoSerial/Descriptors.h
@@
-65,14
+65,14
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Command Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
// CDC Command Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git
a/Projects/USBtoSerial/USBtoSerial.c
b/Projects/USBtoSerial/USBtoSerial.c
index
c34fcf7
..
ad20217
100644
(file)
--- a/
Projects/USBtoSerial/USBtoSerial.c
+++ b/
Projects/USBtoSerial/USBtoSerial.c
@@
-97,7
+97,7
@@
int main(void)
if (!(ReceivedByte < 0))
RingBuffer_Insert(&USBtoUSART_Buffer, ReceivedByte);
}
if (!(ReceivedByte < 0))
RingBuffer_Insert(&USBtoUSART_Buffer, ReceivedByte);
}
-
+
/* Check if the UART receive buffer flush timer has expired or the buffer is nearly full */
uint16_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
if ((TIFR0 & (1 << TOV0)) || (BufferCount > (uint8_t)(sizeof(USARTtoUSB_Buffer_Data) * .75)))
/* Check if the UART receive buffer flush timer has expired or the buffer is nearly full */
uint16_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
if ((TIFR0 & (1 << TOV0)) || (BufferCount > (uint8_t)(sizeof(USARTtoUSB_Buffer_Data) * .75)))
diff --git
a/Projects/Webserver/Descriptors.h
b/Projects/Webserver/Descriptors.h
index
da8456e
..
b1825a0
100644
(file)
--- a/
Projects/Webserver/Descriptors.h
+++ b/
Projects/Webserver/Descriptors.h
@@
-74,7
+74,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// RNDIS CDC Command Interface
USB_Descriptor_Interface_Association_t CDC_IAD;
USB_Descriptor_Interface_t CDC_CCI_Interface;
// RNDIS CDC Command Interface
USB_Descriptor_Interface_Association_t CDC_IAD;
USB_Descriptor_Interface_t CDC_CCI_Interface;
@@
-82,12
+82,12
@@
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// RNDIS CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
// RNDIS CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
diff --git
a/Projects/Webserver/Lib/DHCPCommon.c
b/Projects/Webserver/Lib/DHCPCommon.c
index
dac5fa7
..
818433b
100644
(file)
--- a/
Projects/Webserver/Lib/DHCPCommon.c
+++ b/
Projects/Webserver/Lib/DHCPCommon.c
@@
-100,3
+100,4
@@
bool DHCPCommon_GetOption(const uint8_t* DHCPOptionList,
}
#endif
}
#endif
+
diff --git
a/Projects/Webserver/Lib/DHCPCommon.h
b/Projects/Webserver/Lib/DHCPCommon.h
index
652db68
..
9fc9ad0
100644
(file)
--- a/
Projects/Webserver/Lib/DHCPCommon.h
+++ b/
Projects/Webserver/Lib/DHCPCommon.h
@@
-40,7
+40,7
@@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
-
+
#include <uip.h>
/* Macros: */
#include <uip.h>
/* Macros: */
diff --git
a/Projects/Webserver/Lib/DHCPServerApp.c
b/Projects/Webserver/Lib/DHCPServerApp.c
index
43d539f
..
fadb9e8
100644
(file)
--- a/
Projects/Webserver/Lib/DHCPServerApp.c
+++ b/
Projects/Webserver/Lib/DHCPServerApp.c
@@
-42,20
+42,20
@@
struct uip_conn* BroadcastConnection;
uint8_t LeasedIPs[255 / 8];
struct uip_conn* BroadcastConnection;
uint8_t LeasedIPs[255 / 8];
-
+
/** Initialization function for the DHCP server. */
void DHCPServerApp_Init(void)
{
/* Listen on port 67 for DHCP server connections from hosts */
uip_listen(HTONS(DHCP_SERVER_PORT));
/** Initialization function for the DHCP server. */
void DHCPServerApp_Init(void)
{
/* Listen on port 67 for DHCP server connections from hosts */
uip_listen(HTONS(DHCP_SERVER_PORT));
-
+
/* Create a new UDP connection to the DHCP server port for the DHCP solicitation */
struct uip_udp_conn* BroadcastConnection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCP_CLIENT_PORT));
/* If the connection was successfully created, bind it to the local DHCP client port */
if (BroadcastConnection != NULL)
uip_udp_bind(BroadcastConnection, HTONS(DHCP_SERVER_PORT));
/* Create a new UDP connection to the DHCP server port for the DHCP solicitation */
struct uip_udp_conn* BroadcastConnection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCP_CLIENT_PORT));
/* If the connection was successfully created, bind it to the local DHCP client port */
if (BroadcastConnection != NULL)
uip_udp_bind(BroadcastConnection, HTONS(DHCP_SERVER_PORT));
-
+
/* Set all IP addresses as unleased */
memset(LeasedIPs, 0x00, sizeof(LeasedIPs));
}
/* Set all IP addresses as unleased */
memset(LeasedIPs, 0x00, sizeof(LeasedIPs));
}
@@
-88,8
+88,8
@@
void DHCPServerApp_Callback(void)
/* Try to extract out the client's preferred IP address if it is indicated in the packet */
if (!(DHCPCommon_GetOption(AppData->Options, DHCP_OPTION_REQ_IPADDR, &PreferredClientIP)))
/* Try to extract out the client's preferred IP address if it is indicated in the packet */
if (!(DHCPCommon_GetOption(AppData->Options, DHCP_OPTION_REQ_IPADDR, &PreferredClientIP)))
- memcpy(&PreferredClientIP, &uip_all_zeroes_addr, sizeof(uip_ipaddr_t));
-
+ memcpy(&PreferredClientIP, &uip_all_zeroes_addr, sizeof(uip_ipaddr_t));
+
switch (DHCPMessageType)
{
case DHCP_DISCOVER:
switch (DHCPMessageType)
{
case DHCP_DISCOVER:
@@
-116,7
+116,7
@@
void DHCPServerApp_Callback(void)
/* Check to see if the requested IP address has already been leased to a client */
if (!(DHCPServerApp_CheckIfIPLeased(&PreferredClientIP)))
{
/* Check to see if the requested IP address has already been leased to a client */
if (!(DHCPServerApp_CheckIfIPLeased(&PreferredClientIP)))
{
- /* Create a new DHCP ACK packet to accept the IP address lease */
+ /* Create a new DHCP ACK packet to accept the IP address lease */
AppDataSize += DHCPServerApp_FillDHCPHeader(AppData, DHCP_ACK, &RemoteMACAddress, &PreferredClientIP, TransactionID);
/* Add network mask and router information to the list of DHCP ACK packet options */
AppDataSize += DHCPServerApp_FillDHCPHeader(AppData, DHCP_ACK, &RemoteMACAddress, &PreferredClientIP, TransactionID);
/* Add network mask and router information to the list of DHCP ACK packet options */
@@
-133,12
+133,12
@@
void DHCPServerApp_Callback(void)
/* Create a new DHCP NAK packet to reject the requested allocation */
AppDataSize += DHCPServerApp_FillDHCPHeader(AppData, DHCP_NAK, &RemoteMACAddress, &uip_all_zeroes_addr, TransactionID);
}
/* Create a new DHCP NAK packet to reject the requested allocation */
AppDataSize += DHCPServerApp_FillDHCPHeader(AppData, DHCP_NAK, &RemoteMACAddress, &uip_all_zeroes_addr, TransactionID);
}
-
+
/* Send the DHCP ACK or NAK packet */
uip_poll_conn(BroadcastConnection);
memcpy(&uip_udp_conn->ripaddr, &uip_broadcast_addr, sizeof(uip_ipaddr_t));
uip_udp_send(AppDataSize);
/* Send the DHCP ACK or NAK packet */
uip_poll_conn(BroadcastConnection);
memcpy(&uip_udp_conn->ripaddr, &uip_broadcast_addr, sizeof(uip_ipaddr_t));
uip_udp_send(AppDataSize);
-
+
break;
case DHCP_RELEASE:
/* Mark the IP address as released in the allocation table */
break;
case DHCP_RELEASE:
/* Mark the IP address as released in the allocation table */
@@
-179,7
+179,7
@@
static uint16_t DHCPServerApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader,
memcpy(&DHCPHeader->YourIP, PreferredClientIP, sizeof(uip_ipaddr_t));
memcpy(&DHCPHeader->ClientHardwareAddress, ClientHardwareAddress, sizeof(struct uip_eth_addr));
DHCPHeader->Cookie = DHCP_MAGIC_COOKIE;
memcpy(&DHCPHeader->YourIP, PreferredClientIP, sizeof(uip_ipaddr_t));
memcpy(&DHCPHeader->ClientHardwareAddress, ClientHardwareAddress, sizeof(struct uip_eth_addr));
DHCPHeader->Cookie = DHCP_MAGIC_COOKIE;
-
+
/* Add a DHCP message type and terminator options to the start of the DHCP options field */
DHCPHeader->Options[0] = DHCP_OPTION_MSG_TYPE;
DHCPHeader->Options[1] = 1;
/* Add a DHCP message type and terminator options to the start of the DHCP options field */
DHCPHeader->Options[0] = DHCP_OPTION_MSG_TYPE;
DHCPHeader->Options[1] = 1;
@@
-202,7
+202,7
@@
static bool DHCPServerApp_CheckIfIPLeased(const uip_ipaddr_t* const IPAddress)
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
-
+
/* Make sure that the requested IP address isn't already leased to the virtual server or another client */
if (IPAddress->u8[3] && !(IPAddress->u8[3] == uip_hostaddr.u8[3]) && !(LeasedIPs[Byte] & Mask))
return false;
/* Make sure that the requested IP address isn't already leased to the virtual server or another client */
if (IPAddress->u8[3] && !(IPAddress->u8[3] == uip_hostaddr.u8[3]) && !(LeasedIPs[Byte] & Mask))
return false;
@@
-217,13
+217,13
@@
static bool DHCPServerApp_CheckIfIPLeased(const uip_ipaddr_t* const IPAddress)
static void DHCPServerApp_GetUnleasedIP(uip_ipaddr_t* const NewIPAddress)
{
uip_ipaddr_copy(NewIPAddress, &uip_hostaddr);
static void DHCPServerApp_GetUnleasedIP(uip_ipaddr_t* const NewIPAddress)
{
uip_ipaddr_copy(NewIPAddress, &uip_hostaddr);
-
+
/** Look through the current subnet, skipping the broadcast and zero IP addresses */
for (uint8_t IP = 1; IP < 254; IP++)
{
/* Update new IP address to lease with the current IP address to test */
NewIPAddress->u8[3] = IP;
/** Look through the current subnet, skipping the broadcast and zero IP addresses */
for (uint8_t IP = 1; IP < 254; IP++)
{
/* Update new IP address to lease with the current IP address to test */
NewIPAddress->u8[3] = IP;
-
+
/* If we've found an unleased IP, abort with the updated IP stored for the called */
if (!(DHCPServerApp_CheckIfIPLeased(NewIPAddress)))
return;
/* If we've found an unleased IP, abort with the updated IP stored for the called */
if (!(DHCPServerApp_CheckIfIPLeased(NewIPAddress)))
return;
@@
-241,7
+241,7
@@
static void DHCPServerApp_LeaseIP(const uip_ipaddr_t* const IPAddress)
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
-
+
/* Mark the IP address as leased in the allocation table */
LeasedIPs[Byte] |= Mask;
}
/* Mark the IP address as leased in the allocation table */
LeasedIPs[Byte] |= Mask;
}
@@
-257,7
+257,7
@@
static void DHCPServerApp_UnleaseIP(const uip_ipaddr_t* const IPAddress)
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
-
+
/* Mark the IP address as unleased in the allocation table */
LeasedIPs[Byte] &= ~Mask;
}
/* Mark the IP address as unleased in the allocation table */
LeasedIPs[Byte] &= ~Mask;
}
diff --git
a/Projects/Webserver/Lib/FATFs/ff.c
b/Projects/Webserver/Lib/FATFs/ff.c
index
4f76915
..
1b7c7ca
100644
(file)
--- a/
Projects/Webserver/Lib/FATFs/ff.c
+++ b/
Projects/Webserver/Lib/FATFs/ff.c
@@
-946,7
+946,7
@@
FRESULT remove_chain (
#if _USE_ERASE
if (ecl + 1 == nxt) { /* Next cluster is contiguous */
ecl = nxt;
#if _USE_ERASE
if (ecl + 1 == nxt) { /* Next cluster is contiguous */
ecl = nxt;
- } else { /* End of contiguous clusters */
+ } else { /* End of contiguous clusters */
resion[0] = clust2sect(fs, scl); /* Start sector */
resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
resion[0] = clust2sect(fs, scl); /* Start sector */
resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
@@
-2650,7
+2650,7
@@
FRESULT f_close (
#if _FS_REENTRANT
res = validate(fp->fs, fp->id);
if (res == FR_OK) {
#if _FS_REENTRANT
res = validate(fp->fs, fp->id);
if (res == FR_OK) {
- res = dec_lock(fp->lockid);
+ res = dec_lock(fp->lockid);
unlock_fs(fp->fs, FR_OK);
}
#else
unlock_fs(fp->fs, FR_OK);
}
#else
@@
-2749,7
+2749,7
@@
FRESULT f_getcwd (
res = dir_read(&dj);
if (res != FR_OK) break;
if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
res = dir_read(&dj);
if (res != FR_OK) break;
if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
- res = dir_next(&dj, 0);
+ res = dir_next(&dj, 0);
} while (res == FR_OK);
if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
if (res != FR_OK) break;
} while (res == FR_OK);
if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
if (res != FR_OK) break;
@@
-3978,3
+3978,4
@@
int f_printf (
#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */
#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */
+
diff --git
a/Projects/Webserver/Lib/FATFs/ff.h
b/Projects/Webserver/Lib/FATFs/ff.h
index
a3aad84
..
b6a7471
100644
(file)
--- a/
Projects/Webserver/Lib/FATFs/ff.h
+++ b/
Projects/Webserver/Lib/FATFs/ff.h
@@
-333,3
+333,4
@@
int ff_del_syncobj (_SYNC_t); /* Delete a sync object */
#endif
#endif /* _FATFS */
#endif
#endif /* _FATFS */
+
diff --git
a/Projects/Webserver/Lib/SCSI.c
b/Projects/Webserver/Lib/SCSI.c
index
a13fd1a
..
bf7f5f5
100644
(file)
--- a/
Projects/Webserver/Lib/SCSI.c
+++ b/
Projects/Webserver/Lib/SCSI.c
@@
-287,7
+287,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@
-306,7
+306,7
@@
static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
return false;
}
return false;
}
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@
-340,3
+340,4
@@
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
return true;
}
+
diff --git
a/Projects/Webserver/Lib/SCSI.h
b/Projects/Webserver/Lib/SCSI.h
index
4351c57
..
c5149ca
100644
(file)
--- a/
Projects/Webserver/Lib/SCSI.h
+++ b/
Projects/Webserver/Lib/SCSI.h
@@
-41,7
+41,7
@@
#include <avr/pgmspace.h>
#include <LUFA/Drivers/USB/USB.h>
#include <avr/pgmspace.h>
#include <LUFA/Drivers/USB/USB.h>
-
+
#include "../Descriptors.h"
#include "DataflashManager.h"
#include "../Descriptors.h"
#include "DataflashManager.h"
diff --git
a/Projects/Webserver/Lib/uIPManagement.c
b/Projects/Webserver/Lib/uIPManagement.c
index
5e0a308
..
9225d92
100644
(file)
--- a/
Projects/Webserver/Lib/uIPManagement.c
+++ b/
Projects/Webserver/Lib/uIPManagement.c
@@
-70,7
+70,7
@@
void uIPManagement_Init(void)
MACAddress.addr[5] = SERVER_MAC_ADDRESS[5];
#if defined(ENABLE_DHCP_SERVER)
MACAddress.addr[5] = SERVER_MAC_ADDRESS[5];
#if defined(ENABLE_DHCP_SERVER)
- DHCPServerApp_Init();
+ DHCPServerApp_Init();
#endif
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
#endif
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
@@
-84,7
+84,7
@@
void uIPManagement_Init(void)
else
{
#if defined(ENABLE_DHCP_CLIENT)
else
{
#if defined(ENABLE_DHCP_CLIENT)
- DHCPClientApp_Init();
+ DHCPClientApp_Init();
#else
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
uip_ipaddr(&IPAddress, DEVICE_IP_ADDRESS[0], DEVICE_IP_ADDRESS[1], DEVICE_IP_ADDRESS[2], DEVICE_IP_ADDRESS[3]);
#else
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
uip_ipaddr(&IPAddress, DEVICE_IP_ADDRESS[0], DEVICE_IP_ADDRESS[1], DEVICE_IP_ADDRESS[2], DEVICE_IP_ADDRESS[3]);
@@
-170,7
+170,7
@@
static void uIPManagement_ProcessIncomingPacket(void)
/* If no packet received, exit processing routine */
if (!(RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface_Device)))
return;
/* If no packet received, exit processing routine */
if (!(RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface_Device)))
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
@@
-181,13
+181,13
@@
static void uIPManagement_ProcessIncomingPacket(void)
/* If no packet received, exit processing routine */
if (!(RNDIS_Host_IsPacketReceived(&Ethernet_RNDIS_Interface_Host)))
return;
/* If no packet received, exit processing routine */
if (!(RNDIS_Host_IsPacketReceived(&Ethernet_RNDIS_Interface_Host)))
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface_Host, uip_buf, &uip_len);
}
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface_Host, uip_buf, &uip_len);
}
-
+
/* If the packet contains an Ethernet frame, process it */
if (uip_len > 0)
{
/* If the packet contains an Ethernet frame, process it */
if (uip_len > 0)
{
diff --git
a/Projects/Webserver/Lib/uIPManagement.h
b/Projects/Webserver/Lib/uIPManagement.h
index
8fe656d
..
0fd7d68
100644
(file)
--- a/
Projects/Webserver/Lib/uIPManagement.h
+++ b/
Projects/Webserver/Lib/uIPManagement.h
@@
-60,7
+60,7
@@
* (when DHCP is disabled).
*/
#define DEVICE_GATEWAY (uint8_t[]){10, 0, 0, 1}
* (when DHCP is disabled).
*/
#define DEVICE_GATEWAY (uint8_t[]){10, 0, 0, 1}
-
+
/** Ethernet MAC address of the virtual webserver. When in device RNDIS mode, the virtual webserver requires
* a unique MAC address that it can use when sending packets to the RNDIS adapter, which contains a seperate
* MAC address as set in the RNDIS class driver configuration structure.
/** Ethernet MAC address of the virtual webserver. When in device RNDIS mode, the virtual webserver requires
* a unique MAC address that it can use when sending packets to the RNDIS adapter, which contains a seperate
* MAC address as set in the RNDIS class driver configuration structure.
diff --git
a/Projects/Webserver/USBDeviceMode.c
b/Projects/Webserver/USBDeviceMode.c
index
54c6261
..
c555c4f
100644
(file)
--- a/
Projects/Webserver/USBDeviceMode.c
+++ b/
Projects/Webserver/USBDeviceMode.c
@@
-62,7
+62,7
@@
USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface_Device =
.AdapterMACAddress = {{0x02, 0x00, 0x02, 0x00, 0x02, 0x00}},
},
};
.AdapterMACAddress = {{0x02, 0x00, 0x02, 0x00, 0x02, 0x00}},
},
};
-
+
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
diff --git
a/Projects/Webserver/USBHostMode.c
b/Projects/Webserver/USBHostMode.c
index
1620cb5
..
524d442
100644
(file)
--- a/
Projects/Webserver/USBHostMode.c
+++ b/
Projects/Webserver/USBHostMode.c
@@
-67,7
+67,7
@@
void USBHostMode_USBTask(void)
return;
uIPManagement_ManageNetwork();
return;
uIPManagement_ManageNetwork();
-
+
RNDIS_Host_USBTask(&Ethernet_RNDIS_Interface_Host);
}
RNDIS_Host_USBTask(&Ethernet_RNDIS_Interface_Host);
}
diff --git
a/Projects/XPLAINBridge/AVRISPDescriptors.h
b/Projects/XPLAINBridge/AVRISPDescriptors.h
index
e98ea24
..
68b50ba
100644
(file)
--- a/
Projects/XPLAINBridge/AVRISPDescriptors.h
+++ b/
Projects/XPLAINBridge/AVRISPDescriptors.h
@@
-67,7
+67,7
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Atmel AVRISP-MKII Interface
USB_Descriptor_Interface_t AVRISP_Interface;
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
// Atmel AVRISP-MKII Interface
USB_Descriptor_Interface_t AVRISP_Interface;
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
diff --git
a/Projects/XPLAINBridge/Lib/SoftUART.h
b/Projects/XPLAINBridge/Lib/SoftUART.h
index
70707da
..
219acf3
100644
(file)
--- a/
Projects/XPLAINBridge/Lib/SoftUART.h
+++ b/
Projects/XPLAINBridge/Lib/SoftUART.h
@@
-67,3
+67,4
@@
void SoftUART_Init(void);
#endif
void SoftUART_Init(void);
#endif
+
diff --git
a/Projects/XPLAINBridge/USARTDescriptors.h
b/Projects/XPLAINBridge/USARTDescriptors.h
index
f504011
..
44a9fb9
100644
(file)
--- a/
Projects/XPLAINBridge/USARTDescriptors.h
+++ b/
Projects/XPLAINBridge/USARTDescriptors.h
@@
-65,14
+65,14
@@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Control Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
// CDC Control Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git
a/Projects/XPLAINBridge/XPLAINBridge.c
b/Projects/XPLAINBridge/XPLAINBridge.c
index
d79c62d
..
6dc1859
100644
(file)
--- a/
Projects/XPLAINBridge/XPLAINBridge.c
+++ b/
Projects/XPLAINBridge/XPLAINBridge.c
@@
-134,7
+134,7
@@
void UARTBridge_Task(void)
if (!(ReceivedByte < 0))
RingBuffer_Insert(&USBtoUART_Buffer, ReceivedByte);
}
if (!(ReceivedByte < 0))
RingBuffer_Insert(&USBtoUART_Buffer, ReceivedByte);
}
-
+
/* Check if the UART receive buffer flush timer has expired or buffer is nearly full */
uint16_t BufferCount = RingBuffer_GetCount(&UARTtoUSB_Buffer);
if ((TIFR0 & (1 << TOV0)) || (BufferCount > 200))
/* Check if the UART receive buffer flush timer has expired or buffer is nearly full */
uint16_t BufferCount = RingBuffer_GetCount(&UARTtoUSB_Buffer);
if ((TIFR0 & (1 << TOV0)) || (BufferCount > 200))