├── LICENSE ├── firmware ├── CMakeLists.txt ├── Config │ └── LUFAConfig.h ├── Descriptors.c ├── Descriptors.h ├── LUFA │ ├── Build │ │ ├── HID_EEPROM_Loader │ │ │ ├── HID_EEPROM_Loader.c │ │ │ └── makefile │ │ ├── lufa_atprogram.mk │ │ ├── lufa_avrdude.mk │ │ ├── lufa_build.mk │ │ ├── lufa_core.mk │ │ ├── lufa_cppcheck.mk │ │ ├── lufa_dfu.mk │ │ ├── lufa_doxygen.mk │ │ ├── lufa_hid.mk │ │ └── lufa_sources.mk │ ├── CodeTemplates │ │ ├── DeviceTemplate │ │ │ ├── Descriptors.c │ │ │ ├── Descriptors.h │ │ │ ├── DeviceApplication.c │ │ │ ├── DeviceApplication.h │ │ │ └── asf.xml │ │ ├── DriverStubs │ │ │ ├── Board.h │ │ │ ├── Buttons.h │ │ │ ├── Dataflash.h │ │ │ ├── Joystick.h │ │ │ └── LEDs.h │ │ ├── HostTemplate │ │ │ ├── HostApplication.c │ │ │ ├── HostApplication.h │ │ │ └── asf.xml │ │ ├── LUFAConfig.h │ │ ├── WindowsINF │ │ │ ├── LUFA CDC-ACM.inf │ │ │ └── LUFA RNDIS.inf │ │ └── makefile_template │ ├── Common │ │ ├── ArchitectureSpecific.h │ │ ├── Architectures.h │ │ ├── Attributes.h │ │ ├── BoardTypes.h │ │ ├── Common.h │ │ ├── CompilerSpecific.h │ │ └── Endianness.h │ ├── DoxygenPages │ │ ├── BuildSystem.txt │ │ ├── BuildingLinkableLibraries.txt │ │ ├── ChangeLog.txt │ │ ├── CompileTimeTokens.txt │ │ ├── CompilingApps.txt │ │ ├── ConfiguringApps.txt │ │ ├── DevelopingWithLUFA.txt │ │ ├── DeviceSupport.txt │ │ ├── DirectorySummaries.txt │ │ ├── Donating.txt │ │ ├── ExportingLibrary.txt │ │ ├── FutureChanges.txt │ │ ├── GettingStarted.txt │ │ ├── Groups.txt │ │ ├── Images │ │ │ ├── AS5_AS6_Import │ │ │ │ ├── AS5_AS6_Import_Step1.png │ │ │ │ ├── AS5_AS6_Import_Step2.png │ │ │ │ ├── AS5_AS6_Import_Step3.png │ │ │ │ ├── AS5_AS6_Import_Step4.png │ │ │ │ ├── AS5_AS6_Import_Step5_1.png │ │ │ │ ├── AS5_AS6_Import_Step5_2.png │ │ │ │ └── AS5_AS6_Import_Step5_3.png │ │ │ ├── Author.jpg │ │ │ ├── LUFA.png │ │ │ └── LUFA_thumb.png │ │ ├── KnownIssues.txt │ │ ├── LUFAPoweredProjects.txt │ │ ├── LibraryResources.txt │ │ ├── LicenseInfo.txt │ │ ├── MainPage.txt │ │ ├── MigrationInformation.txt │ │ ├── OSDrivers.txt │ │ ├── ProgrammingApps.txt │ │ ├── SoftwareBootloaderJump.txt │ │ ├── Style │ │ │ ├── Footer.htm │ │ │ └── Style.css │ │ ├── VIDAndPIDValues.txt │ │ └── WritingBoardDrivers.txt │ ├── Drivers │ │ ├── Board │ │ │ ├── AVR8 │ │ │ │ ├── ADAFRUITU4 │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── ATAVRUSBRF01 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── BENITO │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── BIGMULTIO │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── BLACKCAT │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── BUI │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── BUMBLEB │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── CULV3 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── DUCE │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── EVK527 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── JMDBU2 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── LEONARDO │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── MAXIMUS │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── MICRO │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── MICROPENDOUS │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── MICROSIN162 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── MINIMUS │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── MULTIO │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── OLIMEX162 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── OLIMEX32U4 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── OLIMEXISPMK2 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── OLIMEXT32U4 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── RZUSBSTICK │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── SPARKFUN8U2 │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── STANGE_ISP │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── STK525 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── STK526 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── TEENSY │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── TUL │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── U2S │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── UDIP │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── UNO │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── USB2AX │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── USBFOO │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── USBKEY │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── USBTINYMKII │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── XPLAIN │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── XPLAINED_MINI │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ │ └── YUN │ │ │ │ │ ├── Board.h │ │ │ │ │ └── LEDs.h │ │ │ ├── Board.h │ │ │ ├── Buttons.h │ │ │ ├── Dataflash.h │ │ │ ├── Joystick.h │ │ │ ├── LEDs.h │ │ │ ├── Temperature.c │ │ │ ├── Temperature.h │ │ │ ├── UC3 │ │ │ │ ├── EVK1100 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── EVK1101 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Joystick.h │ │ │ │ │ └── LEDs.h │ │ │ │ ├── EVK1104 │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ │ └── UC3A3_XPLAINED │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ └── XMEGA │ │ │ │ ├── A3BU_XPLAINED │ │ │ │ ├── Board.h │ │ │ │ ├── Buttons.h │ │ │ │ ├── Dataflash.h │ │ │ │ └── LEDs.h │ │ │ │ ├── B1_XPLAINED │ │ │ │ ├── Board.h │ │ │ │ ├── Buttons.h │ │ │ │ ├── Dataflash.h │ │ │ │ └── LEDs.h │ │ │ │ └── C3_XPLAINED │ │ │ │ ├── Board.h │ │ │ │ ├── Buttons.h │ │ │ │ └── LEDs.h │ │ ├── Misc │ │ │ ├── AT45DB321C.h │ │ │ ├── AT45DB642D.h │ │ │ ├── RingBuffer.h │ │ │ └── TerminalCodes.h │ │ ├── Peripheral │ │ │ ├── ADC.h │ │ │ ├── AVR8 │ │ │ │ ├── ADC_AVR8.h │ │ │ │ ├── SPI_AVR8.h │ │ │ │ ├── SerialSPI_AVR8.h │ │ │ │ ├── Serial_AVR8.c │ │ │ │ ├── Serial_AVR8.h │ │ │ │ ├── TWI_AVR8.c │ │ │ │ └── TWI_AVR8.h │ │ │ ├── SPI.h │ │ │ ├── Serial.h │ │ │ ├── SerialSPI.h │ │ │ ├── TWI.h │ │ │ └── XMEGA │ │ │ │ ├── SPI_XMEGA.h │ │ │ │ ├── SerialSPI_XMEGA.h │ │ │ │ ├── Serial_XMEGA.c │ │ │ │ ├── Serial_XMEGA.h │ │ │ │ ├── TWI_XMEGA.c │ │ │ │ └── TWI_XMEGA.h │ │ └── USB │ │ │ ├── Class │ │ │ ├── AndroidAccessoryClass.h │ │ │ ├── AudioClass.h │ │ │ ├── CDCClass.h │ │ │ ├── Common │ │ │ │ ├── AndroidAccessoryClassCommon.h │ │ │ │ ├── AudioClassCommon.h │ │ │ │ ├── CDCClassCommon.h │ │ │ │ ├── HIDClassCommon.h │ │ │ │ ├── HIDParser.c │ │ │ │ ├── HIDParser.h │ │ │ │ ├── HIDReportData.h │ │ │ │ ├── MIDIClassCommon.h │ │ │ │ ├── MassStorageClassCommon.h │ │ │ │ ├── PrinterClassCommon.h │ │ │ │ ├── RNDISClassCommon.h │ │ │ │ └── StillImageClassCommon.h │ │ │ ├── Device │ │ │ │ ├── AudioClassDevice.c │ │ │ │ ├── AudioClassDevice.h │ │ │ │ ├── CDCClassDevice.c │ │ │ │ ├── CDCClassDevice.h │ │ │ │ ├── HIDClassDevice.c │ │ │ │ ├── HIDClassDevice.h │ │ │ │ ├── MIDIClassDevice.c │ │ │ │ ├── MIDIClassDevice.h │ │ │ │ ├── MassStorageClassDevice.c │ │ │ │ ├── MassStorageClassDevice.h │ │ │ │ ├── PrinterClassDevice.c │ │ │ │ ├── PrinterClassDevice.h │ │ │ │ ├── RNDISClassDevice.c │ │ │ │ └── RNDISClassDevice.h │ │ │ ├── HIDClass.h │ │ │ ├── Host │ │ │ │ ├── AndroidAccessoryClassHost.c │ │ │ │ ├── AndroidAccessoryClassHost.h │ │ │ │ ├── AudioClassHost.c │ │ │ │ ├── AudioClassHost.h │ │ │ │ ├── CDCClassHost.c │ │ │ │ ├── CDCClassHost.h │ │ │ │ ├── HIDClassHost.c │ │ │ │ ├── HIDClassHost.h │ │ │ │ ├── MIDIClassHost.c │ │ │ │ ├── MIDIClassHost.h │ │ │ │ ├── MassStorageClassHost.c │ │ │ │ ├── MassStorageClassHost.h │ │ │ │ ├── PrinterClassHost.c │ │ │ │ ├── PrinterClassHost.h │ │ │ │ ├── RNDISClassHost.c │ │ │ │ ├── RNDISClassHost.h │ │ │ │ ├── StillImageClassHost.c │ │ │ │ └── StillImageClassHost.h │ │ │ ├── MIDIClass.h │ │ │ ├── MassStorageClass.h │ │ │ ├── PrinterClass.h │ │ │ ├── RNDISClass.h │ │ │ └── StillImageClass.h │ │ │ ├── Core │ │ │ ├── AVR8 │ │ │ │ ├── Device_AVR8.c │ │ │ │ ├── Device_AVR8.h │ │ │ │ ├── EndpointStream_AVR8.c │ │ │ │ ├── EndpointStream_AVR8.h │ │ │ │ ├── Endpoint_AVR8.c │ │ │ │ ├── Endpoint_AVR8.h │ │ │ │ ├── Host_AVR8.c │ │ │ │ ├── Host_AVR8.h │ │ │ │ ├── OTG_AVR8.h │ │ │ │ ├── PipeStream_AVR8.c │ │ │ │ ├── PipeStream_AVR8.h │ │ │ │ ├── Pipe_AVR8.c │ │ │ │ ├── Pipe_AVR8.h │ │ │ │ ├── Template │ │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ └── Template_Pipe_RW.c │ │ │ │ ├── USBController_AVR8.c │ │ │ │ ├── USBController_AVR8.h │ │ │ │ ├── USBInterrupt_AVR8.c │ │ │ │ └── USBInterrupt_AVR8.h │ │ │ ├── ConfigDescriptors.c │ │ │ ├── ConfigDescriptors.h │ │ │ ├── Device.h │ │ │ ├── DeviceStandardReq.c │ │ │ ├── DeviceStandardReq.h │ │ │ ├── Endpoint.h │ │ │ ├── EndpointStream.h │ │ │ ├── Events.c │ │ │ ├── Events.h │ │ │ ├── Host.h │ │ │ ├── HostStandardReq.c │ │ │ ├── HostStandardReq.h │ │ │ ├── OTG.h │ │ │ ├── Pipe.h │ │ │ ├── PipeStream.h │ │ │ ├── StdDescriptors.h │ │ │ ├── StdRequestType.h │ │ │ ├── UC3 │ │ │ │ ├── Device_UC3.c │ │ │ │ ├── Device_UC3.h │ │ │ │ ├── EndpointStream_UC3.c │ │ │ │ ├── EndpointStream_UC3.h │ │ │ │ ├── Endpoint_UC3.c │ │ │ │ ├── Endpoint_UC3.h │ │ │ │ ├── Host_UC3.c │ │ │ │ ├── Host_UC3.h │ │ │ │ ├── PipeStream_UC3.c │ │ │ │ ├── PipeStream_UC3.h │ │ │ │ ├── Pipe_UC3.c │ │ │ │ ├── Pipe_UC3.h │ │ │ │ ├── Template │ │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ └── Template_Pipe_RW.c │ │ │ │ ├── USBController_UC3.c │ │ │ │ ├── USBController_UC3.h │ │ │ │ ├── USBInterrupt_UC3.c │ │ │ │ └── USBInterrupt_UC3.h │ │ │ ├── USBController.h │ │ │ ├── USBInterrupt.h │ │ │ ├── USBMode.h │ │ │ ├── USBTask.c │ │ │ ├── USBTask.h │ │ │ └── XMEGA │ │ │ │ ├── Device_XMEGA.c │ │ │ │ ├── Device_XMEGA.h │ │ │ │ ├── EndpointStream_XMEGA.c │ │ │ │ ├── EndpointStream_XMEGA.h │ │ │ │ ├── Endpoint_XMEGA.c │ │ │ │ ├── Endpoint_XMEGA.h │ │ │ │ ├── Host_XMEGA.c │ │ │ │ ├── PipeStream_XMEGA.c │ │ │ │ ├── Pipe_XMEGA.c │ │ │ │ ├── Template │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ └── Template_Endpoint_RW.c │ │ │ │ ├── USBController_XMEGA.c │ │ │ │ ├── USBController_XMEGA.h │ │ │ │ ├── USBInterrupt_XMEGA.c │ │ │ │ └── USBInterrupt_XMEGA.h │ │ │ └── USB.h │ ├── License.txt │ ├── Platform │ │ ├── Platform.h │ │ ├── UC3 │ │ │ ├── ClockManagement.h │ │ │ ├── Exception.S │ │ │ ├── InterruptManagement.c │ │ │ ├── InterruptManagement.h │ │ │ └── UC3ExperimentalInfo.txt │ │ └── XMEGA │ │ │ ├── ClockManagement.h │ │ │ └── XMEGAExperimentalInfo.txt │ ├── StudioIntegration │ │ ├── Docbook │ │ │ ├── mshelp │ │ │ │ ├── README.txt │ │ │ │ ├── docbook.xsl │ │ │ │ └── hv1-common.xsl │ │ │ └── placeholder.txt │ │ ├── HV1 │ │ │ ├── helpcontentsetup.msha │ │ │ ├── lufa_docbook_transform.xslt │ │ │ ├── lufa_helpcontentsetup_transform.xslt │ │ │ ├── lufa_hv1_transform.xslt │ │ │ └── lufa_studio_help_styling.css │ │ ├── ProjectGenerator │ │ │ └── placeholder.txt │ │ ├── VSIX │ │ │ ├── LUFA.dll │ │ │ ├── LUFA.pkgdef │ │ │ ├── [Content_Types].xml │ │ │ ├── asf-manifest.xml │ │ │ ├── extension.vsixmanifest │ │ │ ├── generate_caches.py │ │ │ ├── lufa_asfmanifest_transform.xslt │ │ │ └── lufa_vsmanifest_transform.xslt │ │ ├── XDK │ │ │ ├── lufa_extension_transform.xslt │ │ │ ├── lufa_filelist_transform.xslt │ │ │ ├── lufa_indent_transform.xslt │ │ │ └── lufa_module_transform.xslt │ │ ├── lufa.xml │ │ ├── lufa_common.xml │ │ ├── lufa_drivers_board.xml │ │ ├── lufa_drivers_board_names.xml │ │ ├── lufa_drivers_misc.xml │ │ ├── lufa_drivers_peripheral.xml │ │ ├── lufa_drivers_usb.xml │ │ ├── lufa_drivers_usb_class.xml │ │ ├── lufa_drivers_usb_class_android.xml │ │ ├── lufa_drivers_usb_class_audio.xml │ │ ├── lufa_drivers_usb_class_cdc.xml │ │ ├── lufa_drivers_usb_class_hid.xml │ │ ├── lufa_drivers_usb_class_midi.xml │ │ ├── lufa_drivers_usb_class_ms.xml │ │ ├── lufa_drivers_usb_class_printer.xml │ │ ├── lufa_drivers_usb_class_rndis.xml │ │ ├── lufa_drivers_usb_class_si.xml │ │ ├── lufa_drivers_usb_core.xml │ │ ├── lufa_drivers_usb_core_avr8.xml │ │ ├── lufa_drivers_usb_core_uc3.xml │ │ ├── lufa_drivers_usb_core_xmega.xml │ │ ├── lufa_platform.xml │ │ ├── lufa_platform_uc3.xml │ │ ├── lufa_platform_xmega.xml │ │ ├── lufa_toolchain.xml │ │ └── makefile │ ├── Version.h │ ├── doxyfile │ └── makefile ├── makefile ├── swc_usb.c └── swc_usb.h ├── pcb ├── swc_usb.brd ├── swc_usb.sch ├── swc_usb.zip ├── swc_usb_schematic.png └── usb_adapter_pcb.jpg ├── readme.md ├── requirements.txt ├── swc_usb.hex ├── swc_usb.py └── usb_adapter.jpg /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Tore Lundqvist 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /firmware/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.3) 2 | project(swc_usb) 3 | 4 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 5 | 6 | add_custom_target(swc_usb COMMAND make -C ${swc_usb_SOURCE_DIR} CLION_EXE_DIR=${PROJECT_BINARY_DIR}) 7 | 8 | include_directories("/usr/local/opt/avr-gcc/avr/include" "." "./Config") 9 | 10 | add_definitions(-DUSE_LUFA_CONFIG_HEADER) 11 | add_definitions(-DUSB_CAN_BE_DEVICE) 12 | add_definitions(-D__AVR_ATmega32U4__) 13 | 14 | set(SOURCE_FILES 15 | Descriptors.h 16 | Descriptors.c 17 | swc_usb.h 18 | swc_usb.c 19 | ./Config/LUFAConfig.h 20 | ) 21 | 22 | add_executable(swc_usb.hex ${SOURCE_FILES}) 23 | -------------------------------------------------------------------------------- /firmware/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Special application to extract an EEPROM image stored in FLASH memory, and 34 | * copy it to the device EEPROM. This application is designed to be used with 35 | * the HID build system module of LUFA to program the EEPROM of a target device 36 | * that uses the HID bootloader protocol, which does not have native EEPROM 37 | * programming support. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | 44 | /* References to the binary EEPROM data linked in the AVR's FLASH memory space */ 45 | extern const char _binary_InputEEData_bin_start[]; 46 | extern const char _binary_InputEEData_bin_end[]; 47 | extern const char _binary_InputEEData_bin_size[]; 48 | 49 | /* Friendly names for the embedded binary data stored in FLASH memory space */ 50 | #define InputEEData _binary_InputEEData_bin_start 51 | #define InputEEData_size ((int)_binary_InputEEData_bin_size) 52 | 53 | int main(void) 54 | { 55 | /* Copy out the embedded EEPROM data from FLASH to EEPROM memory space */ 56 | for (uint16_t i = 0; i < InputEEData_size; i++) 57 | eeprom_update_byte((uint8_t*)i, pgm_read_byte(&InputEEData[i])); 58 | 59 | /* Infinite loop once complete */ 60 | for (;;); 61 | } 62 | -------------------------------------------------------------------------------- /firmware/LUFA/Build/HID_EEPROM_Loader/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2015. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # -------------------------------------- 9 | # LUFA Project Makefile. 10 | # -------------------------------------- 11 | 12 | # Run "make help" for target help. 13 | 14 | MCU = at90usb1287 15 | ARCH = AVR8 16 | F_CPU = 1000000 17 | F_USB = $(F_CPU) 18 | OPTIMIZATION = s 19 | TARGET = HID_EEPROM_Loader 20 | SRC = $(TARGET).c 21 | LUFA_PATH = ../../../LUFA 22 | CC_FLAGS = 23 | LD_FLAGS = 24 | OBJECT_FILES = InputEEData.o 25 | 26 | # Default target 27 | all: 28 | 29 | # Determine the AVR sub-architecture of the build main application object file 30 | FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1) 31 | 32 | # Create a linkable object file with the input binary EEPROM data stored in the FLASH section 33 | InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST) 34 | @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\" 35 | avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@ 36 | 37 | # Include LUFA build script makefiles 38 | include $(LUFA_PATH)/Build/lufa_core.mk 39 | include $(LUFA_PATH)/Build/lufa_build.mk 40 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk 41 | include $(LUFA_PATH)/Build/lufa_doxygen.mk 42 | include $(LUFA_PATH)/Build/lufa_hid.mk 43 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/DeviceTemplate/Descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Descriptors.c. 34 | */ 35 | 36 | #ifndef _DESCRIPTORS_H_ 37 | #define _DESCRIPTORS_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | 42 | /* Macros: */ 43 | #if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \ 44 | !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))) 45 | #define HAS_MULTIPLE_DESCRIPTOR_ADDRESS_SPACES 46 | #endif 47 | 48 | /* Type Defines: */ 49 | /** Type define for the device configuration descriptor structure. This must be defined in the 50 | * application code, as the configuration descriptor contains several sub-descriptors which 51 | * vary between devices, and which describe the device's usage to the host. 52 | */ 53 | typedef struct 54 | { 55 | USB_Descriptor_Configuration_Header_t Config; 56 | } USB_Descriptor_Configuration_t; 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for DeviceApplication.c. 34 | */ 35 | 36 | #ifndef _USB_DEVICE_APPLICATION_H_ 37 | #define _USB_DEVICE_APPLICATION_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | 44 | #include 45 | #include 46 | 47 | #include "Descriptors.h" 48 | 49 | /* Function Prototypes: */ 50 | void SetupHardware(void); 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/DeviceTemplate/asf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Template for a LUFA USB device mode application. 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/HostTemplate/HostApplication.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for HostApplication.c. 34 | */ 35 | 36 | #ifndef _USB_HOST_APPLICATION_H_ 37 | #define _USB_HOST_APPLICATION_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | 44 | #include 45 | 46 | /* Macros: */ 47 | #if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \ 48 | !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))) 49 | #define HAS_MULTIPLE_DESCRIPTOR_ADDRESS_SPACES 50 | #endif 51 | 52 | /* Function Prototypes: */ 53 | void SetupHardware(void); 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/HostTemplate/asf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Template for a LUFA USB host mode application. 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/WindowsINF/LUFA CDC-ACM.inf: -------------------------------------------------------------------------------- 1 | ; Windows LUFA CDC ACM Setup File 2 | ; Copyright (c) 2000 Microsoft Corporation 3 | 4 | [DefaultInstall] 5 | CopyINF="LUFA CDC-ACM.inf" 6 | 7 | [Version] 8 | Signature="$Windows NT$" 9 | Class=Ports 10 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 11 | Provider=%MFGNAME% 12 | DriverVer=7/1/2012,10.0.0.0 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTamd64, NTia64 16 | 17 | [SourceDisksNames] 18 | 19 | [SourceDisksFiles] 20 | 21 | [DestinationDirs] 22 | DefaultDestDir=12 23 | 24 | [DriverInstall] 25 | Include=mdmcpq.inf 26 | CopyFiles=FakeModemCopyFileSection 27 | AddReg=DriverInstall.AddReg 28 | 29 | [DriverInstall.Services] 30 | Include=mdmcpq.inf 31 | AddService=usbser, 0x00000002, LowerFilter_Service_Inst 32 | 33 | [DriverInstall.AddReg] 34 | HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider" 35 | 36 | ;------------------------------------------------------------------------------ 37 | ; Vendor and Product ID Definitions 38 | ;------------------------------------------------------------------------------ 39 | ; When developing your USB device, the VID and PID used in the PC side 40 | ; application program and the firmware on the microcontroller must match. 41 | ; Modify the below line to use your VID and PID. Use the format as shown below. 42 | ; Note: One INF file can be used for multiple devices with different VID and PIDs. 43 | ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line. 44 | ;------------------------------------------------------------------------------ 45 | [DeviceList] 46 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044 47 | 48 | [DeviceList.NTx86] 49 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044 50 | 51 | [DeviceList.NTamd64] 52 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044 53 | 54 | [DeviceList.NTia64] 55 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044 56 | 57 | ;------------------------------------------------------------------------------ 58 | ; String Definitions 59 | ;------------------------------------------------------------------------------ 60 | ;Modify these strings to customize your device 61 | ;------------------------------------------------------------------------------ 62 | [Strings] 63 | MFGNAME="http://www.lufa-lib.org" 64 | DESCRIPTION="LUFA CDC-ACM Virtual Serial Port" 65 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/WindowsINF/LUFA RNDIS.inf: -------------------------------------------------------------------------------- 1 | ; Windows LUFA RNDIS Setup File 2 | ; Copyright (c) 2000 Microsoft Corporation 3 | 4 | [DefaultInstall] 5 | CopyINF="LUFA RNDIS.inf" 6 | 7 | [Version] 8 | Signature="$Windows NT$" 9 | Class=Net 10 | ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318} 11 | Provider=%MFGNAME% 12 | DriverVer=7/1/2012,10.0.0.0 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTamd64, NTia64 16 | 17 | [ControlFlags] 18 | ExcludeFromSelect=* 19 | 20 | [DriverInstall] 21 | Characteristics=0x84 ; NCF_PHYSICAL + NCF_HAS_UI 22 | BusType=15 23 | include=netrndis.inf 24 | needs=Usb_Rndis.ndi 25 | AddReg=Rndis_AddReg_Vista 26 | 27 | [DriverInstall.Services] 28 | include=netrndis.inf 29 | needs=Usb_Rndis.ndi.Services 30 | 31 | ;------------------------------------------------------------------------------ 32 | ; Vendor and Product ID Definitions 33 | ;------------------------------------------------------------------------------ 34 | ; When developing your USB device, the VID and PID used in the PC side 35 | ; application program and the firmware on the microcontroller must match. 36 | ; Modify the below line to use your VID and PID. Use the format as shown below. 37 | ; Note: One INF file can be used for multiple devices with different VID and PIDs. 38 | ; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line. 39 | ;------------------------------------------------------------------------------ 40 | [DeviceList] 41 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204C 42 | 43 | [DeviceList.NTx86] 44 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204C 45 | 46 | [DeviceList.NTamd64] 47 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204C 48 | 49 | [DeviceList.NTia64] 50 | %DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204C 51 | 52 | ;------------------------------------------------------------------------------ 53 | ; String Definitions 54 | ;------------------------------------------------------------------------------ 55 | ;Modify these strings to customize your device 56 | ;------------------------------------------------------------------------------ 57 | [Strings] 58 | MFGNAME="http://www.lufa-lib.org" 59 | DESCRIPTION="LUFA RNDIS USB Ethernet Adapter" 60 | -------------------------------------------------------------------------------- /firmware/LUFA/CodeTemplates/makefile_template: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2015. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # -------------------------------------- 9 | # LUFA Project Makefile. 10 | # -------------------------------------- 11 | 12 | # Run "make help" for target help. 13 | 14 | MCU = at90usb1287 15 | ARCH = AVR8 16 | BOARD = USBKEY 17 | F_CPU = 8000000 18 | F_USB = $(F_CPU) 19 | OPTIMIZATION = s 20 | TARGET = Target 21 | SRC = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_PLATFORM) 22 | LUFA_PATH = ../../LUFA 23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig 24 | LD_FLAGS = 25 | 26 | # Default target 27 | all: 28 | 29 | # Include LUFA build script makefiles 30 | include $(LUFA_PATH)/Build/lufa_core.mk 31 | include $(LUFA_PATH)/Build/lufa_sources.mk 32 | include $(LUFA_PATH)/Build/lufa_build.mk 33 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk 34 | include $(LUFA_PATH)/Build/lufa_doxygen.mk 35 | include $(LUFA_PATH)/Build/lufa_dfu.mk 36 | include $(LUFA_PATH)/Build/lufa_hid.mk 37 | include $(LUFA_PATH)/Build/lufa_avrdude.mk 38 | include $(LUFA_PATH)/Build/lufa_atprogram.mk 39 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/BuildingLinkableLibraries.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_BuildLibrary Building as a Linkable Library 8 | * 9 | * The LUFA library can be built as a proper linkable library (with the extension .a) under AVR-GCC, so that 10 | * the library does not need to be recompiled with each revision of a user project. Instructions for creating 11 | * a library from a given source tree can be found in the AVR-GCC user manual included in the WinAVR install 12 | * /Docs/ directory. 13 | * 14 | * However, building the library is not recommended, as the static (compile-time) options will be 15 | * unable to be changed without a recompilation of the LUFA code. Therefore, if the library is to be built 16 | * from the LUFA source, it should be made to be application-specific and compiled with the static options 17 | * that are required for each project (which should be recorded along with the library). 18 | * 19 | * Normal library use has the library components compiled in at the same point as the application code, as 20 | * demonstrated in the library demos and applications. This is the preferred method, as the library is recompiled 21 | * each time to ensure that all static options for a particular application are applied. 22 | */ 23 | 24 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/DevelopingWithLUFA.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_DevelopingWithLUFA Developing With LUFA 9 | * 10 | * This section of the manual contains information on LUFA development, such as Getting Started information, 11 | * information on compile-time tuning of the library and other developer-related sections. 12 | * 13 | * Subsections: 14 | * \li \subpage Page_BuildSystem - The LUFA Buildsystem 15 | * \li \subpage Page_TokenSummary - Summary of Compile Time Tokens 16 | * \li \subpage Page_Migration - Migrating from an Older LUFA Version 17 | * \li \subpage Page_VIDPID - Allocated USB VID and PID Values 18 | * \li \subpage Page_OSDrivers - Operating System Driver Information 19 | * \li \subpage Page_BuildLibrary - Building as a Linkable Library 20 | * \li \subpage Page_ExportingLibrary - Exporting LUFA for IDE Use 21 | * \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers 22 | * \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software 23 | */ 24 | 25 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Donating.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_Donating Donating to Support This Project 9 | * 10 | * \image html Images/Author.jpg "Dean Camera, LUFA Developer" 11 | * 12 | * I am a software developer working on LUFA in my spare time. The development and support of this library requires 13 | * much effort from myself, as I am the sole developer, maintainer and supporter. Please consider donating a small 14 | * amount to support this and my future Open Source projects - All donations are greatly appreciated. 15 | * 16 | * Note that commercial entities can remove the attribution portion of the LUFA license by a one-time fee - see 17 | * \ref Page_LicenseInfo for more details (Note: Please do NOT pay this in advance through the donation link below - 18 | * contact author for payment details.). 19 | * 20 | * \htmlonly 21 | * \image html "http://www.pledgie.com/campaigns/6927.png" 22 | * \endhtmlonly 23 | * Donate to this project via PayPal - Thanks in Advance! 24 | */ 25 | 26 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/FutureChanges.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_FutureChanges Future Changes 8 | * 9 | * Below is a list of future changes which are proposed for the LUFA library, but not yet started/complete. 10 | * This gives an unordered list of future changes which may be available in future releases of the library. 11 | * If you have an item to add to this list, please contact the library author via email, the LUFA mailing list, 12 | * or post your suggestion as an enhancement request to the project bug tracker. 13 | * 14 | * Targeted for Future Releases: 15 | * - Code Features 16 | * -# Add hub support when in Host mode for multiple devices 17 | * -# Investigate virtual hubs when in device mode instead of composite devices 18 | * -# Re-add interrupt Pipe/Endpoint support 19 | * -# Update stream APIs to use DMA transfers on supported architectures 20 | * -# Pull out third party libraries into a separate folder and reference them as required 21 | * -# Add a LUFA_YIELD macro for integration into a third-party RTOS 22 | * -# Abstract out Mass Storage byte send/receive to prevent low level API use in projects 23 | * -# Fix HID report parser usage support for array types 24 | * -# Make HOST_DEVICE_SETTLE_DELAY_MS a global variable that can be changed 25 | * -# Add MANDATORY_EVENT_FUNCTIONS compile time option 26 | * -# Add watchdog support to the library and apps/bootloaders 27 | * -# Limit the maximum size of control transfers 28 | * - Testing/Verification 29 | * -# Re-run USBIF test suite on all classes to formally verify operation 30 | * -# Implement automated functional testing of all demos 31 | * - Documentation/Support 32 | * -# Add detailed overviews of how each demo works 33 | * -# Add board overviews 34 | * -# Write LUFA tutorials 35 | * - Demos/Projects 36 | * -# Add class driver support for Test and Measurement class 37 | * -# Add class driver support for EEM class 38 | * -# Add class driver support for ECM class 39 | * -# Add class driver generic HID report host demo 40 | * -# Implement flow control for USB to Serial project 41 | * - Ports 42 | * -# Port all demos to multiple architectures 43 | * -# Finish USB XMEGA port 44 | * -# Add AVR32 UC3C, UC3D and UC3L support 45 | * -# Other (commercial) C compilers 46 | */ 47 | 48 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/GettingStarted.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_GettingStarted Getting Started 8 | * 9 | * Getting started with LUFA is easy; read the content below to get on your way to your first LUFA powered application. 10 | * 11 | * \section Sec_DemosOverview The LUFA Demo Applications 12 | * 13 | * Out of the box, LUFA contains a large number of pre-made class demos for you to test, experiment with and 14 | * ultimately build upon for your own projects. All the demos (where possible) come pre-configured to build and 15 | * run correctly on the AT90USB1287 AVR microcontroller, mounted on the Atmel USBKEY board and running at an 8MHz 16 | * master clock. This is due to two reasons; one, it is the hardware the author possesses, and two, it is the most 17 | * popular Atmel USB demonstration board to date. To learn how to reconfigure, recompile and program the included 18 | * LUFA applications using different settings, see the subsections below. 19 | * 20 | * \section Sec_ClassOrLowLevel Class Driver and Low Level Demos 21 | * 22 | * Most of the included demos in the /Demos/ folder come in both ClassDriver and LowLevel varieties. If you are new 23 | * to LUFA, it is highly recommended that you look at the ClassDriver versions first, which use the pre-made USB 24 | * Class Drivers (\ref Group_USBClassDrivers) to simplify the use of the standard USB classes in user applications. 25 | * These demos give a basic but easy to use interface to the USB class used in the demo application, such as HID or 26 | * CDC. 27 | * 28 | * Those needing absolute control over the class implementation can look at the LowLevel demos, which implement the 29 | * required USB class directly in the demo application using the lowest level LUFA APIs. 30 | * 31 | * 32 | * Subsections: 33 | * \li \subpage Page_ConfiguringApps - How to Configure the Included Demos, Projects and Bootloaders 34 | * \li \subpage Page_CompilingApps - How to Compile the Included Demos, Projects and Bootloaders 35 | * \li \subpage Page_ProgrammingApps - How to Program an AVR with the Included Demos, Projects and Bootloaders 36 | */ 37 | 38 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Groups.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \defgroup Group_BoardDrivers Board Drivers 8 | * 9 | * \brief Functions, macros, variables, enums and types related to the control of physical board hardware. 10 | */ 11 | 12 | /** \defgroup Group_PeripheralDrivers On-chip Peripheral Drivers 13 | * 14 | * \brief Functions, macros, variables, enums and types related to the control of AVR subsystems. 15 | */ 16 | 17 | /** \defgroup Group_MiscDrivers Miscellaneous Drivers 18 | * 19 | * \brief Miscellaneous driver Functions, macros, variables, enums and types. 20 | */ 21 | 22 | /** \defgroup Group_PlatformDrivers_AVR8 AVR8 23 | * \ingroup Group_PlatformDrivers 24 | * 25 | * \brief Drivers relating to the AVR8 architecture platform, such as clock setup and interrupt management. 26 | */ 27 | 28 | /** \defgroup Group_PlatformDrivers_XMEGA XMEGA 29 | * \ingroup Group_PlatformDrivers 30 | * 31 | * \brief Drivers relating to the XMEGA architecture platform, such as clock setup and interrupt management. 32 | */ 33 | 34 | /** \defgroup Group_PlatformDrivers_UC3 UC3 35 | * \ingroup Group_PlatformDrivers 36 | * 37 | * \brief Drivers relating to the UC3 architecture platform, such as clock setup and interrupt management. 38 | */ 39 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/Author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/Author.jpg -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/LUFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/LUFA.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Images/LUFA_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/DoxygenPages/Images/LUFA_thumb.png -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/LibraryResources.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_Resources Library Resources 9 | * 10 | * \section Sec_UnofficialResources Unofficial Resources 11 | * Unofficial Russian LUFA documentation translation: http://microsin.ru/Download.cnt/doc/LUFA/ \n 12 | * Tutorial for LUFA USB Control Transfers: http://www.avrbeginners.net/new/tutorials/usb-control-transfers-with-lufa/ 13 | * 14 | * \section Sec_ProjectPages LUFA Related Webpages 15 | * Project Homepage: http://www.lufa-lib.org \n 16 | * Commercial Licenses: http://www.lufa-lib.org/license \n 17 | * Author's Website: http://www.fourwalledcubicle.com \n 18 | * Development Blog: http://www.fourwalledcubicle.com/blog \n 19 | * 20 | * \section Sec_ProjectHelp Assistance With LUFA 21 | * Support Mailing List: http://www.lufa-lib.org/support \n 22 | * Author's Email: dean [at] fourwalledcubicle [dot] com \n 23 | * 24 | * \section Sec_InDevelopment Latest In-Development Source Code 25 | * Issue Tracker: http://www.lufa-lib.org/tracker \n 26 | * Public GIT Repository: http://www.lufa-lib.org/git \n 27 | * Latest Repository Source Archive: http://www.lufa-lib.org/latest-archive \n 28 | * Commit RSS Feed: http://www.lufa-lib.org/rss \n 29 | * 30 | * \section Sec_USBResources USB Resources 31 | * USB-IF Website: http://www.usb.org \n 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/LicenseInfo.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_LicenseInfo Source Code License 9 | * 10 | * The LUFA library is currently released under the MIT license, included below. 11 | * 12 | * \section Sec_LicenseForHumans License Summary for Human Beings 13 | * Everyone is free to use LUFA without payment - even in commercial applications 14 | * where the product source code is not publicly disclosed. However, use of the 15 | * library must be in accordance with the library license conditions. 16 | * 17 | * If you wish to use LUFA without payment, you must include a copy of the 18 | * full license text below with your product or project - on your website, and in 19 | * an accompanying manual or other materials for the product. As long as the entire 20 | * license text is made available and obvious to the users of your product, you 21 | * are free to incorporate the LUFA library into your product without special 22 | * additional licensing. 23 | * 24 | * \section Sec_CommercialLicenses Commercial Licensing 25 | * In some instances the small requirement for public disclosure of LUFA within a 26 | * product is unwanted; in these instances a commercial license is offered up as an 27 | * alternative to the standard LUFA license. 28 | * 29 | * Commercial entities can opt out of the public disclosure clause in this license 30 | * for a one-time US$1500 payment. This provides a non-exclusive modified MIT 31 | * licensed which allows for the free use of the LUFA library, bootloaders and 32 | * (where the sole copyright is attributed to Dean Camera) demos without public 33 | * disclosure within an organization, in addition to three free hours of consultation 34 | * with the library author, and priority support. 35 | * 36 | * Please visit the Commercial License link on \ref Page_Resources for more information on 37 | * ordering a commercial license for your company. 38 | * 39 | * \section Sec_LicenseText LUFA License Text 40 | * 41 | * \verbinclude License.txt 42 | */ 43 | 44 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/ProgrammingApps.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_ProgrammingApps Programming an Application into a USB AVR 8 | * 9 | * Once you have built an application, you will need a way to program in the resulting ".HEX" file (and, if your 10 | * application uses EEPROM variables with initial values, also a ".EEP" file) into your USB AVR. Normally, the 11 | * reprogramming of an AVR device must be performed using a special piece of programming hardware, through one of the 12 | * supported AVR programming protocols - ISP, HVSP, HVPP, JTAG, dW or PDI. This can be done through a custom programmer, 13 | * a third party programmer, or an official Atmel AVR tool - for more information, see the atmel.com website. 14 | * 15 | * Alternatively, you can use the bootloader. From the Atmel factory, each USB AVR comes preloaded with the Atmel 16 | * DFU (Device Firmware Update) class bootloader, a small piece of AVR firmware which allows the remainder of the 17 | * AVR to be programmed through a non-standard interface such as the serial USART port, SPI, or (in this case) USB. 18 | * Bootloaders have the advantage of not requiring any special hardware for programming, and cannot usually be erased 19 | * or broken without an external programming device. They have disadvantages however; they cannot change the fuses of 20 | * the AVR (special configuration settings that control the operation of the chip itself) and a small portion of the 21 | * AVR's FLASH program memory must be reserved to contain the bootloader firmware, and thus cannot be used by the 22 | * loaded application. 23 | * 24 | * If you wish to use the DFU bootloader to program in your application, refer to your DFU programmer's documentation. 25 | * Atmel provides a free utility called FLIP which is USB AVR compatible, and an open source (Linux compatible) 26 | * alternative exists called "dfu-programmer". 27 | * 28 | * \see \ref Page_BuildModule_DFU for information on the LUFA build system DFU module, for automatic DFU bootloader 29 | * programming makefile targets. 30 | */ 31 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Style/Footer.htm: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/Style/Style.css: -------------------------------------------------------------------------------- 1 | /* ============================= */ 2 | /* Page Header Formattings */ 3 | /* ============================= */ 4 | #titlearea { 5 | background-color:#E1E7F4; 6 | background-image:url('nav_f.png'); 7 | background-repeat:repeat-x; 8 | color:#20335A; 9 | font-weight:bold; 10 | text-shadow:0 1px 1px rgba(255, 255, 255, 0.9); 11 | } 12 | 13 | #projectlogo { 14 | padding-left: 10px; 15 | } 16 | 17 | /* ============================= */ 18 | /* General Text Formattings */ 19 | /* ============================= */ 20 | body,table,div,p,dl { 21 | font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif; 22 | font-size:13px; 23 | line-height:1.3; 24 | } 25 | 26 | div.header, div.contents p { 27 | padding-left:12px; 28 | } 29 | 30 | /* ============================= */ 31 | /* API Documentation Formattings */ 32 | /* ============================= */ 33 | div.contents table.memberdecls, .paramname { 34 | font-family:Consolas, Monaco, courier, sans-serif; 35 | font-size:105%; 36 | padding-right:20px; 37 | } 38 | 39 | /* ============================= */ 40 | /* HTML Heading Formattings */ 41 | /* ============================= */ 42 | h1, h2, h3, h4 { 43 | font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif; 44 | } 45 | 46 | h1 { 47 | font-size:25px; 48 | margin-bottom:10px; 49 | } 50 | 51 | h2 { 52 | color:#42657B; 53 | font-size:17px; 54 | } 55 | 56 | h3 { 57 | font-size:15px; 58 | } 59 | 60 | h4 { 61 | font-size:13px; 62 | } 63 | 64 | /* ============================= */ 65 | /* Code Snippet Formattings */ 66 | /* ============================= */ 67 | span.keyword { 68 | color:#008000; 69 | } 70 | 71 | span.keywordtype { 72 | color:#604020; 73 | } 74 | 75 | span.keywordflow { 76 | color:#e08000; 77 | } 78 | 79 | span.comment { 80 | color:#008000; 81 | } 82 | 83 | span.preprocessor { 84 | color:#806020; 85 | } 86 | 87 | span.stringliteral { 88 | color:#002080; 89 | } 90 | 91 | span.charliteral { 92 | color:#008080; 93 | } 94 | -------------------------------------------------------------------------------- /firmware/LUFA/DoxygenPages/WritingBoardDrivers.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_WritingBoardDrivers Writing LUFA Board Drivers 8 | * 9 | * LUFA ships with several basic pre-made board drivers, to control hardware present on the supported board 10 | * hardware - such as Dataflash ICs, LEDs, Joysticks, or other hardware peripherals. When compiling an application 11 | * which makes use of one or more board drivers located in LUFA/Drivers/Board, you must also indicate which 12 | * board hardware you are using in your project makefile. This is done by defining the BOARD macro using 13 | * the -D switch passed to the compiler, with a constant of BOARD_{Name}. For example, 14 | * -DBOARD=BOARD_USBKEY instructs the compiler to use the USBKEY board hardware drivers. 15 | * 16 | * If your application does not use any board level drivers, you can omit the definition of the BOARD 17 | * macro. However, some users may wish to write their own custom board hardware drivers which are to remain compatible 18 | * with the LUFA hardware API. To do this, the BOARD macro should be defined to the value BOARD_USER. 19 | * This indicates that the board level drivers should be located in a folder named "Board" located inside the 20 | * application's folder. 21 | * 22 | * When used, the driver stub files located in the LUFA/CodeTemplates/DriverStubs folder should be copied to 23 | * the user application's Board/ directory, and filled out to include the values and code needed to control 24 | * the custom board hardware. Once done, the existing LUFA board level APIs (accessed in the regular 25 | * LUFA/Drivers/Board/ folder) will redirect to the user board drivers, maintaining code compatibility and 26 | * allowing for a different board to be selected through the project makefile with no code changes. 27 | * 28 | * \section Sec_BoardTemplates Board Driver Templates 29 | * 30 | * The templates for each board driver are reproduced below. 31 | * 32 | * \subsection SSec_BoardTemplates_Board Template for USER 33 | * \include "DriverStubs/Board.h" 34 | * 35 | * \subsection SSec_BoardTemplates_Buttons Template for USER 36 | * \include "DriverStubs/Buttons.h" 37 | * 38 | * \subsection SSec_BoardTemplates_Dataflash Template for USER 39 | * \include "DriverStubs/Dataflash.h" 40 | * 41 | * \subsection SSec_BoardTemplates_Joystick Template for USER 42 | * \include "DriverStubs/Joystick.h" 43 | * 44 | * \subsection SSec_BoardTemplates_LEDs Template for USER 45 | * \include "DriverStubs/LEDs.h" 46 | */ 47 | 48 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/ADAFRUITU4/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Adafruit U4 Breakout board. 33 | * \copydetails Group_BoardInfo_ADAFRUITU4 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_ADAFRUITU4 ADAFRUITU4 41 | * \brief Board specific information header for the Adafruit U4 Breakout board. 42 | * 43 | * Board specific information header for the Adafruit U4 Breakout board (http://ladyada.net/products/atmega32u4breakout). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_ADAFRUITU4_H__ 49 | #define __BOARD_ADAFRUITU4_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Atmel ATAVRUSBRF01. 33 | * \copydetails Group_BoardInfo_ATAVRUSBRF01 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_ATAVRUSBRF01 ATAVRUSBRF01 41 | * \brief Board specific information header for the Atmel ATAVRUSBRF01. 42 | * 43 | * Board specific information header for the Atmel ATAVRUSBRF01. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_ATAVRUSBRF01_H__ 49 | #define __BOARD_ATAVRUSBRF01_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/BENITO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Tempusdictum Benito. 33 | * \copydetails Group_BoardInfo_BENITO 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_BENITO BENITO 41 | * \brief Board specific information header for the Tempusdictum Benito. 42 | * 43 | * Board specific information header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_BENITO_H__ 49 | #define __BOARD_BENITO_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/BIGMULTIO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Bitwizard Big-Multio. 33 | * \copydetails Group_BoardInfo_BIGMULTIO 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_BIGMULTIO BIGMULTIO 41 | * \brief Board specific information header for the Bitwizard Big-Multio. 42 | * 43 | * Board specific information header for the Bitwizard Big-Multio (http://www.bitwizard.nl/wiki/index.php/Usbbigmultio). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_BIGMULTIO_H__ 49 | #define __BOARD_BIGMULTIO_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/BLACKCAT/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the BLACKCAT USB JTAG. 33 | * \copydetails Group_BoardInfo_BLACKCAT 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_BLACKCAT BLACKCAT 41 | * \brief Board specific information header for the BLACKCAT USB JTAG. 42 | * 43 | * Board specific information header for the TCNISO Blackcat USB JTAG (http://www.embeddedcomputers.net/products/BlackcatUSB). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_BLACKCAT_H__ 49 | #define __BOARD_BLACKCAT_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/BUI/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Busware BUI. 33 | * \copydetails Group_BoardInfo_BUI 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_BUI BUI 41 | * \brief Board specific information header for the Busware BUI. 42 | * 43 | * Board specific information header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_BUI_H__ 49 | #define __BOARD_BUI_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/CULV3/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Busware CUL V3. 33 | * \copydetails Group_BoardInfo_CULV3 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_CULV3 CULV3 41 | * \brief Board specific information header for the Busware CUL V3. 42 | * 43 | * Board specific information header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_CULV3_H__ 49 | #define __BOARD_CULV3_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/DUCE/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the DorkbotPDX Duce. 33 | * \copydetails Group_BoardInfo_DUCE 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_DUCE DUCE 41 | * \brief Board specific information header for the DorkbotPDX Duce. 42 | * 43 | * Board specific information header for the DorkbotPDX Duce (http://dorkbotpdx.org/wiki/duce). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_DUCE_H__ 49 | #define __BOARD_DUCE_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/JMDBU2/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Mattairtech JM-DB-U2. 33 | * \copydetails Group_BoardInfo_JMDBU2 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_JMDBU2 JMDBU2 41 | * \brief Board specific information header for the Mattairtech JM-DB-U2. 42 | * 43 | * Board specific information header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_JMDBU2_H__ 49 | #define __BOARD_JMDBU2_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/LEONARDO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Arduino Leonardo board. 33 | * \copydetails Group_BoardInfo_LEONARDO 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_LEONARDO LEONARDO 41 | * \brief Board specific information header for the Arduino Leonardo board. 42 | * 43 | * Board specific information header for the Arduino Leonardo board (http://arduino.cc/en/Main/arduinoBoardLeonardo). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_LEONARDO_H__ 49 | #define __BOARD_LEONARDO_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/MAXIMUS/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Maximus board. 33 | * \copydetails Group_BoardInfo_MAXIMUS 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_MAXIMUS MAXIMUS 41 | * \brief Board specific information header for the Maximus board. 42 | * 43 | * Board specific information header for the Maximus (http://www.avrusb.com/). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_MAXIMUS_H__ 49 | #define __BOARD_MAXIMUS_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/MICRO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Arduino Micro board. 33 | * \copydetails Group_BoardInfo_MICRO 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_MICRO MICRO 41 | * \brief Board specific information header for the Arduino Micro board. 42 | * 43 | * Board specific information header for the Arduino Micro board (http://arduino.cc/en/Main/arduinoBoardMicro). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_MICRO_H__ 49 | #define __BOARD_MICRO_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/MINIMUS/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the MINIMUS. 33 | * \copydetails Group_BoardInfo_MINIMUS 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_MINIMUS MINIMUS 41 | * \brief Board specific information header for the MINIMUS. 42 | * 43 | * Board specific information header for the MINIMUS. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_MINIMUS_H__ 49 | #define __BOARD_MINIMUS_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/MULTIO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Bitwizard Multio. 33 | * \copydetails Group_BoardInfo_MULTIO 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_MULTIO MULTIO 41 | * \brief Board specific information header for the Bitwizard Multio. 42 | * 43 | * Board specific information header for the Bitwizard Multio (http://www.bitwizard.nl/wiki/index.php/USB-multio). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_MULTIO_H__ 49 | #define __BOARD_MULTIO_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/RZUSBSTICK/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Atmel RZUSBSTICK. 33 | * \copydetails Group_BoardInfo_RZUSBSTICK 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_RZUSBSTICK RZUSBSTICK 41 | * \brief Board specific information header for the Atmel RZUSBSTICK. 42 | * 43 | * Board specific information header for the Atmel RZUSBSTICK. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_RZUSBSTICK_H__ 49 | #define __BOARD_RZUSBSTICK_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/SPARKFUN8U2/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Sparkfun ATMEGA8U2 breakout board. 33 | * \copydetails Group_BoardInfo_SPARKFUN8U2 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_SPARKFUN8U2 SPARKFUN8U2 41 | * \brief Board specific information header for the Sparkfun ATMEGA8U2 breakout board. 42 | * 43 | * Board specific information header for the Sparkfun ATMEGA8U2 breakout board (http://www.sparkfun.com/products/10277). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_SPARKFUN8U2_H__ 49 | #define __BOARD_SPARKFUN8U2_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/TUL/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the TUL. 33 | * \copydetails Group_BoardInfo_TUL 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_TUL TUL 41 | * \brief Board specific information header for the TUL. 42 | * 43 | * Board specific information header for the Busware TUL (http://www.busware.de/tiki-index.php?page=TUL). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_TUL_H__ 49 | #define __BOARD_TUL_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/U2S/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the U2S. 33 | * \copydetails Group_BoardInfo_U2S 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_U2S U2S 41 | * \brief Board specific information header for the U2S. 42 | * 43 | * Board specific information header for the U2S (http://sites.google.com/site/megau2s/). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_U2S__ 49 | #define __BOARD_U2S__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has a hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has a hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/UDIP/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the UDIP. 33 | * \copydetails Group_BoardInfo_UDIP 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_UDIP UDIP 41 | * \brief Board specific information header for the UDIP. 42 | * 43 | * Board specific information header for the Linnix UDIP (http://linnix.com/udip/). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_UDIP_H__ 49 | #define __BOARD_UDIP_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/USBFOO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Kernel Concepts USBFOO. 33 | * \copydetails Group_BoardInfo_USBFOO 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_USBFOO USBFOO 41 | * \brief Board specific information header for the Kernel Concepts USBFOO. 42 | * 43 | * Board specific information header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_USBFOO_H__ 49 | #define __BOARD_USBFOO_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/USBTINYMKII/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for Tom's USBTINY MKII. 33 | * \copydetails Group_BoardInfo_USBTINYMKII 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_USBTINYMKII USBTINYMKII 41 | * \brief Board specific information header for Tom's USBTINY MKII. 42 | * 43 | * Board specific information header for Tom's USBTINY MKII (http://tom-itx.dyndns.org:81/~webpage/). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_USBTINYMKII_H__ 49 | #define __BOARD_USBTINYMKII_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/XPLAINED_MINI/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Atmel Xplained-MINI series kits. 33 | * \copydetails Group_BoardInfo_XPLAINED_MINI 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_XPLAINED_MINI XPLAINED_MINI 41 | * \brief Board specific information header for the Atmel Xplained-MINI series kits. 42 | * 43 | * Board specific information header for the Atmel Xplained-MINI series kits. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_XPLAINED_MINI_H__ 49 | #define __BOARD_XPLAINED_MINI_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/AVR8/YUN/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Arduino Yun board. 33 | * \copydetails Group_BoardInfo_YUN 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_YUN YUN 41 | * \brief Board specific information header for the Arduino Yun board. 42 | * 43 | * Board specific information header for the Arduino Yun board (http://arduino.cc/en/Main/arduinoBoardYun). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_YUN_H__ 49 | #define __BOARD_YUN_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../LEDs.h" 54 | 55 | /* Enable C linkage for C++ Compilers: */ 56 | #if defined(__cplusplus) 57 | extern "C" { 58 | #endif 59 | 60 | /* Preprocessor Checks: */ 61 | #if !defined(__INCLUDE_FROM_BOARD_H) 62 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 63 | #endif 64 | 65 | /* Public Interface - May be used in end-application: */ 66 | /* Macros: */ 67 | /** Indicates the board has hardware LEDs mounted. */ 68 | #define BOARD_HAS_LEDS 69 | 70 | /* Disable C linkage for C++ Compilers: */ 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | /** @} */ 78 | 79 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/Temperature.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_TEMPERATURE_C 32 | #include "Temperature.h" 33 | 34 | #if defined(TEMPERATURE_SENSOR_DRIVER_COMPATIBLE) 35 | 36 | static const uint16_t PROGMEM Temperature_Lookup[TEMP_TABLE_SIZE] = 37 | { 38 | 0x3B4, 0x3B0, 0x3AB, 0x3A6, 0x3A0, 0x39A, 0x394, 0x38E, 0x388, 0x381, 0x37A, 0x373, 39 | 0x36B, 0x363, 0x35B, 0x353, 0x34A, 0x341, 0x338, 0x32F, 0x325, 0x31B, 0x311, 0x307, 40 | 0x2FC, 0x2F1, 0x2E6, 0x2DB, 0x2D0, 0x2C4, 0x2B8, 0x2AC, 0x2A0, 0x294, 0x288, 0x27C, 41 | 0x26F, 0x263, 0x256, 0x24A, 0x23D, 0x231, 0x225, 0x218, 0x20C, 0x200, 0x1F3, 0x1E7, 42 | 0x1DB, 0x1CF, 0x1C4, 0x1B8, 0x1AC, 0x1A1, 0x196, 0x18B, 0x180, 0x176, 0x16B, 0x161, 43 | 0x157, 0x14D, 0x144, 0x13A, 0x131, 0x128, 0x11F, 0x117, 0x10F, 0x106, 0x0FE, 0x0F7, 44 | 0x0EF, 0x0E8, 0x0E1, 0x0DA, 0x0D3, 0x0CD, 0x0C7, 0x0C0, 0x0BA, 0x0B5, 0x0AF, 0x0AA, 45 | 0x0A4, 0x09F, 0x09A, 0x096, 0x091, 0x08C, 0x088, 0x084, 0x080, 0x07C, 0x078, 0x074, 46 | 0x071, 0x06D, 0x06A, 0x067, 0x064, 0x061, 0x05E, 0x05B, 0x058, 0x055, 0x053, 0x050, 47 | 0x04E, 0x04C, 0x049, 0x047, 0x045, 0x043, 0x041, 0x03F, 0x03D, 0x03C, 0x03A, 0x038 48 | }; 49 | 50 | int8_t Temperature_GetTemperature(void) 51 | { 52 | uint16_t Temp_ADC = ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | TEMP_ADC_CHANNEL_MASK); 53 | 54 | if (Temp_ADC > pgm_read_word(&Temperature_Lookup[0])) 55 | return TEMP_MIN_TEMP; 56 | 57 | for (uint16_t Index = 0; Index < TEMP_TABLE_SIZE; Index++) 58 | { 59 | if (Temp_ADC > pgm_read_word(&Temperature_Lookup[Index])) 60 | return (Index + TEMP_TABLE_OFFSET_DEGREES); 61 | } 62 | 63 | return TEMP_MAX_TEMP; 64 | } 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/UC3/EVK1104/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Atmel EVK1104. 33 | * \copydetails Group_BoardInfo_EVK1104 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_EVK1104 EVK1104 41 | * \brief Board specific information header for the Atmel Atmel EVK1104. 42 | * 43 | * Board specific information header for the Atmel Atmel EVK1104. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_EVK1104_H__ 49 | #define __BOARD_EVK1104_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/UC3/UC3A3_XPLAINED/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Atmel UC3-A3 Xplained. 33 | * \copydetails Group_BoardInfo_UC3_A3_XPLAINED 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_UC3_A3_XPLAINED UC3_A3_XPLAINED 41 | * \brief Board specific information header for the Atmel UC3-A3 Xplained. 42 | * 43 | * Board specific information header for the Atmel UC3-A3 Xplained. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_UC3_A3_XPLAINED_H__ 49 | #define __BOARD_UC3_A3_XPLAINED_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../LEDs.h" 55 | 56 | /* Enable C linkage for C++ Compilers: */ 57 | #if defined(__cplusplus) 58 | extern "C" { 59 | #endif 60 | 61 | /* Preprocessor Checks: */ 62 | #if !defined(__INCLUDE_FROM_BOARD_H) 63 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 64 | #endif 65 | 66 | /* Public Interface - May be used in end-application: */ 67 | /* Macros: */ 68 | /** Indicates the board has hardware Buttons mounted. */ 69 | #define BOARD_HAS_BUTTONS 70 | 71 | /** Indicates the board has hardware LEDs mounted. */ 72 | #define BOARD_HAS_LEDS 73 | 74 | /* Disable C linkage for C++ Compilers: */ 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | 79 | #endif 80 | 81 | /** @} */ 82 | 83 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Board specific information header for the Atmel XMEGA C3 Xplained. 33 | * \copydetails Group_BoardInfo_C3_XPLAINED 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the Board driver 36 | * dispatch header located in LUFA/Drivers/Board/Board.h. 37 | */ 38 | 39 | /** \ingroup Group_BoardInfo 40 | * \defgroup Group_BoardInfo_C3_XPLAINED C3_XPLAINED 41 | * \brief Board specific information header for the Atmel XMEGA C3 Xplained. 42 | * 43 | * Board specific information header for the Atmel XMEGA C3 Xplained. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_C3_XPLAINED_H__ 49 | #define __BOARD_C3_XPLAINED_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../Dataflash.h" 55 | #include "../../LEDs.h" 56 | 57 | /* Enable C linkage for C++ Compilers: */ 58 | #if defined(__cplusplus) 59 | extern "C" { 60 | #endif 61 | 62 | /* Preprocessor Checks: */ 63 | #if !defined(__INCLUDE_FROM_BOARD_H) 64 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 65 | #endif 66 | 67 | /* Public Interface - May be used in end-application: */ 68 | /* Macros: */ 69 | /** Indicates the board has hardware Buttons mounted. */ 70 | #define BOARD_HAS_BUTTONS 71 | 72 | /** Indicates the board has hardware LEDs mounted. */ 73 | #define BOARD_HAS_LEDS 74 | 75 | /* Disable C linkage for C++ Compilers: */ 76 | #if defined(__cplusplus) 77 | } 78 | #endif 79 | 80 | #endif 81 | 82 | /** @} */ 83 | 84 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_AVR8) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_DEVICE) 38 | 39 | #include "../Device.h" 40 | 41 | void USB_Device_SendRemoteWakeup(void) 42 | { 43 | if (!(USB_Options & USB_OPT_MANUAL_PLL)) 44 | { 45 | USB_PLL_On(); 46 | while (!(USB_PLL_IsReady())); 47 | } 48 | 49 | USB_CLK_Unfreeze(); 50 | 51 | UDCON |= (1 << RMWKUP); 52 | while (UDCON & (1 << RMWKUP)); 53 | } 54 | 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (void* const Buffer, 34 | uint16_t Length) 35 | { 36 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 37 | 38 | if (!(Length)) 39 | Endpoint_ClearOUT(); 40 | 41 | while (Length) 42 | { 43 | uint8_t USB_DeviceState_LCL = USB_DeviceState; 44 | 45 | if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 46 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 47 | else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 48 | return ENDPOINT_RWCSTREAM_BusSuspended; 49 | else if (Endpoint_IsSETUPReceived()) 50 | return ENDPOINT_RWCSTREAM_HostAborted; 51 | 52 | if (Endpoint_IsOUTReceived()) 53 | { 54 | while (Length && Endpoint_BytesInEndpoint()) 55 | { 56 | TEMPLATE_TRANSFER_BYTE(DataStream); 57 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 58 | Length--; 59 | } 60 | 61 | Endpoint_ClearOUT(); 62 | } 63 | } 64 | 65 | while (!(Endpoint_IsINReady())) 66 | { 67 | uint8_t USB_DeviceState_LCL = USB_DeviceState; 68 | 69 | if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 70 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 71 | else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 72 | return ENDPOINT_RWCSTREAM_BusSuspended; 73 | } 74 | 75 | return ENDPOINT_RWCSTREAM_NoError; 76 | } 77 | 78 | #undef TEMPLATE_BUFFER_OFFSET 79 | #undef TEMPLATE_BUFFER_MOVE 80 | #undef TEMPLATE_FUNC_NAME 81 | #undef TEMPLATE_TRANSFER_BYTE 82 | 83 | #endif 84 | 85 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, 34 | uint16_t Length, 35 | uint16_t* const BytesProcessed) 36 | { 37 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 38 | uint16_t BytesInTransfer = 0; 39 | uint8_t ErrorCode; 40 | 41 | if ((ErrorCode = Endpoint_WaitUntilReady())) 42 | return ErrorCode; 43 | 44 | if (BytesProcessed != NULL) 45 | { 46 | Length -= *BytesProcessed; 47 | TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed); 48 | } 49 | 50 | while (Length) 51 | { 52 | if (!(Endpoint_IsReadWriteAllowed())) 53 | { 54 | TEMPLATE_CLEAR_ENDPOINT(); 55 | 56 | #if !defined(INTERRUPT_CONTROL_ENDPOINT) 57 | USB_USBTask(); 58 | #endif 59 | 60 | if (BytesProcessed != NULL) 61 | { 62 | *BytesProcessed += BytesInTransfer; 63 | return ENDPOINT_RWSTREAM_IncompleteTransfer; 64 | } 65 | 66 | if ((ErrorCode = Endpoint_WaitUntilReady())) 67 | return ErrorCode; 68 | } 69 | else 70 | { 71 | TEMPLATE_TRANSFER_BYTE(DataStream); 72 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 73 | Length--; 74 | BytesInTransfer++; 75 | } 76 | } 77 | 78 | return ENDPOINT_RWSTREAM_NoError; 79 | } 80 | 81 | #undef TEMPLATE_FUNC_NAME 82 | #undef TEMPLATE_BUFFER_TYPE 83 | #undef TEMPLATE_TRANSFER_BYTE 84 | #undef TEMPLATE_CLEAR_ENDPOINT 85 | #undef TEMPLATE_BUFFER_OFFSET 86 | #undef TEMPLATE_BUFFER_MOVE 87 | 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, 34 | uint16_t Length, 35 | uint16_t* const BytesProcessed) 36 | { 37 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 38 | uint16_t BytesInTransfer = 0; 39 | uint8_t ErrorCode; 40 | 41 | Pipe_SetPipeToken(TEMPLATE_TOKEN); 42 | 43 | if ((ErrorCode = Pipe_WaitUntilReady())) 44 | return ErrorCode; 45 | 46 | if (BytesProcessed != NULL) 47 | { 48 | Length -= *BytesProcessed; 49 | TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed); 50 | } 51 | 52 | while (Length) 53 | { 54 | if (!(Pipe_IsReadWriteAllowed())) 55 | { 56 | TEMPLATE_CLEAR_PIPE(); 57 | 58 | if (BytesProcessed != NULL) 59 | { 60 | *BytesProcessed += BytesInTransfer; 61 | return PIPE_RWSTREAM_IncompleteTransfer; 62 | } 63 | 64 | if ((ErrorCode = Pipe_WaitUntilReady())) 65 | return ErrorCode; 66 | } 67 | else 68 | { 69 | TEMPLATE_TRANSFER_BYTE(DataStream); 70 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 71 | Length--; 72 | BytesInTransfer++; 73 | } 74 | } 75 | 76 | return PIPE_RWSTREAM_NoError; 77 | } 78 | 79 | #undef TEMPLATE_FUNC_NAME 80 | #undef TEMPLATE_BUFFER_TYPE 81 | #undef TEMPLATE_TOKEN 82 | #undef TEMPLATE_TRANSFER_BYTE 83 | #undef TEMPLATE_CLEAR_PIPE 84 | #undef TEMPLATE_BUFFER_OFFSET 85 | #undef TEMPLATE_BUFFER_MOVE 86 | 87 | #endif 88 | 89 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/Events.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_EVENTS_C 32 | #define __INCLUDE_FROM_USB_DRIVER 33 | #include "Events.h" 34 | 35 | void USB_Event_Stub(void) 36 | { 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/OTG.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Common USB OTG definitions for all architectures. 33 | * \copydetails Group_OTG 34 | * 35 | * \note This file should not be included directly. It is automatically included as needed by the USB driver 36 | * dispatch header located in LUFA/Drivers/USB/USB.h. 37 | */ 38 | 39 | /** \ingroup Group_USB 40 | * \defgroup Group_OTG USB On The Go (OTG) Management 41 | * \brief USB OTG management definitions. 42 | * 43 | * This module contains macros for embedded USB hosts with dual role On The Go capabilities, for managing role 44 | * exchange. OTG is a way for two USB dual role devices to talk to one another directly without fixed device/host 45 | * roles. 46 | * 47 | * @{ 48 | */ 49 | 50 | #ifndef __USBOTG_H__ 51 | #define __USBOTG_H__ 52 | 53 | /* Includes: */ 54 | #include "../../../Common/Common.h" 55 | #include "USBMode.h" 56 | 57 | /* Enable C linkage for C++ Compilers: */ 58 | #if defined(__cplusplus) 59 | extern "C" { 60 | #endif 61 | 62 | /* Preprocessor Checks: */ 63 | #if !defined(__INCLUDE_FROM_USB_DRIVER) 64 | #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead. 65 | #endif 66 | 67 | /* Architecture Includes: */ 68 | #if (ARCH == ARCH_AVR8) 69 | #include "AVR8/OTG_AVR8.h" 70 | #endif 71 | 72 | /* Disable C linkage for C++ Compilers: */ 73 | #if defined(__cplusplus) 74 | } 75 | #endif 76 | 77 | #endif 78 | 79 | /** @} */ 80 | 81 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/UC3/Device_UC3.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_UC3) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_DEVICE) 38 | 39 | #include "../Device.h" 40 | 41 | void USB_Device_SendRemoteWakeup(void) 42 | { 43 | USB_CLK_Unfreeze(); 44 | 45 | AVR32_USBB.UDCON.rmwkup = true; 46 | while (AVR32_USBB.UDCON.rmwkup); 47 | } 48 | 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (void* const Buffer, 34 | uint16_t Length) 35 | { 36 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 37 | 38 | if (!(Length)) 39 | Endpoint_ClearOUT(); 40 | 41 | while (Length) 42 | { 43 | uint8_t USB_DeviceState_LCL = USB_DeviceState; 44 | 45 | if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 46 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 47 | else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 48 | return ENDPOINT_RWCSTREAM_BusSuspended; 49 | else if (Endpoint_IsSETUPReceived()) 50 | return ENDPOINT_RWCSTREAM_HostAborted; 51 | 52 | if (Endpoint_IsOUTReceived()) 53 | { 54 | while (Length && Endpoint_BytesInEndpoint()) 55 | { 56 | TEMPLATE_TRANSFER_BYTE(DataStream); 57 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 58 | Length--; 59 | } 60 | 61 | Endpoint_ClearOUT(); 62 | } 63 | } 64 | 65 | while (!(Endpoint_IsINReady())) 66 | { 67 | uint8_t USB_DeviceState_LCL = USB_DeviceState; 68 | 69 | if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 70 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 71 | else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 72 | return ENDPOINT_RWCSTREAM_BusSuspended; 73 | } 74 | 75 | return ENDPOINT_RWCSTREAM_NoError; 76 | } 77 | 78 | #undef TEMPLATE_BUFFER_OFFSET 79 | #undef TEMPLATE_BUFFER_MOVE 80 | #undef TEMPLATE_FUNC_NAME 81 | #undef TEMPLATE_TRANSFER_BYTE 82 | 83 | #endif 84 | 85 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, 34 | uint16_t Length, 35 | uint16_t* const BytesProcessed) 36 | { 37 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 38 | uint16_t BytesInTransfer = 0; 39 | uint8_t ErrorCode; 40 | 41 | if ((ErrorCode = Endpoint_WaitUntilReady())) 42 | return ErrorCode; 43 | 44 | if (BytesProcessed != NULL) 45 | { 46 | Length -= *BytesProcessed; 47 | TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed); 48 | } 49 | 50 | while (Length) 51 | { 52 | if (!(Endpoint_IsReadWriteAllowed())) 53 | { 54 | TEMPLATE_CLEAR_ENDPOINT(); 55 | 56 | #if !defined(INTERRUPT_CONTROL_ENDPOINT) 57 | USB_USBTask(); 58 | #endif 59 | 60 | if (BytesProcessed != NULL) 61 | { 62 | *BytesProcessed += BytesInTransfer; 63 | return ENDPOINT_RWSTREAM_IncompleteTransfer; 64 | } 65 | 66 | if ((ErrorCode = Endpoint_WaitUntilReady())) 67 | return ErrorCode; 68 | } 69 | else 70 | { 71 | TEMPLATE_TRANSFER_BYTE(DataStream); 72 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 73 | Length--; 74 | BytesInTransfer++; 75 | } 76 | } 77 | 78 | return ENDPOINT_RWSTREAM_NoError; 79 | } 80 | 81 | #undef TEMPLATE_FUNC_NAME 82 | #undef TEMPLATE_BUFFER_TYPE 83 | #undef TEMPLATE_TRANSFER_BYTE 84 | #undef TEMPLATE_CLEAR_ENDPOINT 85 | #undef TEMPLATE_BUFFER_OFFSET 86 | #undef TEMPLATE_BUFFER_MOVE 87 | 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, 34 | uint16_t Length, 35 | uint16_t* const BytesProcessed) 36 | { 37 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 38 | uint16_t BytesInTransfer = 0; 39 | uint8_t ErrorCode; 40 | 41 | Pipe_SetPipeToken(TEMPLATE_TOKEN); 42 | 43 | if ((ErrorCode = Pipe_WaitUntilReady())) 44 | return ErrorCode; 45 | 46 | if (BytesProcessed != NULL) 47 | { 48 | Length -= *BytesProcessed; 49 | TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed); 50 | } 51 | 52 | while (Length) 53 | { 54 | if (!(Pipe_IsReadWriteAllowed())) 55 | { 56 | TEMPLATE_CLEAR_PIPE(); 57 | 58 | if (BytesProcessed != NULL) 59 | { 60 | *BytesProcessed += BytesInTransfer; 61 | return PIPE_RWSTREAM_IncompleteTransfer; 62 | } 63 | 64 | if ((ErrorCode = Pipe_WaitUntilReady())) 65 | return ErrorCode; 66 | } 67 | else 68 | { 69 | TEMPLATE_TRANSFER_BYTE(DataStream); 70 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 71 | Length--; 72 | BytesInTransfer++; 73 | } 74 | } 75 | 76 | return PIPE_RWSTREAM_NoError; 77 | } 78 | 79 | #undef TEMPLATE_FUNC_NAME 80 | #undef TEMPLATE_BUFFER_TYPE 81 | #undef TEMPLATE_TOKEN 82 | #undef TEMPLATE_TRANSFER_BYTE 83 | #undef TEMPLATE_CLEAR_PIPE 84 | #undef TEMPLATE_BUFFER_OFFSET 85 | #undef TEMPLATE_BUFFER_MOVE 86 | 87 | #endif 88 | 89 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/USBInterrupt.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief USB controller interrupt service routine management. 33 | * 34 | * This file contains definitions required for the correct handling of low level USB service routine interrupts 35 | * from the USB controller. 36 | * 37 | * \note This file should not be included directly. It is automatically included as needed by the USB driver 38 | * dispatch header located in LUFA/Drivers/USB/USB.h. 39 | */ 40 | 41 | #ifndef __USBINTERRUPT_H__ 42 | #define __USBINTERRUPT_H__ 43 | 44 | /* Includes: */ 45 | #include "../../../Common/Common.h" 46 | #include "USBMode.h" 47 | 48 | /* Enable C linkage for C++ Compilers: */ 49 | #if defined(__cplusplus) 50 | extern "C" { 51 | #endif 52 | 53 | /* Preprocessor Checks: */ 54 | #if !defined(__INCLUDE_FROM_USB_DRIVER) 55 | #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead. 56 | #endif 57 | 58 | /* Architecture Includes: */ 59 | #if (ARCH == ARCH_AVR8) 60 | #include "AVR8/USBInterrupt_AVR8.h" 61 | #elif (ARCH == ARCH_UC3) 62 | #include "UC3/USBInterrupt_UC3.h" 63 | #elif (ARCH == ARCH_XMEGA) 64 | #include "XMEGA/USBInterrupt_XMEGA.h" 65 | #endif 66 | 67 | /* Disable C linkage for C++ Compilers: */ 68 | #if defined(__cplusplus) 69 | } 70 | #endif 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/USBTask.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_USBTASK_C 32 | #define __INCLUDE_FROM_USB_DRIVER 33 | #include "USBTask.h" 34 | 35 | volatile bool USB_IsInitialized; 36 | USB_Request_Header_t USB_ControlRequest; 37 | 38 | #if defined(USB_CAN_BE_HOST) && !defined(HOST_STATE_AS_GPIOR) 39 | volatile uint8_t USB_HostState; 40 | #endif 41 | 42 | #if defined(USB_CAN_BE_DEVICE) && !defined(DEVICE_STATE_AS_GPIOR) 43 | volatile uint8_t USB_DeviceState; 44 | #endif 45 | 46 | void USB_USBTask(void) 47 | { 48 | #if defined(USB_CAN_BE_BOTH) 49 | if (USB_CurrentMode == USB_MODE_Device) 50 | USB_DeviceTask(); 51 | else if (USB_CurrentMode == USB_MODE_Host) 52 | USB_HostTask(); 53 | #elif defined(USB_CAN_BE_HOST) 54 | USB_HostTask(); 55 | #elif defined(USB_CAN_BE_DEVICE) 56 | USB_DeviceTask(); 57 | #endif 58 | } 59 | 60 | #if defined(USB_CAN_BE_DEVICE) 61 | static void USB_DeviceTask(void) 62 | { 63 | if (USB_DeviceState == DEVICE_STATE_Unattached) 64 | return; 65 | 66 | uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); 67 | 68 | Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); 69 | 70 | if (Endpoint_IsSETUPReceived()) 71 | USB_Device_ProcessControlRequest(); 72 | 73 | Endpoint_SelectEndpoint(PrevEndpoint); 74 | } 75 | #endif 76 | 77 | #if defined(USB_CAN_BE_HOST) 78 | static void USB_HostTask(void) 79 | { 80 | uint8_t PrevPipe = Pipe_GetCurrentPipe(); 81 | 82 | Pipe_SelectPipe(PIPE_CONTROLPIPE); 83 | 84 | USB_Host_ProcessNextHostState(); 85 | 86 | Pipe_SelectPipe(PrevPipe); 87 | } 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_XMEGA) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_DEVICE) 38 | 39 | #include "../Device.h" 40 | 41 | void USB_Device_SendRemoteWakeup(void) 42 | { 43 | USB.CTRLB |= USB_RWAKEUP_bm; 44 | } 45 | 46 | #endif 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_XMEGA) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_HOST) 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_XMEGA) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_HOST) 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_USB_DRIVER 32 | #include "../USBMode.h" 33 | 34 | #if defined(USB_CAN_BE_HOST) 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (void* const Buffer, 34 | uint16_t Length) 35 | { 36 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 37 | 38 | Endpoint_SelectEndpoint(USB_Endpoint_SelectedEndpoint & ~ENDPOINT_DIR_IN); 39 | 40 | if (!(Length)) 41 | Endpoint_ClearOUT(); 42 | 43 | while (Length) 44 | { 45 | uint8_t USB_DeviceState_LCL = USB_DeviceState; 46 | 47 | if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 48 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 49 | else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 50 | return ENDPOINT_RWCSTREAM_BusSuspended; 51 | else if (Endpoint_IsSETUPReceived()) 52 | return ENDPOINT_RWCSTREAM_HostAborted; 53 | 54 | if (Endpoint_IsOUTReceived()) 55 | { 56 | while (Length && Endpoint_BytesInEndpoint()) 57 | { 58 | TEMPLATE_TRANSFER_BYTE(DataStream); 59 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 60 | Length--; 61 | } 62 | 63 | Endpoint_ClearOUT(); 64 | } 65 | } 66 | 67 | while (!(Endpoint_IsINReady())) 68 | { 69 | uint8_t USB_DeviceState_LCL = USB_DeviceState; 70 | 71 | if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 72 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 73 | else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 74 | return ENDPOINT_RWCSTREAM_BusSuspended; 75 | } 76 | 77 | return ENDPOINT_RWCSTREAM_NoError; 78 | } 79 | 80 | #undef TEMPLATE_BUFFER_OFFSET 81 | #undef TEMPLATE_BUFFER_MOVE 82 | #undef TEMPLATE_FUNC_NAME 83 | #undef TEMPLATE_TRANSFER_BYTE 84 | 85 | #endif 86 | 87 | -------------------------------------------------------------------------------- /firmware/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #if defined(TEMPLATE_FUNC_NAME) 32 | 33 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE const Buffer, 34 | uint16_t Length, 35 | uint16_t* const BytesProcessed) 36 | { 37 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 38 | uint16_t BytesInTransfer = 0; 39 | uint8_t ErrorCode; 40 | 41 | if ((ErrorCode = Endpoint_WaitUntilReady())) 42 | return ErrorCode; 43 | 44 | if (BytesProcessed != NULL) 45 | { 46 | Length -= *BytesProcessed; 47 | TEMPLATE_BUFFER_MOVE(DataStream, *BytesProcessed); 48 | } 49 | 50 | while (Length) 51 | { 52 | if (!(Endpoint_IsReadWriteAllowed())) 53 | { 54 | TEMPLATE_CLEAR_ENDPOINT(); 55 | 56 | #if !defined(INTERRUPT_CONTROL_ENDPOINT) 57 | USB_USBTask(); 58 | #endif 59 | 60 | if (BytesProcessed != NULL) 61 | { 62 | *BytesProcessed += BytesInTransfer; 63 | return ENDPOINT_RWSTREAM_IncompleteTransfer; 64 | } 65 | 66 | if ((ErrorCode = Endpoint_WaitUntilReady())) 67 | return ErrorCode; 68 | } 69 | else 70 | { 71 | TEMPLATE_TRANSFER_BYTE(DataStream); 72 | TEMPLATE_BUFFER_MOVE(DataStream, 1); 73 | Length--; 74 | BytesInTransfer++; 75 | } 76 | } 77 | 78 | return ENDPOINT_RWSTREAM_NoError; 79 | } 80 | 81 | #undef TEMPLATE_FUNC_NAME 82 | #undef TEMPLATE_BUFFER_TYPE 83 | #undef TEMPLATE_TRANSFER_BYTE 84 | #undef TEMPLATE_CLEAR_ENDPOINT 85 | #undef TEMPLATE_BUFFER_OFFSET 86 | #undef TEMPLATE_BUFFER_MOVE 87 | 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /firmware/LUFA/License.txt: -------------------------------------------------------------------------------- 1 | LUFA Library 2 | Copyright (C) Dean Camera, 2015. 3 | 4 | dean [at] fourwalledcubicle [dot] com 5 | www.lufa-lib.org 6 | 7 | 8 | Permission to use, copy, modify, and distribute this software 9 | and its documentation for any purpose is hereby granted without 10 | fee, provided that the above copyright notice appear in all 11 | copies and that both that the copyright notice and this 12 | permission notice and warranty disclaimer appear in supporting 13 | documentation, and that the name of the author not be used in 14 | advertising or publicity pertaining to distribution of the 15 | software without specific, written prior permission. 16 | 17 | The author disclaims all warranties with regard to this 18 | software, including all implied warranties of merchantability 19 | and fitness. In no event shall the author be liable for any 20 | special, indirect or consequential damages or any damages 21 | whatsoever resulting from loss of use, data or profits, whether 22 | in an action of contract, negligence or other tortious action, 23 | arising out of or in connection with the use or performance of 24 | this software. 25 | -------------------------------------------------------------------------------- /firmware/LUFA/Platform/UC3/InterruptManagement.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../Common/Common.h" 32 | #if (ARCH == ARCH_UC3) 33 | 34 | #define __INCLUDE_FROM_INTMANAGEMENT_C 35 | #include "InterruptManagement.h" 36 | 37 | /** Interrupt vector table, containing the ISR to call for each interrupt group */ 38 | InterruptHandlerPtr_t InterruptHandlers[AVR32_INTC_NUM_INT_GRPS]; 39 | 40 | /** ISR for unhandled interrupt groups */ 41 | ISR(Unhandled_Interrupt) 42 | { 43 | for (;;); 44 | } 45 | 46 | InterruptHandlerPtr_t INTC_GetInterruptHandler(const uint_reg_t InterruptLevel) 47 | { 48 | return InterruptHandlers[AVR32_INTC.icr[AVR32_INTC_INT3 - InterruptLevel]]; 49 | } 50 | 51 | void INTC_Init(void) 52 | { 53 | for (uint8_t InterruptGroup = 0; InterruptGroup < AVR32_INTC_NUM_INT_GRPS; InterruptGroup++) 54 | { 55 | InterruptHandlers[InterruptGroup] = Unhandled_Interrupt; 56 | AVR32_INTC.ipr[InterruptGroup] = Autovector_Table[AVR32_INTC_INT0]; 57 | } 58 | 59 | __builtin_mtsr(AVR32_EVBA, (uintptr_t)&EVBA_Table); 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /firmware/LUFA/Platform/UC3/UC3ExperimentalInfo.txt: -------------------------------------------------------------------------------- 1 | Please note that the UC3 architecture support is EXPERIMENTAL at this time, and may be non-functional/incomplete in some areas. Please refer to the Known Issues section of the LUFA manual. -------------------------------------------------------------------------------- /firmware/LUFA/Platform/XMEGA/XMEGAExperimentalInfo.txt: -------------------------------------------------------------------------------- 1 | Please note that the XMEGA architecture support is EXPERIMENTAL at this time, and may be non-functional/incomplete in some areas. Please refer to the Known Issues section of the LUFA manual. -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/Docbook/mshelp/README.txt: -------------------------------------------------------------------------------- 1 | This is a modified/updated version of the Microsoft HV1 Docbook transform, written by Morten Engelhardt Olsen, 2 | 3 | Originally posted at http://sourceforge.net/p/docbook/feature-requests/461/, this has been further updated by Morten to make it compatible with more recent DocBook versions. 4 | 5 | --------------------------- 6 | / This documentation system \ 7 | \ is udderly ridiculous! / 8 | --------------------------- 9 | \ ^__^ 10 | \ (oo)\_______ 11 | (__)\ )\/\ 12 | ||----w | 13 | || || 14 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/Docbook/mshelp/docbook.xsl: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 31 | 32 | 33 | 38 | 39 | 40 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/Docbook/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the Docbook XSLT docbook-xsl-1.78.1 release contents into this directory (i.e. with the root Docbook files in the current folder). The Docbook releases can be found at http://sourceforge.net/projects/docbook/files/docbook-xsl/ . 2 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/HV1/helpcontentsetup.msha: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | LUFA Help 12 | 13 | 14 |
15 | FourWalledCubicle 16 | LUFA 17 | LUFA Help 18 | en-us 19 |
20 |
21 |
22 | lufa_studio_help.mshc 23 | lufa_studio_help.mshc 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/HV1/lufa_helpcontentsetup_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/HV1/lufa_hv1_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/HV1/lufa_studio_help_styling.css: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | .programlisting { 10 | display: block; 11 | margin-left: 15px; 12 | padding: 10px; 13 | background-color: #f4f4f4; 14 | border: 1px solid #aaaaaa; 15 | font-family: "Consolas", "Courier New", sans-serif; 16 | } 17 | 18 | code { 19 | background-color: #f4f4f4; 20 | font-family: "Consolas", "Courier New", sans-serif; 21 | } 22 | 23 | .note, .warning, .tip { 24 | display: block; 25 | margin-left: 15px; 26 | padding-left: 10px; 27 | padding-bottom: 5px; 28 | background-color: #f4f4f4; 29 | border: 1px solid #aaaaaa; 30 | } 31 | 32 | table { 33 | border: 1px solid #aaaaaa; 34 | border-collapse: collapse; 35 | margin-left: 15px; 36 | font-size: 10pt; 37 | } 38 | 39 | table thead { 40 | background-color: #f4f4f4; 41 | } 42 | 43 | table thead th { 44 | padding: 5px; 45 | } 46 | 47 | table tbody td { 48 | padding: 5px; 49 | } 50 | 51 | ul { 52 | padding-left: 20px; 53 | } 54 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/ProjectGenerator/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the ASF Project Generator into this directory (i.e. with the Python scripts in the current folder). The project generator can be extracted from the release versions of Atmel Studio's ASF extension. -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/LUFA.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/StudioIntegration/VSIX/LUFA.dll -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/LUFA.pkgdef: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/firmware/LUFA/StudioIntegration/VSIX/LUFA.pkgdef -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/[Content_Types].xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/asf-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | FourWalledCubicle 4 | LUFA 5 | Dean Camera 6 | 7 | True 8 | 9 | 10 | 11 | 0 12 | 13 | 14 | content.xml.cache 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LUFA Library 6 | Dean Camera 7 | 0 8 | http://www.lufa-lib.org 9 | LUFA, the Lightweight USB Framework for AVRs. 10 | 11 | License.txt 12 | LUFA_thumb.png 13 | LUFA.png 14 | 15 | 16 | AtmelStudio 17 | 18 | 19 | 20 | 1033 21 | 22 | false 23 | 24 | 25 | 26 | 27 | 28 | LUFA.pkgdef 29 | helpcontentsetup.msha 30 | asf-manifest.xml 31 | 32 | 33 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/generate_caches.py: -------------------------------------------------------------------------------- 1 | """ 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | """ 8 | 9 | import sys 10 | sys.path.append("ProjectGenerator") 11 | 12 | 13 | def show_message(message): 14 | print("[Project Generator] %s" % message) 15 | sys.stdout.flush() 16 | 17 | 18 | def main(lufa_root_path): 19 | try: 20 | from asf_avrstudio5_interface import PythonFacade 21 | except ImportError: 22 | print("Fatal Error: The ASF project generator is missing.") 23 | return 1 24 | 25 | p = PythonFacade(lufa_root_path) 26 | 27 | show_message("Checking database sanity...") 28 | p.check_extension_database_sanity(lufa_root_path) 29 | 30 | show_message("Building cache files...") 31 | p.generate_extension_cache_files(lufa_root_path) 32 | 33 | show_message("Cache files created.") 34 | return 0 35 | 36 | 37 | if __name__ == "__main__": 38 | sys.exit(main(sys.argv[1])) 39 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/lufa_asfmanifest_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | . 31 | 32 | . 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/VSIX/lufa_vsmanifest_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/XDK/lufa_extension_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | This file has been automatically generated from the LUFA Atmel Studio integration XML files. 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | . 44 | 45 | . 46 | 47 | 48 | 49 | 50 | 52 | 53 | 54 | 55 | 56 | /html/ 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | /html/ 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | Sourced from 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/XDK/lufa_indent_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_common.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_misc.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb_class.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb_class_android.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Common definitions and Host mode implementation of the Android Open Accessory USB class. 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | Common definitions only (no implementations) of the Android Open Accessory USB class. 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb_class_si.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Common definitions and Host mode implementation of the Still Image USB class. 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | Common definitions only (no implementations) of the Still Image USB class. 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb_core_avr8.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb_core_uc3.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_drivers_usb_core_xmega.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_platform.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_platform_uc3.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /firmware/LUFA/StudioIntegration/lufa_platform_xmega.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /firmware/LUFA/Version.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2015. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * \brief LUFA library version constants. 34 | * 35 | * Version constants for informational purposes and version-specific macro creation. This header file contains the 36 | * current LUFA version number in several forms, for use in the user-application (for example, for printing out 37 | * whilst debugging, or for testing for version compatibility). 38 | */ 39 | 40 | #ifndef __LUFA_VERSION_H__ 41 | #define __LUFA_VERSION_H__ 42 | 43 | /* Public Interface - May be used in end-application: */ 44 | /* Macros: */ 45 | /** Indicates the version number of the library, as an integer. */ 46 | #define LUFA_VERSION_INTEGER 0x151115 47 | 48 | /** Indicates the version number of the library, as a string. */ 49 | #define LUFA_VERSION_STRING "151115" 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /firmware/LUFA/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2015. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # --------------------------------------- 9 | # Makefile for the LUFA library itself. 10 | # --------------------------------------- 11 | 12 | LUFA_VERSION_NUM = $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2) 13 | EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build StudioIntegration doxyfile *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin 14 | 15 | # Default target - no default action when attempting to build the core directly 16 | all: 17 | 18 | # Export the library core as a TAR archive for importing into an IDE 19 | export_tar: 20 | @echo Exporting LUFA library to a TAR archive... 21 | @tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) * 22 | @tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates 23 | @echo Export LUFA_$(LUFA_VERSION_NUM).tar complete. 24 | 25 | # Display the LUFA version of this library copy 26 | version: 27 | @echo "LUFA $(LUFA_VERSION_NUM)" 28 | 29 | # Check if this is being included from a legacy or non LUFA build system makefile 30 | ifneq ($(LUFA_PATH),) 31 | LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/ 32 | 33 | include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk 34 | else 35 | LUFA_BUILD_MODULES += MASTER 36 | LUFA_BUILD_TARGETS += export_tar version 37 | 38 | LUFA_PATH = . 39 | ARCH = {AVR8,UC3,XMEGA} 40 | DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM) 41 | 42 | # Remove all object and associated files from the LUFA library core 43 | clean: 44 | rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o) 45 | rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d) 46 | rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst) 47 | 48 | include Build/lufa_core.mk 49 | include Build/lufa_sources.mk 50 | include Build/lufa_doxygen.mk 51 | endif 52 | 53 | .PHONY: all export_tar version clean 54 | -------------------------------------------------------------------------------- /firmware/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2015. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # -------------------------------------- 9 | # LUFA Project Makefile. 10 | # -------------------------------------- 11 | 12 | # Run "make help" for target help. 13 | 14 | MCU = atmega32u4 15 | ARCH = AVR8 16 | BOARD = NONE 17 | F_CPU = 16000000 18 | F_USB = $(F_CPU) 19 | OPTIMIZATION = s 20 | TARGET = swc_usb 21 | SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) 22 | LUFA_PATH = ./LUFA 23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ 24 | LD_FLAGS = 25 | 26 | # Default target 27 | all: 28 | 29 | # Include LUFA build script makefiles 30 | include $(LUFA_PATH)/Build/lufa_core.mk 31 | include $(LUFA_PATH)/Build/lufa_sources.mk 32 | include $(LUFA_PATH)/Build/lufa_build.mk 33 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk 34 | include $(LUFA_PATH)/Build/lufa_doxygen.mk 35 | include $(LUFA_PATH)/Build/lufa_dfu.mk 36 | include $(LUFA_PATH)/Build/lufa_hid.mk 37 | include $(LUFA_PATH)/Build/lufa_avrdude.mk 38 | include $(LUFA_PATH)/Build/lufa_atprogram.mk 39 | -------------------------------------------------------------------------------- /firmware/swc_usb.h: -------------------------------------------------------------------------------- 1 | #ifndef _SWC_USB_H_ 2 | #define _SWC_USB_H_ 3 | 4 | /* Includes: */ 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Descriptors.h" 12 | #include 13 | 14 | /* Function Prototypes: */ 15 | void send_feedback(char const *fmt, ...); 16 | void setup_hardware(void); 17 | void activate_ports(void); 18 | void deactivate_ports(void); 19 | void USB_tasks(void); 20 | uint8_t read_status(void); 21 | uint8_t read_control(void); 22 | void write_data(uint8_t byte); 23 | void write_control(uint8_t byte); 24 | void flip_led(void); 25 | void cdc_device_receive_bytes(uint8_t *buffer, uint8_t length); 26 | void write_rom(uint16_t total_blocks, uint8_t emu_mode_select); 27 | void wait_busy_bit(bool bit, uint8_t poll_min); 28 | void send_byte(uint8_t byte); 29 | void send_command(uint8_t command_code, uint16_t address, uint16_t length); 30 | void send_block(uint16_t address, uint16_t block_size); 31 | void send_command0(uint16_t address, uint8_t byte); 32 | void read_sram(void); 33 | void write_sram(uint16_t total_bytes); 34 | bool receive_block(uint16_t address, uint16_t len); 35 | uint8_t receive_byte(void); 36 | void EVENT_USB_Device_ConfigurationChanged(void); 37 | void EVENT_USB_Device_ControlRequest(void); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /pcb/swc_usb.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/pcb/swc_usb.zip -------------------------------------------------------------------------------- /pcb/swc_usb_schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/pcb/swc_usb_schematic.png -------------------------------------------------------------------------------- /pcb/usb_adapter_pcb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/pcb/usb_adapter_pcb.jpg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pyserial >= 3.0.1 2 | click >= 6.2 -------------------------------------------------------------------------------- /usb_adapter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tltx/swc_usb/f5d38a98ed20df273efa924cd18244d78eb936a4/usb_adapter.jpg --------------------------------------------------------------------------------