├── driver ├── servant64 │ ├── Makefile │ └── xlink.h ├── at90usb162 │ ├── LUFA │ │ ├── Drivers │ │ │ ├── Board │ │ │ │ ├── Temperature.o │ │ │ │ ├── Temperature.d │ │ │ │ ├── AVR8 │ │ │ │ │ ├── UNO │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── BUI │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── MAXIMUS │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── DUCE │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── RZUSBSTICK │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── MULTIO │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── BLACKCAT │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── LEONARDO │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── BIGMULTIO │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── ADAFRUITU4 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── MINIMUS │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── SPARKFUN8U2 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── U2S │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── UDIP │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── TUL │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── CULV3 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── ATAVRUSBRF01 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── BENITO │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── JMDBU2 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── USBTINYMKII │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── USBFOO │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── MICROSIN162 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── STANGE_ISP │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── OLIMEX162 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── OLIMEX32U4 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── OLIMEXISPMK2 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── OLIMEXT32U4 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── TEENSY │ │ │ │ │ │ └── Board.h │ │ │ │ │ └── BUMBLEB │ │ │ │ │ │ └── Board.h │ │ │ │ ├── UC3 │ │ │ │ │ ├── EVK1104 │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── UC3A3_XPLAINED │ │ │ │ │ │ └── Board.h │ │ │ │ │ ├── EVK1100 │ │ │ │ │ │ └── Board.h │ │ │ │ │ └── EVK1101 │ │ │ │ │ │ └── Board.h │ │ │ │ ├── Temperature.c │ │ │ │ └── XMEGA │ │ │ │ │ ├── C3_XPLAINED │ │ │ │ │ └── Board.h │ │ │ │ │ ├── B1_XPLAINED │ │ │ │ │ └── Board.h │ │ │ │ │ └── A3BU_XPLAINED │ │ │ │ │ └── Board.h │ │ │ ├── Peripheral │ │ │ │ ├── AVR8 │ │ │ │ │ ├── TWI_AVR8.o │ │ │ │ │ ├── Serial_AVR8.o │ │ │ │ │ ├── TWI_AVR8.d │ │ │ │ │ └── Serial_AVR8.d │ │ │ │ ├── ADC.h │ │ │ │ └── SPI.h │ │ │ └── USB │ │ │ │ └── Core │ │ │ │ ├── XMEGA │ │ │ │ ├── Pipe_XMEGA.c │ │ │ │ ├── Host_XMEGA.c │ │ │ │ ├── PipeStream_XMEGA.c │ │ │ │ ├── Device_XMEGA.c │ │ │ │ └── Template │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ └── Template_Endpoint_Control_R.c │ │ │ │ ├── Events.c │ │ │ │ ├── UC3 │ │ │ │ ├── Device_UC3.c │ │ │ │ └── Template │ │ │ │ │ ├── Template_Pipe_RW.c │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ └── Template_Endpoint_Control_R.c │ │ │ │ ├── AVR8 │ │ │ │ ├── Device_AVR8.c │ │ │ │ └── Template │ │ │ │ │ ├── Template_Pipe_RW.c │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ └── Template_Endpoint_Control_R.c │ │ │ │ ├── USBInterrupt.h │ │ │ │ ├── OTG.h │ │ │ │ └── USBTask.c │ │ ├── Platform │ │ │ ├── UC3 │ │ │ │ ├── UC3ExperimentalInfo.txt │ │ │ │ └── InterruptManagement.c │ │ │ └── XMEGA │ │ │ │ └── XMEGAExperimentalInfo.txt │ │ ├── License.txt │ │ ├── Build │ │ │ └── HID_EEPROM_Loader │ │ │ │ ├── makefile │ │ │ │ └── HID_EEPROM_Loader.c │ │ ├── makefile │ │ └── Version.h │ ├── Makefile │ ├── xlink.h │ └── descriptors.h ├── protocol.h ├── serial.h ├── shm.h ├── parport.h ├── usb.h └── driver.h ├── vice └── vice-2.4.19-r29590-xlink.patch ├── hardware ├── usb │ └── at90usb162 │ │ ├── lib │ │ ├── userport.dcm │ │ ├── userport.lib │ │ └── userport.bak │ │ ├── gerber │ │ ├── WARNING.txt │ │ ├── at90usb162-Edge.Cuts.gbr │ │ └── at90usb162.drl │ │ └── at90usb162.pro └── parport │ ├── lib │ └── userport.lib │ └── cable.pro ├── target.asm ├── target.h ├── tools ├── make-udev-rules.sh ├── make-code.c ├── make-msvc-lib.sh ├── make-help.c ├── make-bootstrap.c └── make-kernal.c ├── error.h ├── range.h ├── xlink.rc ├── loader.asm ├── machine.h ├── etc └── bash_completion.d │ └── xlink ├── README.md ├── bootstrap.asm ├── machine.c ├── client.h └── util.h /driver/servant64/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hbekel/xlink/HEAD/driver/servant64/Makefile -------------------------------------------------------------------------------- /vice/vice-2.4.19-r29590-xlink.patch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hbekel/xlink/HEAD/vice/vice-2.4.19-r29590-xlink.patch -------------------------------------------------------------------------------- /hardware/usb/at90usb162/lib/userport.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 Date: 23.09.2014 08:40:13 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/Temperature.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hbekel/xlink/HEAD/driver/at90usb162/LUFA/Drivers/Board/Temperature.o -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hbekel/xlink/HEAD/driver/at90usb162/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.o -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hbekel/xlink/HEAD/driver/at90usb162/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.o -------------------------------------------------------------------------------- /target.asm: -------------------------------------------------------------------------------- 1 | /* -*- mode: kasm -*- */ 2 | 3 | .var target = "c64" 4 | 5 | .if(cmdLineVars.containsKey("target")) { 6 | .eval target = cmdLineVars.get("target") 7 | } 8 | -------------------------------------------------------------------------------- /target.h: -------------------------------------------------------------------------------- 1 | #ifdef linux 2 | #undef linux 3 | #define linux !defined(__CYGWIN__) 4 | #endif 5 | 6 | #define windows defined(WIN32) || defined(__CYGWIN__) 7 | 8 | #define mac defined(__APPLE__) 9 | 10 | #define posix linux || mac 11 | -------------------------------------------------------------------------------- /driver/at90usb162/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. -------------------------------------------------------------------------------- /driver/at90usb162/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. -------------------------------------------------------------------------------- /tools/make-udev-rules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat < 5 | 6 | #include "xlink.h" 7 | #include "util.h" 8 | 9 | #define SET_ERROR(c, f, ...) xlink_error->code = c; sprintf(xlink_error->message, f, ##__VA_ARGS__); logger->error(f, ##__VA_ARGS__); 10 | #define CLEAR_ERROR_IF(r) if (r) { xlink_error->code = XLINK_SUCCESS; sprintf(xlink_error->message, "Success"); } 11 | #define CLEAR_ERROR CLEAR_ERROR_IF(true) 12 | 13 | #endif // XLINK_ERROR_H 14 | -------------------------------------------------------------------------------- /hardware/usb/at90usb162/gerber/WARNING.txt: -------------------------------------------------------------------------------- 1 | These files come WITHOUT ANY WARRANTY. 2 | 3 | These gerber files SHOULD work for most manufacturers. However, you 4 | always need to make sure that the files you commit into production 5 | comply with the requirements of your chosen manufacturer. The 6 | manufacturer SHOULD state their requirements for gerber files on their 7 | website. 8 | 9 | To recreate these files with different parameters, open the pcb file 10 | in KiCAD's Pcbnew application and choose File -> Plot. 11 | 12 | Always use KiCAD's GerbView application to review the gerber files and 13 | the drill file prior to ordering pcbs. 14 | -------------------------------------------------------------------------------- /driver/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef SERIAL_H 2 | #define SERIAL_H 3 | 4 | #include "xlink.h" 5 | 6 | bool driver_serial_open(void); 7 | void driver_serial_close(void); 8 | void driver_serial_strobe(void); 9 | bool driver_serial_wait(int); 10 | unsigned char driver_serial_read(void); 11 | void driver_serial_write(unsigned char); 12 | bool driver_serial_send(unsigned char*, int); 13 | bool driver_serial_receive(unsigned char*, int); 14 | void driver_serial_input(void); 15 | void driver_serial_output(void); 16 | bool driver_serial_ping(void); 17 | void driver_serial_reset(void); 18 | void driver_serial_boot(void); 19 | void driver_serial_free(void); 20 | 21 | #endif // SERIAL_H 22 | -------------------------------------------------------------------------------- /hardware/usb/at90usb162/gerber/at90usb162-Edge.Cuts.gbr: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7) date 08/25/20 08:50:58* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.150000*% 10 | %ADD11C,0.100000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X234099100Y-156502100D02* 15 | X186588400Y-156502100D01* 16 | X234099100Y-111620300D02* 17 | X234099100Y-156502100D01* 18 | X186588400Y-111620300D02* 19 | X234099100Y-111620300D01* 20 | X186588400Y-156502100D02* 21 | X186588400Y-111620300D01* 22 | M02* 23 | -------------------------------------------------------------------------------- /tools/make-code.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char **argv) { 6 | 7 | char *filename = argv[1]; 8 | struct stat st; 9 | int size, i; 10 | FILE* f; 11 | 12 | stat(filename, &st); 13 | size = st.st_size; 14 | 15 | if((f = fopen(filename, "rb")) == NULL) { 16 | fprintf(stderr, "%s: error opening %s\n", argv[0], filename); 17 | return EXIT_FAILURE; 18 | } 19 | 20 | printf("unsigned char code[%d] = {\n", size); 21 | for(i=0; i xlink.def 7 | EXPORTS 8 | xlink_error 9 | xlink_version 10 | xlink_set_debug 11 | xlink_has_device 12 | xlink_set_device 13 | xlink_get_device 14 | xlink_identify 15 | xlink_relocate 16 | xlink_ping 17 | xlink_reset 18 | xlink_ready 19 | xlink_load 20 | xlink_save 21 | xlink_peek 22 | xlink_poke 23 | xlink_fill 24 | xlink_jump 25 | xlink_run 26 | xlink_inject 27 | xlink_begin 28 | xlink_send 29 | xlink_send_with_timeout 30 | xlink_receive 31 | xlink_receive_with_timeout 32 | xlink_end 33 | EOF 34 | 35 | lib /MACHINE:X86 /def:xlink.def /out:xlink.lib && \ 36 | rm xlink.def xlink.exp 37 | -------------------------------------------------------------------------------- /driver/parport.h: -------------------------------------------------------------------------------- 1 | #ifndef PARPORT_H 2 | #define PARPORT_H 3 | 4 | #define DRIVER_PARPORT_CONTROL_STROBE 0x01 5 | #define DRIVER_PARPORT_CONTROL_INIT 0x04 6 | #define DRIVER_PARPORT_CONTROL_SELECT 0x08 7 | #define DRIVER_PARPORT_CONTROL_IRQ 0x10 8 | #define DRIVER_PARPORT_CONTROL_INPUT 0x20 9 | 10 | bool driver_parport_open(void); 11 | void driver_parport_close(void); 12 | void driver_parport_strobe(void); 13 | bool driver_parport_wait(int); 14 | unsigned char driver_parport_read(void); 15 | void driver_parport_write(unsigned char); 16 | bool driver_parport_send(unsigned char*, int); 17 | bool driver_parport_receive(unsigned char*, int); 18 | void driver_parport_input(void); 19 | void driver_parport_output(void); 20 | bool driver_parport_ping(void); 21 | void driver_parport_reset(void); 22 | void driver_parport_boot(void); 23 | void driver_parport_free(void); 24 | 25 | #endif // PARPORT_H 26 | -------------------------------------------------------------------------------- /xlink.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // DLL version information. 4 | VS_VERSION_INFO VERSIONINFO 5 | FILEVERSION 1,0,0,0 6 | PRODUCTVERSION 1,0,0,0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_NT_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE VFT2_UNKNOWN 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "080904b0" 16 | BEGIN 17 | VALUE "CompanyName", "http://www.henning-bekel.de" 18 | VALUE "FileDescription", "data transfer system for the c64" 19 | VALUE "FileVersion", "1.0.0.0" 20 | VALUE "InternalName", "xlink" 21 | VALUE "LegalCopyright", "(c)2015 Henning Bekel" 22 | VALUE "OriginalFilename", "xlink.dll" 23 | VALUE "ProductName", "xlink library" 24 | VALUE "ProductVersion", "1.0.0.0" 25 | END 26 | END 27 | BLOCK "VarFileInfo" 28 | BEGIN 29 | VALUE "Translation", 0x809, 1200 30 | END 31 | END -------------------------------------------------------------------------------- /loader.asm: -------------------------------------------------------------------------------- 1 | /* -*- mode: kasm -*- */ 2 | 3 | .import source "server.h" 4 | 5 | .pc = basic 6 | 7 | .byte $0b, >basic, $0a, $00, $9e, $ff, $ff, $ff, $ff 8 | 9 | .pc = basic+$10 10 | 11 | .var size = cmdLineVars.get("size").asNumber() 12 | .var dest = $4000-size 13 | 14 | .var cnt = $22 15 | .var src = $fc 16 | .var dst = $fe 17 | 18 | .macro incword(ptr) { 19 | inc ptr 20 | bne done 21 | inc ptr+1 22 | done: 23 | } 24 | 25 | .macro decword(ptr) { 26 | dec ptr 27 | lda ptr 28 | cmp #$ff 29 | bne done 30 | dec ptr+1 31 | done: 32 | } 33 | 34 | main: { 35 | lda #size 38 | sta cnt+1 39 | 40 | lda #code 43 | sta src+1 44 | 45 | lda #dest 48 | sta dst+1 49 | 50 | ldy #$00 51 | 52 | copy: lda (src),y 53 | sta (dst),y 54 | :incword(src) 55 | :incword(dst) 56 | :decword(cnt) 57 | lda cnt 58 | bne copy 59 | lda cnt+1 60 | bne copy 61 | 62 | jmp dest 63 | } 64 | 65 | code: 66 | 67 | -------------------------------------------------------------------------------- /driver/at90usb162/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2013. 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 = at90usb162 15 | ARCH = AVR8 16 | BOARD = USER 17 | F_CPU = 8000000 18 | F_USB = $(F_CPU) 19 | OPTIMIZATION = 3 20 | TARGET = xlink 21 | SRC = $(TARGET).c descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) 22 | LUFA_PATH = LUFA 23 | CC_FLAGS = -DXLINK_SERIAL=$(XLINK_SERIAL) -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_dfu.mk 35 | -------------------------------------------------------------------------------- /machine.h: -------------------------------------------------------------------------------- 1 | #ifndef PRIVATE_H 2 | #define PRIVATE_H 3 | 4 | #if defined(WIN32) || defined(__CYGWIN__) 5 | #if defined(XLINK_LIBRARY_BUILD) 6 | #define IMPORTED 7 | #else 8 | #define IMPORTED __declspec(dllimport) 9 | #endif 10 | #else 11 | #define IMPORTED 12 | #endif 13 | 14 | #include "xlink.h" 15 | 16 | typedef struct { 17 | int type; 18 | char name[256]; 19 | uchar memory; 20 | uchar bank; 21 | uchar safe_memory; 22 | uchar safe_bank; 23 | ushort default_basic_start; 24 | ushort basic_start; 25 | ushort basic_end; 26 | ushort warmstart; 27 | ushort mode; 28 | uchar prgmode; 29 | uint io; 30 | uint screenram; 31 | uint loram; 32 | uint hiram; 33 | uint lorom; 34 | uint hirom; 35 | uint benchmark; 36 | ushort free_ram_area; 37 | uchar* (*server) (ushort address, int *size); 38 | uchar* (*basic_server) (int *size); 39 | void (*kernal) (uchar *image); 40 | } xlink_machine_t; 41 | 42 | IMPORTED extern xlink_machine_t c64; 43 | IMPORTED extern xlink_machine_t c128; 44 | IMPORTED extern xlink_machine_t *machine; 45 | 46 | #endif // PRIVATE_H 47 | -------------------------------------------------------------------------------- /etc/bash_completion.d/xlink: -------------------------------------------------------------------------------- 1 | # -*- shell-script -*- 2 | 3 | function _xlink { 4 | 5 | COMPREPLY=() 6 | local cur="${COMP_WORDS[COMP_CWORD]}" 7 | local prev="${COMP_WORDS[COMP_CWORD-1]}" 8 | local sec="${COMP_WORDS[1]}" 9 | 10 | local long_options="--help --version --level --device --address --skip --memory --bank" 11 | local short_options="-h -v -l -d -a -s -m -b" 12 | local commands="help ready reset bootloader benchmark ping load save poke peek jump run identify server relocate kernal" 13 | local loglevels="ERROR WARN INFO DEBUG TRACE" 14 | 15 | 16 | if [[ "$prev" =~ ^(\-l|\-\-level)$ ]]; then 17 | COMPREPLY=( $(compgen -W "$loglevels" -- "${cur}") ) 18 | 19 | elif [[ "$prev" == "help" ]]; then 20 | COMPREPLY=( $(compgen -W "$commands" -- "${cur}") ) 21 | 22 | elif [[ "$cur" =~ ^\-\- ]]; then 23 | COMPREPLY=( $(compgen -W "$long_options" -- "${cur}") ) 24 | 25 | elif [[ "$cur" =~ ^\-[^\-]? ]]; then 26 | COMPREPLY=( $(compgen -W "$short_options" -- "${cur}") ) 27 | 28 | else 29 | COMPREPLY=( $(compgen -W "$commands" -- "${cur}") ) 30 | fi 31 | return 0 32 | } 33 | complete -f -F _xlink xlink 34 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/License.txt: -------------------------------------------------------------------------------- 1 | LUFA Library 2 | Copyright (C) Dean Camera, 2013. 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. -------------------------------------------------------------------------------- /driver/servant64/xlink.h: -------------------------------------------------------------------------------- 1 | #ifndef XLINK_H 2 | #define XLINK_H 3 | 4 | #define PIN_RESET (1 << PINC4) 5 | #define PIN_STROBE (1 << PIND4) 6 | #define PIN_ACK (1 << PIND3) 7 | 8 | int main(void); 9 | 10 | void SetupHardware(void); 11 | void SetupSerial(void); 12 | void SetupTimer(void); 13 | void ResetTimer(void); 14 | void SetupSTROBE(void); 15 | void SetupACK(void); 16 | void ReadACK(void); 17 | void TristateRESET(void); 18 | void AssertRESET(void); 19 | 20 | uint8_t ReadSerial(void); 21 | void WriteSerial(uint8_t data); 22 | 23 | void Input(void); 24 | void Output(void); 25 | 26 | void Strobe(void); 27 | void Acked(void); 28 | 29 | uint8_t Read(void); 30 | void Write(uint8_t); 31 | 32 | void Send(uint32_t bytesToSend, uint32_t timeout); 33 | void Receive(uint32_t byteToReceive, uint32_t timeout); 34 | 35 | void Reset(void); 36 | 37 | #define GCC_MEMORY_BARRIER() __asm__ __volatile__("" ::: "memory"); 38 | 39 | static inline void GlobalInterruptEnable(void) { 40 | GCC_MEMORY_BARRIER(); 41 | sei(); 42 | GCC_MEMORY_BARRIER(); 43 | } 44 | 45 | static inline void GlobalInterruptDisable(void) { 46 | GCC_MEMORY_BARRIER(); 47 | cli(); 48 | GCC_MEMORY_BARRIER(); 49 | } 50 | 51 | #endif // XLINK_H 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # xlink 2 | *data transfer and control system for the commodore 64/128* 3 | 4 | xlink allows connecting a Commodore 64 or 128 to a PC through either a 5 | custom build USB adapter or a simple parallel port cable. A 6 | command-line client is used on the PC to transfer data to and from the 7 | remote machine memory, run programs on the remote machine or to 8 | initiate a hardware reset. 9 | 10 | An interrupt-driven server on the remote machine listens to and 11 | executes the commands send by the client. The server can be 12 | temporarily loaded on the remote machine, or it can be permanently 13 | installed using a customized kernal rom. The latter has the advantage 14 | of being instantly available after power-up or reset, which makes the 15 | xlink system well suited for fast and easy cross development using a 16 | PC and a real Commodore machine. 17 | 18 | The implementation of the underlying functionality is distributed as a 19 | shared library, making the functionality provided by xlink readily 20 | available for use in other programs. 21 | 22 | The xlink client software and library is supported under Linux, MacOSX and 23 | Windows. 24 | 25 | Please see the [project website](http://henning-bekel.de/xlink) for 26 | more information 27 | -------------------------------------------------------------------------------- /driver/usb.h: -------------------------------------------------------------------------------- 1 | #ifndef USB_H 2 | #define USB_H 3 | 4 | #include 5 | 6 | typedef struct { 7 | unsigned int vid; 8 | unsigned int pid; 9 | int bus; 10 | int address; 11 | char *serial; 12 | } DeviceInfo; 13 | 14 | void driver_usb_lookup(char* path, DeviceInfo* info); 15 | libusb_device_handle* driver_usb_open_device(libusb_context* context, DeviceInfo *info); 16 | 17 | bool driver_usb_open(void); 18 | void driver_usb_close(void); 19 | void driver_usb_strobe (void); 20 | bool driver_usb_wait(int); 21 | unsigned char driver_usb_read(void); 22 | void driver_usb_write(unsigned char); 23 | bool driver_usb_send(unsigned char*, int); 24 | bool driver_usb_receive(unsigned char*, int); 25 | void driver_usb_input(void); 26 | void driver_usb_output(void); 27 | bool driver_usb_ping(void); 28 | void driver_usb_reset(void); 29 | void driver_usb_boot(void); 30 | void driver_usb_free(void); 31 | 32 | int control(int message); 33 | int controlEndpointIn(int message, unsigned char *buffer, int size); 34 | int controlEndpointOut(int message, unsigned char *buffer, int size); 35 | int controlEndpointOutWithValue(int message, int value); 36 | int controlEndpoint(int message, unsigned char *buffer, int size, int direction); 37 | 38 | #endif // USB_H 39 | -------------------------------------------------------------------------------- /driver/at90usb162/xlink.h: -------------------------------------------------------------------------------- 1 | #ifndef XLINK_H 2 | #define XLINK_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | #include "descriptors.h" 14 | 15 | #include "../protocol.h" 16 | 17 | #define PIN_RESET (1 << PINC5) 18 | #define PIN_STROBE (1 << PINC2) 19 | #define PIN_ACK (1 << PINB2) 20 | 21 | #define MAGIC_BOOT_KEY 0xFEEDBABE 22 | #define BOOTLOADER_START_ADDRESS 0x3000 23 | 24 | void SetupHardware(void); 25 | void SetupTimer(void); 26 | void ResetTimer(void); 27 | void SetupSTROBE(void); 28 | void SetupACK(void); 29 | void ReadACK(void); 30 | void TristateRESET(void); 31 | void AssertRESET(void); 32 | 33 | void Reset(void); 34 | void Strobe(void); 35 | void Acked(void); 36 | void Input(void); 37 | void Output(void); 38 | void Read(void); 39 | void Write(uint8_t byte); 40 | void Send(uint16_t size, uint16_t timeout); 41 | void Receive(uint16_t size, uint16_t timeout); 42 | 43 | void BootCheck(void) ATTR_INIT_SECTION(3); 44 | void BootCheck(void); 45 | void Boot(void); 46 | 47 | void EVENT_USB_Device_ControlRequest(void); 48 | 49 | #endif // XLINK_H 50 | -------------------------------------------------------------------------------- /hardware/parport/lib/userport.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 Date: 23.09.2014 08:40:13 2 | #encoding utf-8 3 | # 4 | # USERPORT 5 | # 6 | DEF USERPORT J 0 40 Y Y 1 F N 7 | F0 "J" 0 650 60 H V C CNN 8 | F1 "USERPORT" 0 -750 60 H V C CNN 9 | F2 "~" 50 50 60 H V C CNN 10 | F3 "~" 50 50 60 H V C CNN 11 | DRAW 12 | S -250 600 300 600 0 1 0 N 13 | S 300 600 -250 -650 0 1 0 N 14 | X GND 1 -550 550 300 R 50 50 1 1 W 15 | X VCC 2 -550 450 300 R 50 50 1 1 w 16 | X RESET 3 -550 350 300 R 50 50 1 1 B I 17 | X CNT1 4 -550 250 300 R 50 50 1 1 B 18 | X SP1 5 -550 150 300 R 50 50 1 1 B 19 | X CNT2 6 -550 50 300 R 50 50 1 1 B 20 | X SPI2 7 -550 -50 300 R 50 50 1 1 B 21 | X PC2 8 -550 -150 300 R 50 50 1 1 B I 22 | X ATN 9 -550 -250 300 R 50 50 1 1 I 23 | X GND A 600 550 300 L 50 50 1 1 W 24 | X FLAG2 B 600 450 300 L 50 50 1 1 I I 25 | X PB0 C 600 350 300 L 50 50 1 1 B 26 | X PB1 D 600 250 300 L 50 50 1 1 B 27 | X PB2 E 600 150 300 L 50 50 1 1 B 28 | X PB3 F 600 50 300 L 50 50 1 1 B 29 | X PB4 H 600 -50 300 L 50 50 1 1 B 30 | X PB5 J 600 -150 300 L 50 50 1 1 B 31 | X PB6 K 600 -250 300 L 50 50 1 1 B 32 | X PB7 L 600 -350 300 L 50 50 1 1 B 33 | X PA2 M 600 -450 300 L 50 50 1 1 B 34 | X GND N 600 -550 300 L 50 50 1 1 W 35 | X 9VAC 10 -550 -350 300 R 50 50 1 1 w 36 | X 9VAC 11 -550 -450 300 R 50 50 1 1 w 37 | X GND 12 -550 -550 300 R 50 50 1 1 W 38 | ENDDRAW 39 | ENDDEF 40 | # 41 | #End Library 42 | -------------------------------------------------------------------------------- /hardware/usb/at90usb162/lib/userport.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 Date: 23.09.2014 08:40:13 2 | #encoding utf-8 3 | # 4 | # USERPORT 5 | # 6 | DEF USERPORT J 0 40 Y Y 1 F N 7 | F0 "J" 0 650 60 H V C CNN 8 | F1 "USERPORT" 0 -750 60 H V C CNN 9 | F2 "~" 50 50 60 H V C CNN 10 | F3 "~" 50 50 60 H V C CNN 11 | DRAW 12 | S -250 600 300 600 0 1 0 N 13 | S 300 600 -250 -650 0 1 0 N 14 | X GND 1 -550 550 300 R 50 50 1 1 W 15 | X VCC 2 -550 450 300 R 50 50 1 1 w 16 | X RESET 3 -550 350 300 R 50 50 1 1 B I 17 | X CNT1 4 -550 250 300 R 50 50 1 1 B 18 | X SP1 5 -550 150 300 R 50 50 1 1 B 19 | X CNT2 6 -550 50 300 R 50 50 1 1 B 20 | X SPI2 7 -550 -50 300 R 50 50 1 1 B 21 | X PC2 8 -550 -150 300 R 50 50 1 1 B I 22 | X ATN 9 -550 -250 300 R 50 50 1 1 I 23 | X GND A 600 550 300 L 50 50 1 1 W 24 | X FLAG2 B 600 450 300 L 50 50 1 1 I I 25 | X PB0 C 600 350 300 L 50 50 1 1 B 26 | X PB1 D 600 250 300 L 50 50 1 1 B 27 | X PB2 E 600 150 300 L 50 50 1 1 B 28 | X PB3 F 600 50 300 L 50 50 1 1 B 29 | X PB4 H 600 -50 300 L 50 50 1 1 B 30 | X PB5 J 600 -150 300 L 50 50 1 1 B 31 | X PB6 K 600 -250 300 L 50 50 1 1 B 32 | X PB7 L 600 -350 300 L 50 50 1 1 B 33 | X PA2 M 600 -450 300 L 50 50 1 1 B 34 | X GND N 600 -550 300 L 50 50 1 1 W 35 | X 9VAC 10 -550 -350 300 R 50 50 1 1 w 36 | X 9VAC 11 -550 -450 300 R 50 50 1 1 w 37 | X GND 12 -550 -550 300 R 50 50 1 1 W 38 | ENDDRAW 39 | ENDDEF 40 | # 41 | #End Library 42 | -------------------------------------------------------------------------------- /hardware/usb/at90usb162/lib/userport.bak: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 Date: 28.01.2014 16:21:09 2 | #encoding utf-8 3 | # 4 | # USERPORT 5 | # 6 | DEF USERPORT J 0 40 Y Y 1 F N 7 | F0 "J" 0 1800 60 H V C CNN 8 | F1 "USERPORT" 0 400 60 H V C CNN 9 | F2 "~" 0 0 60 H V C CNN 10 | F3 "~" 0 0 60 H V C CNN 11 | DRAW 12 | S -250 1750 300 1750 0 1 0 N 13 | S 300 1750 -250 500 0 1 0 N 14 | X GND 1 -550 1700 300 R 50 50 1 1 w 15 | X VCC 2 -550 1600 300 R 50 50 1 1 w 16 | X RESET 3 -550 1500 300 R 50 50 1 1 B I 17 | X CNT1 4 -550 1400 300 R 50 50 1 1 B 18 | X SP1 5 -550 1300 300 R 50 50 1 1 B 19 | X CNT2 6 -550 1200 300 R 50 50 1 1 B 20 | X SPI2 7 -550 1100 300 R 50 50 1 1 B 21 | X PC2 8 -550 1000 300 R 50 50 1 1 B I 22 | X ATN 9 -550 900 300 R 50 50 1 1 I 23 | X GND A 600 1700 300 L 50 50 1 1 w 24 | X FLAG2 B 600 1600 300 L 50 50 1 1 I I 25 | X PB0 C 600 1500 300 L 50 50 1 1 B 26 | X PB1 D 600 1400 300 L 50 50 1 1 B 27 | X PB2 E 600 1300 300 L 50 50 1 1 B 28 | X PB3 F 600 1200 300 L 50 50 1 1 B 29 | X PB4 H 600 1100 300 L 50 50 1 1 B 30 | X PB5 J 600 1000 300 L 50 50 1 1 B 31 | X PB6 K 600 900 300 L 50 50 1 1 B 32 | X PB7 L 600 800 300 L 50 50 1 1 B 33 | X PA2 M 600 700 300 L 50 50 1 1 B 34 | X GND N 600 600 300 L 50 50 1 1 w 35 | X 9VAC 10 -550 800 300 R 50 50 1 1 w 36 | X 9VAC 11 -550 700 300 R 50 50 1 1 w 37 | X GND 12 -550 600 300 R 50 50 1 1 w 38 | ENDDRAW 39 | ENDDEF 40 | # 41 | #End Library 42 | -------------------------------------------------------------------------------- /tools/make-help.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv) { 7 | argc--; 8 | argv++; 9 | 10 | if(argc == 0) { 11 | fprintf(stderr, "Usage: make-help \n"); 12 | return EXIT_FAILURE; 13 | } 14 | 15 | FILE* f; 16 | char *filename = argv[0]; 17 | char *line = NULL; 18 | size_t ignored = 0; 19 | int len = 0; 20 | 21 | if((f = fopen(filename, "r")) == NULL) { 22 | fprintf(stderr, "%s: %s\n", filename, strerror(errno)); 23 | return EXIT_FAILURE; 24 | } 25 | 26 | printf("bool help(int id) {\n"); 27 | 28 | printf("switch(id) {\n"); 29 | printf("case COMMAND_NONE:\n"); 30 | printf("usage();\n"); 31 | 32 | while((len = getline(&line, &ignored, f)) != -1) { 33 | 34 | if(line[0] == '#') continue; 35 | 36 | line[len-1] = '\0'; 37 | 38 | if(strncmp(line, "COMMAND", 7) == 0) { 39 | printf("break;\n\n"); 40 | printf("case %s:\n", line); 41 | } 42 | else { 43 | if(len == 1) { 44 | printf("printf(\"\\n\");\n"); 45 | } 46 | else { 47 | printf("printf(\"%s\\n\");\n", line); 48 | } 49 | } 50 | } 51 | 52 | fclose(f); 53 | 54 | printf("break;\n"); 55 | printf("}\n"); 56 | printf("return true;\n"); 57 | printf("}\n"); 58 | 59 | free(line); 60 | return EXIT_SUCCESS; 61 | } 62 | -------------------------------------------------------------------------------- /hardware/usb/at90usb162/gerber/at90usb162.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ;DRILL file {KiCad 4.0.7} date 08/25/20 08:51:05 3 | ;FORMAT={-:-/ absolute / inch / decimal} 4 | FMAT,2 5 | INCH,TZ 6 | T1C0.025 7 | T2C0.030 8 | T3C0.032 9 | T4C0.039 10 | T5C0.040 11 | T6C0.091 12 | % 13 | G90 14 | G05 15 | M72 16 | T1 17 | X7.7355Y-5.5795 18 | X7.8165Y-5.6605 19 | X7.9465Y-5.314 20 | X8.4825Y-5.1865 21 | T2 22 | X8.896Y-5.18 23 | X8.896Y-5.38 24 | T3 25 | X7.581Y-5.741 26 | X7.581Y-5.841 27 | X7.7365Y-5.7405 28 | X7.7365Y-5.8405 29 | X7.892Y-5.7405 30 | X7.892Y-5.8405 31 | X8.0355Y-4.9985 32 | X8.0355Y-5.0985 33 | X8.0485Y-5.741 34 | X8.0485Y-5.841 35 | X8.204Y-5.741 36 | X8.204Y-5.841 37 | X8.221Y-4.998 38 | X8.221Y-5.098 39 | X8.34Y-4.9985 40 | X8.34Y-5.0985 41 | X8.36Y-5.741 42 | X8.36Y-5.841 43 | X8.478Y-4.9985 44 | X8.478Y-5.0985 45 | X8.516Y-5.7405 46 | X8.516Y-5.8405 47 | X8.606Y-4.9985 48 | X8.606Y-5.0985 49 | X8.655Y-5.359 50 | X8.655Y-5.459 51 | X8.6715Y-5.741 52 | X8.6715Y-5.841 53 | X8.8275Y-5.741 54 | X8.8275Y-5.841 55 | X8.9835Y-5.7405 56 | X8.9835Y-5.8405 57 | X9.0685Y-5.0805 58 | X9.0685Y-5.1805 59 | X9.069Y-5.38 60 | X9.069Y-5.48 61 | T4 62 | X8.1405Y-4.845 63 | X8.2405Y-4.845 64 | X8.3205Y-4.845 65 | X8.4205Y-4.845 66 | T5 67 | X7.4845Y-5.2645 68 | X7.4845Y-5.3645 69 | X7.5845Y-5.2645 70 | X7.5845Y-5.3645 71 | X7.82Y-5.2145 72 | X7.82Y-5.3145 73 | T6 74 | X8.0205Y-4.74 75 | X8.5605Y-4.74 76 | T0 77 | M30 78 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/Events.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Build/HID_EEPROM_Loader/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2013. 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/Temperature.d: -------------------------------------------------------------------------------- 1 | ../../LUFA/Drivers/Board/Temperature.o: \ 2 | ../../LUFA/Drivers/Board/Temperature.c \ 3 | ../../LUFA/Drivers/Board/Temperature.h \ 4 | ../../LUFA/Drivers/Board/../../Common/Common.h \ 5 | ../../LUFA/Drivers/Board/../../Common/Architectures.h \ 6 | ../../LUFA/Drivers/Board/../../Common/BoardTypes.h \ 7 | ../../LUFA/Drivers/Board/../../Common/ArchitectureSpecific.h \ 8 | ../../LUFA/Drivers/Board/../../Common/CompilerSpecific.h \ 9 | ../../LUFA/Drivers/Board/../../Common/Attributes.h Config/LUFAConfig.h \ 10 | ../../LUFA/Drivers/Board/../../Common/Endianness.h \ 11 | ../../LUFA/Drivers/Board/../Peripheral/ADC.h \ 12 | ../../LUFA/Drivers/Board/../Peripheral/../../Common/Common.h \ 13 | ../../LUFA/Drivers/Board/../Peripheral/AVR8/ADC_AVR8.h \ 14 | ../../LUFA/Drivers/Board/../Peripheral/AVR8/../../../Common/Common.h 15 | 16 | ../../LUFA/Drivers/Board/Temperature.h: 17 | 18 | ../../LUFA/Drivers/Board/../../Common/Common.h: 19 | 20 | ../../LUFA/Drivers/Board/../../Common/Architectures.h: 21 | 22 | ../../LUFA/Drivers/Board/../../Common/BoardTypes.h: 23 | 24 | ../../LUFA/Drivers/Board/../../Common/ArchitectureSpecific.h: 25 | 26 | ../../LUFA/Drivers/Board/../../Common/CompilerSpecific.h: 27 | 28 | ../../LUFA/Drivers/Board/../../Common/Attributes.h: 29 | 30 | Config/LUFAConfig.h: 31 | 32 | ../../LUFA/Drivers/Board/../../Common/Endianness.h: 33 | 34 | ../../LUFA/Drivers/Board/../Peripheral/ADC.h: 35 | 36 | ../../LUFA/Drivers/Board/../Peripheral/../../Common/Common.h: 37 | 38 | ../../LUFA/Drivers/Board/../Peripheral/AVR8/ADC_AVR8.h: 39 | 40 | ../../LUFA/Drivers/Board/../Peripheral/AVR8/../../../Common/Common.h: 41 | -------------------------------------------------------------------------------- /driver/at90usb162/descriptors.h: -------------------------------------------------------------------------------- 1 | #ifndef DESCRIPTORS_H 2 | #define DESCRIPTORS_H 3 | 4 | /* Includes: */ 5 | #include 6 | #include 7 | 8 | /* Type Defines: */ 9 | /** Type define for the device configuration descriptor structure. This must be defined in the 10 | * application code, as the configuration descriptor contains several sub-descriptors which 11 | * vary between devices, and which describe the device's usage to the host. 12 | */ 13 | typedef struct 14 | { 15 | USB_Descriptor_Configuration_Header_t Config; 16 | 17 | // XLink Interface 18 | USB_Descriptor_Interface_t XLinkInterface; 19 | } USB_Descriptor_Configuration_t; 20 | 21 | /** Enum for the device string descriptor IDs within the device. Each string descriptor should 22 | * have a unique ID index associated with it, which can be used to refer to the string from 23 | * other descriptors. 24 | */ 25 | enum StringDescriptors_t 26 | { 27 | STRING_ID_Language = 0, /**< Supported Languages string descriptor ID (must be zero) */ 28 | STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */ 29 | STRING_ID_Product = 2, /**< Product string ID */ 30 | STRING_ID_Serial = 3, /**< Serial number string ID */ 31 | }; 32 | 33 | /* Function Prototypes: */ 34 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, 35 | const uint8_t wIndex, 36 | const void** const DescriptorAddress) 37 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); 38 | #endif // DESCRIPTORS_H 39 | 40 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/UC3/Device_UC3.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /bootstrap.asm: -------------------------------------------------------------------------------- 1 | .import source "server.h" 2 | 3 | .if(target == "c64") { 4 | .pc = $3000 5 | } 6 | 7 | .if(target == "c128") { 8 | .pc = $0d00 9 | } 10 | 11 | //------------------------------------------------------------------------------ 12 | 13 | jmp main 14 | 15 | //------------------------------------------------------------------------------ 16 | 17 | read: { :read() rts } 18 | write: { :write() rts } 19 | ack: { :ack() rts } 20 | wait: { :wait() rts } 21 | 22 | //------------------------------------------------------------------------------ 23 | 24 | main: { 25 | lda #$00 // set CIA2 port B to input 26 | sta $dd03 27 | 28 | lda $dd02 // set CIA2 PA2 to output 29 | ora #$04 30 | sta $dd02 31 | 32 | lda $dd0d // clear stale handshake 33 | 34 | sei 35 | 36 | loop: jsr wait 37 | ldy $dd01 38 | jsr ack 39 | 40 | cpy #Command.load 41 | bne loop 42 | 43 | jsr load 44 | 45 | done: cli 46 | jmp booted 47 | } 48 | 49 | //------------------------------------------------------------------------------ 50 | 51 | load: { 52 | lda #$0b 53 | sta $d011 54 | jsr readHeader 55 | 56 | ldy #$00 57 | 58 | !loop: jsr wait 59 | lda $dd01 60 | sta (start),y 61 | jsr ack 62 | :next() 63 | 64 | done: lda end 65 | sta bend 66 | lda end+1 67 | sta bend+1 68 | 69 | lda #$1b 70 | sta $d011 71 | rts 72 | } 73 | 74 | //------------------------------------------------------------------------------ 75 | 76 | readHeader: { 77 | jsr read stx mem 78 | jsr read stx bank 79 | jsr read stx start 80 | jsr read stx start+1 81 | jsr read stx end 82 | jsr read stx end+1 83 | rts 84 | } 85 | 86 | //------------------------------------------------------------------------------ 87 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.d: -------------------------------------------------------------------------------- 1 | ../../LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.o: \ 2 | ../../LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c \ 3 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h \ 4 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Architectures.h \ 5 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/BoardTypes.h \ 6 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/ArchitectureSpecific.h \ 7 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/CompilerSpecific.h \ 8 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Attributes.h \ 9 | Config/LUFAConfig.h \ 10 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Endianness.h \ 11 | ../../LUFA/Drivers/Peripheral/AVR8/../TWI.h \ 12 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h \ 13 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/TWI_AVR8.h \ 14 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/../../../Common/Common.h 15 | 16 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h: 17 | 18 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Architectures.h: 19 | 20 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/BoardTypes.h: 21 | 22 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/ArchitectureSpecific.h: 23 | 24 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/CompilerSpecific.h: 25 | 26 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Attributes.h: 27 | 28 | Config/LUFAConfig.h: 29 | 30 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Endianness.h: 31 | 32 | ../../LUFA/Drivers/Peripheral/AVR8/../TWI.h: 33 | 34 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h: 35 | 36 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/TWI_AVR8.h: 37 | 38 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/../../../Common/Common.h: 39 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.d: -------------------------------------------------------------------------------- 1 | ../../LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.o: \ 2 | ../../LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c \ 3 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h \ 4 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Architectures.h \ 5 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/BoardTypes.h \ 6 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/ArchitectureSpecific.h \ 7 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/CompilerSpecific.h \ 8 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Attributes.h \ 9 | Config/LUFAConfig.h \ 10 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Endianness.h \ 11 | ../../LUFA/Drivers/Peripheral/AVR8/../Serial.h \ 12 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h \ 13 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/Serial_AVR8.h \ 14 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/../../../Common/Common.h \ 15 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/../../Misc/TerminalCodes.h 16 | 17 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h: 18 | 19 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Architectures.h: 20 | 21 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/BoardTypes.h: 22 | 23 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/ArchitectureSpecific.h: 24 | 25 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/CompilerSpecific.h: 26 | 27 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Attributes.h: 28 | 29 | Config/LUFAConfig.h: 30 | 31 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Endianness.h: 32 | 33 | ../../LUFA/Drivers/Peripheral/AVR8/../Serial.h: 34 | 35 | ../../LUFA/Drivers/Peripheral/AVR8/../../../Common/Common.h: 36 | 37 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/Serial_AVR8.h: 38 | 39 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/../../../Common/Common.h: 40 | 41 | ../../LUFA/Drivers/Peripheral/AVR8/../AVR8/../../Misc/TerminalCodes.h: 42 | -------------------------------------------------------------------------------- /hardware/parport/cable.pro: -------------------------------------------------------------------------------- 1 | update=24.09.2014 12:15:25 2 | version=1 3 | last_client=eeschema 4 | [cvpcb] 5 | version=1 6 | NetIExt=net 7 | [cvpcb/libraries] 8 | EquName1=devcms 9 | [pcbnew] 10 | version=1 11 | LastNetListRead= 12 | UseCmpFile=1 13 | PadDrill=0.600000000000 14 | PadDrillOvalY=0.600000000000 15 | PadSizeH=1.500000000000 16 | PadSizeV=1.500000000000 17 | PcbTextSizeV=1.500000000000 18 | PcbTextSizeH=1.500000000000 19 | PcbTextThickness=0.300000000000 20 | ModuleTextSizeV=1.000000000000 21 | ModuleTextSizeH=1.000000000000 22 | ModuleTextSizeThickness=0.150000000000 23 | SolderMaskClearance=0.000000000000 24 | SolderMaskMinWidth=0.000000000000 25 | DrawSegmentWidth=0.200000000000 26 | BoardOutlineThickness=0.100000000000 27 | ModuleOutlineThickness=0.150000000000 28 | [pcbnew/libraries] 29 | LibDir= 30 | LibName1=sockets 31 | LibName2=connect 32 | LibName3=discret 33 | LibName4=pin_array 34 | LibName5=divers 35 | LibName6=smd_capacitors 36 | LibName7=smd_resistors 37 | LibName8=smd_crystal&oscillator 38 | LibName9=smd_dil 39 | LibName10=smd_transistors 40 | LibName11=libcms 41 | LibName12=display 42 | LibName13=led 43 | LibName14=dip_sockets 44 | LibName15=pga_sockets 45 | LibName16=valves 46 | [general] 47 | version=1 48 | [eeschema] 49 | version=1 50 | LibDir= 51 | NetFmtName= 52 | RptD_X=0 53 | RptD_Y=100 54 | RptLab=1 55 | LabSize=60 56 | [eeschema/libraries] 57 | LibName1=power 58 | LibName2=device 59 | LibName3=transistors 60 | LibName4=conn 61 | LibName5=linear 62 | LibName6=regul 63 | LibName7=74xx 64 | LibName8=cmos4000 65 | LibName9=adc-dac 66 | LibName10=memory 67 | LibName11=xilinx 68 | LibName12=special 69 | LibName13=microcontrollers 70 | LibName14=dsp 71 | LibName15=microchip 72 | LibName16=analog_switches 73 | LibName17=motorola 74 | LibName18=texas 75 | LibName19=intel 76 | LibName20=audio 77 | LibName21=interface 78 | LibName22=digital-audio 79 | LibName23=philips 80 | LibName24=display 81 | LibName25=cypress 82 | LibName26=siliconi 83 | LibName27=opto 84 | LibName28=atmel 85 | LibName29=contrib 86 | LibName30=valves 87 | LibName31=lib/userport 88 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2013. 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 *.conf *.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 | -------------------------------------------------------------------------------- /hardware/usb/at90usb162/at90usb162.pro: -------------------------------------------------------------------------------- 1 | update=28.01.2015 11:49:25 2 | version=1 3 | last_client=eeschema 4 | [general] 5 | version=1 6 | [cvpcb] 7 | version=1 8 | NetIExt=net 9 | [cvpcb/libraries] 10 | EquName1=devcms 11 | [pcbnew] 12 | version=1 13 | LastNetListRead=at90usb162.net 14 | UseCmpFile=1 15 | PadDrill=0.800000000000 16 | PadDrillOvalY=0.800000000000 17 | PadSizeH=1.500000000000 18 | PadSizeV=1.500000000000 19 | PcbTextSizeV=1.500000000000 20 | PcbTextSizeH=1.500000000000 21 | PcbTextThickness=0.300000000000 22 | ModuleTextSizeV=1.000000000000 23 | ModuleTextSizeH=1.000000000000 24 | ModuleTextSizeThickness=0.150000000000 25 | SolderMaskClearance=0.000000000000 26 | SolderMaskMinWidth=0.000000000000 27 | DrawSegmentWidth=0.200000000000 28 | BoardOutlineThickness=0.100000000000 29 | ModuleOutlineThickness=0.150000000000 30 | [pcbnew/libraries] 31 | LibDir= 32 | LibName1=sockets 33 | LibName2=connect 34 | LibName3=discret 35 | LibName4=pin_array 36 | LibName5=divers 37 | LibName6=smd_capacitors 38 | LibName7=smd_resistors 39 | LibName8=smd_crystal&oscillator 40 | LibName9=smd_dil 41 | LibName10=smd_transistors 42 | LibName11=libcms 43 | LibName12=display 44 | LibName13=led 45 | LibName14=dip_sockets 46 | LibName15=pga_sockets 47 | LibName16=valves 48 | LibName17=mod/userport 49 | [eeschema] 50 | version=1 51 | LibDir= 52 | NetFmtName=PcbnewAdvanced 53 | RptD_X=0 54 | RptD_Y=100 55 | RptLab=1 56 | LabSize=60 57 | [eeschema/libraries] 58 | LibName1=power 59 | LibName2=device 60 | LibName3=transistors 61 | LibName4=conn 62 | LibName5=linear 63 | LibName6=regul 64 | LibName7=74xx 65 | LibName8=cmos4000 66 | LibName9=adc-dac 67 | LibName10=memory 68 | LibName11=xilinx 69 | LibName12=special 70 | LibName13=microcontrollers 71 | LibName14=dsp 72 | LibName15=microchip 73 | LibName16=analog_switches 74 | LibName17=motorola 75 | LibName18=texas 76 | LibName19=intel 77 | LibName20=audio 78 | LibName21=interface 79 | LibName22=digital-audio 80 | LibName23=philips 81 | LibName24=display 82 | LibName25=cypress 83 | LibName26=siliconi 84 | LibName27=opto 85 | LibName28=atmel 86 | LibName29=contrib 87 | LibName30=valves 88 | LibName31=lib/userport 89 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Version.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 0x130901 47 | 48 | /** Indicates the version number of the library, as a string. */ 49 | #define LUFA_VERSION_STRING "130901" 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Platform/UC3/InterruptManagement.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /machine.c: -------------------------------------------------------------------------------- 1 | #include "machine.h" 2 | 3 | extern unsigned char* xlink_server_c64(unsigned short address, int *size); 4 | extern unsigned char* xlink_server_basic_c64(int *size); 5 | 6 | extern unsigned char* xlink_server_c128(unsigned short address, int *size); 7 | extern unsigned char* xlink_server_basic_c128(int *size); 8 | 9 | extern void xlink_kernal_c64(unsigned char* image); 10 | extern void xlink_kernal_c128(unsigned char* image); 11 | 12 | xlink_machine_t c64 = { 13 | .type = XLINK_MACHINE_C64, 14 | .name = "c64", 15 | .memory = 0x37, 16 | .bank = 0x00, 17 | .safe_memory = 0x33, 18 | .safe_bank = 0x00, 19 | .default_basic_start = 0x0801, 20 | .basic_start = 0x2b, 21 | .basic_end = 0x2d, 22 | .warmstart = 0xfe66, 23 | .mode = 0x9d, 24 | .prgmode = 0x00, 25 | .io = 0xd000e000, 26 | .screenram = 0x040007e7, 27 | .loram = 0x08010a00, 28 | .hiram = 0xc000d000, 29 | .lorom = 0xa000c000, 30 | .hirom = 0xe0000000, 31 | .benchmark = 0x10008000, 32 | .free_ram_area = 0xc000, 33 | .server = &xlink_server_c64, 34 | .basic_server = &xlink_server_basic_c64, 35 | .kernal = &xlink_kernal_c64, 36 | }; 37 | 38 | xlink_machine_t c128 = { 39 | .type = XLINK_MACHINE_C128, 40 | .name = "c128", 41 | .memory = 0x00, 42 | .bank = 0x0f, 43 | .safe_memory = 0x01, 44 | .safe_bank = 0x0e, 45 | .default_basic_start = 0x1c01, 46 | .basic_start = 0x2d, 47 | .basic_end = 0x1210, 48 | .warmstart = 0x4003, 49 | .mode = 0x7f, 50 | .prgmode = 0x80, 51 | .io = 0xd000e000, 52 | .screenram = 0x040007e7, 53 | .loram = 0x13001c01, 54 | .hiram = 0x1c014000, 55 | .lorom = 0x4000d000, 56 | .hirom = 0xe0000000, 57 | .benchmark = 0x20004000, 58 | .free_ram_area = 0x1300, 59 | .server = &xlink_server_c128, 60 | .basic_server = &xlink_server_basic_c128, 61 | .kernal = &xlink_kernal_c128, 62 | }; 63 | 64 | xlink_machine_t *machine = &c64; 65 | -------------------------------------------------------------------------------- /driver/driver.h: -------------------------------------------------------------------------------- 1 | #ifndef DRIVER_H 2 | #define DRIVER_H 3 | 4 | #define XLINK_DRIVER_DEVICE_USB 189 5 | #define XLINK_DRIVER_DEVICE_PARPORT 99 6 | #define XLINK_DRIVER_DEVICE_SHM -1 7 | 8 | #if mac 9 | #define XLINK_DRIVER_DEVICE_SERIAL 31 10 | #else 11 | #define XLINK_DRIVER_DEVICE_SERIAL 188 12 | #endif 13 | 14 | #define XLINK_DRIVER_STATE_IDLE 0x01 15 | #define XLINK_DRIVER_STATE_INPUT 0x02 16 | #define XLINK_DRIVER_STATE_OUTPUT 0x03 17 | 18 | typedef struct { 19 | char* path; 20 | int device; 21 | int timeout; 22 | int state; 23 | 24 | bool (*_ready) (void); 25 | bool (*_open) (void); 26 | void (*_close) (void); 27 | void (*_strobe) (void); 28 | bool (*_wait) (int); 29 | unsigned char (*_read) (void); 30 | void (*_write) (unsigned char); 31 | bool (*_send) (unsigned char*, int); 32 | bool (*_receive) (unsigned char*, int); 33 | void (*_input) (void); 34 | void (*_output) (void); 35 | bool (*_ping) (void); 36 | void (*_reset) (void); 37 | void (*_boot) (void); 38 | void (*_free) (void); 39 | 40 | bool (*ready) (void); 41 | bool (*open) (void); 42 | void (*close) (void); 43 | void (*strobe) (void); 44 | bool (*wait) (int); 45 | unsigned char (*read) (void); 46 | void (*write) (unsigned char); 47 | bool (*send) (unsigned char*, int); 48 | bool (*receive) (unsigned char*, int); 49 | void (*input) (void); 50 | void (*output) (void); 51 | bool (*ping) (void); 52 | void (*reset) (void); 53 | void (*boot) (void); 54 | void (*free) (void); 55 | } Driver; 56 | 57 | typedef struct { 58 | uchar *data; 59 | uint completed; 60 | } Transfer; 61 | 62 | bool driver_setup(char*); 63 | bool device_identify(char*, int*); 64 | bool device_is_supported(char*, int); 65 | bool device_is_parport(int); 66 | bool device_is_usb(int); 67 | bool device_is_shm(int); 68 | bool device_is_serial(int); 69 | 70 | bool _driver_setup_and_open(void); 71 | bool _driver_ready(void); 72 | bool _driver_open(void); 73 | void _driver_close(void); 74 | void _driver_strobe(void); 75 | bool _driver_wait(int); 76 | unsigned char _driver_read(void); 77 | void _driver_write(unsigned char); 78 | bool _driver_send(unsigned char*, int); 79 | bool _driver_receive(unsigned char*, int); 80 | void _driver_input(void); 81 | void _driver_output(void); 82 | bool _driver_ping(void); 83 | void _driver_reset(void); 84 | void _driver_boot(void); 85 | void _driver_free(); 86 | 87 | #endif // DRIVER_H 88 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/USBInterrupt.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /client.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIENT_H 2 | #define CLIENT_H 3 | 4 | #include "xlink.h" 5 | 6 | typedef struct { 7 | char id; 8 | char *name; 9 | unsigned char memory; 10 | unsigned char bank; 11 | int start; 12 | int end; 13 | int skip; 14 | int debug; 15 | int argc; 16 | char **argv; 17 | int offset; 18 | int force; 19 | } Command; 20 | 21 | typedef struct { 22 | int count; 23 | Command **items; 24 | } Commands; 25 | 26 | char str2id(const char* arg); 27 | char* id2str(const char id); 28 | int valid(int address); 29 | void screenOn(void); 30 | void screenOff(void); 31 | void version(void); 32 | void usage(void); 33 | void shell(void); 34 | bool help(int id); 35 | 36 | Commands* commands_new(int argc, char **argv); 37 | Command* commands_add(Commands* self, Command* command); 38 | bool commands_each(Commands* self, bool (*func) (Command* command)); 39 | bool commands_execute(Commands* self); 40 | void commands_print(Commands* self); 41 | void commands_free(Commands* self); 42 | 43 | bool command_server_usable_after_possible_relocation(Command* self); 44 | bool command_requires_server_relocation(Command* self, xlink_server_info_t* server); 45 | bool command_server_relocation_possible(Command* self, xlink_server_info_t* server, unsigned short* address); 46 | 47 | Command* command_new(int *argc, char ***argv); 48 | int command_arity(Command* self); 49 | void command_consume_arguments(Command *self, int *argc, char ***argv); 50 | void command_append_argument(Command* self, char* arg); 51 | bool command_parse_options(Command *self); 52 | char *command_get_name(Command* self); 53 | bool command_print(Command* self); 54 | bool command_find_basic_program(Command* self); 55 | void command_apply_memory_and_bank(Command* self); 56 | void command_apply_safe_memory_and_bank(Command* self); 57 | bool command_execute(Command* self); 58 | bool command_none(Command* self); 59 | bool command_load(Command* self); 60 | bool command_save(Command* self); 61 | bool command_poke(Command* self); 62 | bool command_peek(Command* self); 63 | bool command_fill(Command* self); 64 | bool command_jump(Command* self); 65 | bool command_run(Command* self); 66 | bool command_ready(Command* self); 67 | bool command_ping(Command* self); 68 | bool command_reset(Command* self); 69 | bool command_wait(Command* self); 70 | bool command_help(Command* self); 71 | bool command_bootstrap(Command *self); 72 | bool command_benchmark(Command *self); 73 | bool command_identify(Command *self); 74 | bool command_server(Command *self); 75 | bool command_relocate(Command *self); 76 | bool command_kernal(Command *self); 77 | void command_free(Command* self); 78 | 79 | #if windows 80 | void handle(int signal); 81 | #endif 82 | 83 | #endif // CLIENT_H 84 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/UNO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Uno. 33 | * \copydetails Group_BoardInfo_UNO 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_UNO UNO 41 | * \brief Board specific information header for the Arduino Uno. 42 | * 43 | * Board specific information header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_UNO_H__ 49 | #define __BOARD_UNO_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/BUI/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/MAXIMUS/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/DUCE/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/RZUSBSTICK/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/OTG.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/MULTIO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/BLACKCAT/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/LEONARDO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/BIGMULTIO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/ADAFRUITU4/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/USBTask.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /tools/make-bootstrap.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv) { 7 | 8 | FILE *f; 9 | char *filename; 10 | char *machine; 11 | struct stat st; 12 | int address; 13 | int size; 14 | int l; 15 | int checksum = 0; 16 | 17 | if(argc < 1) { 18 | fprintf(stderr, "Usage: make-bootstrap "); 19 | return EXIT_FAILURE; 20 | } 21 | 22 | machine = argv[1]; 23 | filename = argv[2]; 24 | 25 | if((f = fopen(filename, "rb")) == NULL) { 26 | fprintf(stderr, "%s: error opening %s\n", argv[0], filename); 27 | return EXIT_FAILURE; 28 | } 29 | 30 | address = fgetc(f); 31 | address = address | fgetc(f) << 8; 32 | 33 | stat(filename, &st); 34 | size = st.st_size-2; 35 | size = size + (8-(size % 8)); 36 | 37 | unsigned char *data = (unsigned char*) calloc(size, sizeof(char)); 38 | 39 | fread(data, sizeof(char), size, f); 40 | fclose(f); 41 | 42 | l = 0; 43 | 44 | if(strcmp(machine, "c128") == 0) { 45 | printf("%d print chr$(14)\n", l+=10); 46 | } 47 | printf("%d print\"please wait...\":print\n", l+=10); 48 | printf("%d d=%d:s=%d:c=0:l=1000:m=0\n", l+=10, address, size); 49 | printf("%d for i=0 to s-1:for k=0 to 7\n", l+=10); 50 | printf("%d read v:poke d+i+k,v:c=c+v:next k\n", l+=10); 51 | printf("%d read v:if c<>v then print\"data checksum error on line\";l:end\n", l+=10); 52 | printf("%d c=0:l=l+1:i=i+7:nexti\n", l+=10); 53 | printf("%d print\"on your pc, please run\":print\n", l+=10); 54 | 55 | if(strcmp(machine, "c64") == 0) { 56 | printf("%d print\"xlink server xlink.prg\"\n", l+=10); 57 | printf("%d print\"xlink load -f xlink.prg\":print\n", l+=10); 58 | } 59 | else if(strcmp(machine, "c128") == 0) { 60 | printf("%d print\"xlink server -M c128 xlink.prg\"\n", l+=10); 61 | printf("%d print\"xlink load -M c128 -f xlink.prg\":print\n", l+=10); 62 | } 63 | 64 | printf("%d print\"then save the server:\":print\n", l+=10); 65 | if(strcmp(machine, "c64") == 0) { 66 | printf("%d print\"save\"chr$(34)\"xlink\"chr$(34)\",8\"chr$(145)\n", l+=10); 67 | } 68 | else if(strcmp(machine, "c128") == 0) { 69 | printf("%d print\"dsave\"chr$(34)\"xlink\"chr$(34)\"\"chr$(145)\n", l+=10); 70 | } 71 | printf("%d sys %d\n", l+=10, address); 72 | printf("%d end\n", l+=10); 73 | l = 1000; 74 | 75 | for(int i=0; i 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | bool load(char* filename, unsigned char** data) { 9 | 10 | FILE *file; 11 | struct stat st; 12 | 13 | if((file = fopen(filename, "rb")) == NULL) { 14 | fprintf(stderr, "error: can't open %s: %s\n", filename, strerror(errno)); 15 | return false; 16 | } 17 | 18 | stat(filename, &st); 19 | (*data) = (unsigned char*) realloc((*data), st.st_size); 20 | 21 | fread((*data), sizeof(unsigned char), st.st_size, file); 22 | 23 | fclose(file); 24 | 25 | return true; 26 | } 27 | 28 | int main(int argc, char **argv) { 29 | 30 | argc--; 31 | argv++; 32 | 33 | if(argc == 0) { 34 | fprintf(stderr, "Usage: make-kernal [...]\n"); 35 | return EXIT_FAILURE; 36 | } 37 | 38 | char *name = argv[0]; 39 | 40 | argc--; 41 | argv++; 42 | 43 | struct stat st; 44 | char *filename = argv[0]; 45 | 46 | if(stat(filename, &st) == -1) { 47 | fprintf(stderr, "%s: couldn't stat: %s", filename, strerror(errno)); 48 | return EXIT_FAILURE; 49 | } 50 | 51 | argc--; 52 | argv++; 53 | 54 | if(argc % 2 != 0) { 55 | fprintf(stderr, "error: even number of arguments ( ) expected\n"); 56 | return EXIT_FAILURE; 57 | } 58 | 59 | unsigned char *code = (unsigned char *) calloc(1, sizeof(unsigned char)); 60 | 61 | if(!load(filename, &code)) { 62 | goto done; 63 | } 64 | 65 | int numPatches = argc/2; 66 | int offset, size; 67 | 68 | printf("void xlink_kernal_%s(unsigned char* image) {\n", name); 69 | 70 | printf("typedef struct {\n"); 71 | printf(" unsigned short offset;\n"); 72 | printf(" unsigned short size;\n"); 73 | printf(" unsigned char* data;\n"); 74 | printf("} Patch;\n"); 75 | 76 | printf("Patch *patches[%d];\n", numPatches); 77 | 78 | for(int i=0; isize; k++) {\n"); 96 | printf(" image[patches[i]->offset+k] = patches[i]->data[k];\n"); 97 | printf(" }\n"); 98 | printf("}\n"); 99 | 100 | printf("}\n"); 101 | 102 | done: 103 | free(code); 104 | return EXIT_SUCCESS; 105 | } 106 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/SPARKFUN8U2/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/U2S/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/UDIP/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | //------------------------------------------------------------------------------ 10 | // Macros 11 | //------------------------------------------------------------------------------ 12 | 13 | #define lo(x) x & 0x000000ff 14 | #define hi(x) (x & 0x0000ff00) >> 8 15 | #define hlo(x) (x & 0x00ff0000) >> 16 16 | #define hhi(x) (x & 0xff000000) >> 24 17 | //------------------------------------------------------------------------------ 18 | // StringList 19 | //------------------------------------------------------------------------------ 20 | 21 | typedef struct { 22 | int size; 23 | char **strings; 24 | } StringList; 25 | 26 | StringList *stringlist_new(void); 27 | void stringlist_append(StringList *self, char *string); 28 | void stringlist_append_tokenized(StringList *self, char* string, char *delim); 29 | char* stringlist_last(StringList *self); 30 | void stringlist_remove_last(StringList *self); 31 | void stringlist_free(StringList *self); 32 | 33 | //------------------------------------------------------------------------------ 34 | // Logger 35 | //------------------------------------------------------------------------------ 36 | 37 | #define LOGLEVEL_NONE 0 38 | #define LOGLEVEL_ERROR 1 39 | #define LOGLEVEL_WARN 2 40 | #define LOGLEVEL_INFO 3 41 | #define LOGLEVEL_DEBUG 4 42 | #define LOGLEVEL_TRACE 5 43 | #define LOGLEVEL_ALL 6 44 | 45 | typedef struct { 46 | int level; 47 | StringList *context; 48 | bool enabled; 49 | void (*set) (char *level); 50 | void (*inc) (void); 51 | void (*dec) (void); 52 | void (*enter) (char *context); 53 | void (*leave) (void); 54 | void (*suspend) (void); 55 | void (*resume) (void); 56 | void (*log) (int level, char *format, va_list ap); 57 | void (*warn) (char *format, ...); 58 | void (*error) (char *format, ...); 59 | void (*info) (char *format, ...); 60 | void (*debug) (char *format, ...); 61 | void (*trace) (char *format, ...); 62 | void (*free) (void); 63 | } Logger; 64 | 65 | extern Logger* logger; 66 | 67 | //------------------------------------------------------------------------------ 68 | // Watch 69 | //------------------------------------------------------------------------------ 70 | 71 | typedef struct { 72 | struct timeval start; 73 | } Watch; 74 | 75 | Watch* watch_new(void); 76 | void watch_start(Watch*); 77 | double watch_elapsed(Watch*); 78 | void watch_free(Watch*); 79 | 80 | //------------------------------------------------------------------------------ 81 | // Chunked processing 82 | //------------------------------------------------------------------------------ 83 | 84 | bool chunked(bool (*callback) (unsigned short chunk, void* context), void* context, unsigned short chunk, int size); 85 | 86 | #endif // UTIL_H 87 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/TUL/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/UC3/EVK1104/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/CULV3/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/BENITO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/JMDBU2/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/USBTINYMKII/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/UC3/UC3A3_XPLAINED/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/Temperature.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/USBFOO/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/MICROSIN162/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Microsin AVR-USB162 board. 33 | * \copydetails Group_BoardInfo_MICROSIN162 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_MICROSIN162 MICROSIN162 41 | * \brief Board specific information header for the Microsin AVR-USB162 board. 42 | * 43 | * Board specific information header for the Microsin AVR-USB162 board (http://microsin.ru/content/view/685/44/). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_MICROSIN162_H__ 49 | #define __BOARD_MICROSIN162_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/STANGE_ISP/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Dimex Stange-ISP board. 33 | * \copydetails Group_BoardInfo_STANGE_ISP 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_STANGE_ISP STANGE_ISP 41 | * \brief Board specific information header for the Dimex Stange-ISP board. 42 | * 43 | * Board specific information header for the Dimex Stange-ISP board (http://www.diamex.de/dxshop/USB-ISP-Programmer-fuer-Atmel-AVR). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_STANGE_ISP_H__ 49 | #define __BOARD_STANGE_ISP_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Peripheral/ADC.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Hardware Analogue-to-Digital converter driver. 33 | * 34 | * This file is the master dispatch header file for the device-specific ADC driver, for microcontrollers 35 | * containing an ADC. 36 | * 37 | * User code should include this file, which will in turn include the correct ADC driver header file for the 38 | * currently selected architecture and microcontroller model. 39 | */ 40 | 41 | /** \ingroup Group_PeripheralDrivers 42 | * \defgroup Group_ADC ADC Driver - LUFA/Drivers/Peripheral/ADC.h 43 | * \brief Hardware Analogue-to-Digital converter driver. 44 | * 45 | * \section Sec_ADC_Dependencies Module Source Dependencies 46 | * The following files must be built with any user project that uses this module: 47 | * - None 48 | * 49 | * \section Sec_ADC_ModDescription Module Description 50 | * Hardware ADC driver. This module provides an easy to use driver for the hardware ADC 51 | * present on many microcontrollers, for the conversion of analogue signals into the 52 | * digital domain. 53 | * 54 | * \note The exact API for this driver may vary depending on the target used - see 55 | * individual target module documentation for the API specific to your target processor. 56 | */ 57 | 58 | #ifndef __ADC_H__ 59 | #define __ADC_H__ 60 | 61 | /* Macros: */ 62 | #define __INCLUDE_FROM_ADC_H 63 | 64 | /* Includes: */ 65 | #include "../../Common/Common.h" 66 | 67 | /* Includes: */ 68 | #if (ARCH == ARCH_AVR8) 69 | #include "AVR8/ADC_AVR8.h" 70 | #else 71 | #error The ADC peripheral driver is not currently available for your selected architecture. 72 | #endif 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/OLIMEX162/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Olimex AVR-USB-162 Development Board. 33 | * \copydetails Group_BoardInfo_OLIMEX162 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_OLIMEX162 OLIMEX162 41 | * \brief Board specific information header for the Olimex AVR-USB-162 Development Board. 42 | * 43 | * Board specific information header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_OLIMEX162_H__ 49 | #define __BOARD_OLIMEX162_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/OLIMEX32U4/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Olimex AVR-USB-32U4 Development Board. 33 | * \copydetails Group_BoardInfo_OLIMEX32U4 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_OLIMEX32U4 OLIMEX32U4 41 | * \brief Board specific information header for the Olimex AVR-USB-32U4 Development Board. 42 | * 43 | * Board specific information header for the Olimex AVR-USB-32U4 Development Board (http://www.olimex.com/dev/olimexino-32u4.html). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_OLIMEX32U4_H__ 49 | #define __BOARD_OLIMEX32U4_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/OLIMEXISPMK2/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Olimex AVR-ISP-MK2 Development Board. 33 | * \copydetails Group_BoardInfo_OLIMEXISPMK2 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_OLIMEXISPMK2 OLIMEXISPMK2 41 | * \brief Board specific information header for the Olimex AVR-ISP-MK2 Development Board. 42 | * 43 | * Board specific information header for the Olimex AVR-ISP-MK2 Development Board (https://www.olimex.com/dev/avr-isp-mk2.html). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_OLIMEXISPMK2_H__ 49 | #define __BOARD_OLIMEXISPMK2_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/OLIMEXT32U4/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Olimex AVR-USB-T32U4 Development Board. 33 | * \copydetails Group_BoardInfo_OLIMEXT32U4 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_OLIMEXT32U4 OLIMEXT32U4 41 | * \brief Board specific information header for the Olimex AVR-USB-T32U4 Development Board. 42 | * 43 | * Board specific information header for the Olimex AVR-USB-T32U4 Development Board (http://www.olimex.com/dev/avr-t32u4.html). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_OLIMEXT32U4_H__ 49 | #define __BOARD_OLIMEXT32U4_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 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/UC3/EVK1100/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 EVK1100. 33 | * \copydetails Group_BoardInfo_EVK1100 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_EVK1100 EVK1100 41 | * \brief Board specific information header for the Atmel Atmel EVK1100. 42 | * 43 | * Board specific information header for the Atmel Atmel EVK1100. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_EVK1100_H__ 49 | #define __BOARD_EVK1100_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../Joystick.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 a hardware Joystick mounted. */ 73 | #define BOARD_HAS_JOYSTICK 74 | 75 | /** Indicates the board has hardware LEDs mounted. */ 76 | #define BOARD_HAS_LEDS 77 | 78 | /* Disable C linkage for C++ Compilers: */ 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | /** @} */ 86 | 87 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/UC3/EVK1101/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 EVK1101. 33 | * \copydetails Group_BoardInfo_EVK1101 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_EVK1101 EVK1101 41 | * \brief Board specific information header for the Atmel Atmel EVK1101. 42 | * 43 | * Board specific information header for the Atmel Atmel EVK1101. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_EVK1101_H__ 49 | #define __BOARD_EVK1101_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../Joystick.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 a hardware Joystick mounted. */ 73 | #define BOARD_HAS_JOYSTICK 74 | 75 | /** Indicates the board has hardware LEDs mounted. */ 76 | #define BOARD_HAS_LEDS 77 | 78 | /* Disable C linkage for C++ Compilers: */ 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | /** @} */ 86 | 87 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Peripheral/SPI.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Hardware Serial Peripheral Interface driver. 33 | * 34 | * This file is the master dispatch header file for the device-specific SPI driver, for microcontrollers 35 | * containing a hardware SPI. 36 | * 37 | * User code should include this file, which will in turn include the correct SPI driver header file for the 38 | * currently selected architecture and microcontroller model. 39 | */ 40 | 41 | /** \ingroup Group_PeripheralDrivers 42 | * \defgroup Group_SPI SPI Driver - LUFA/Drivers/Peripheral/SPI.h 43 | * \brief Hardware Serial Peripheral Interface driver. 44 | * 45 | * \section Sec_SPI_Dependencies Module Source Dependencies 46 | * The following files must be built with any user project that uses this module: 47 | * - None 48 | * 49 | * \section Sec_SPI_ModDescription Module Description 50 | * Hardware SPI driver. This module provides an easy to use driver for the setup and transfer of data over 51 | * the selected architecture and microcontroller model's SPI port. 52 | * 53 | * \note The exact API for this driver may vary depending on the target used - see 54 | * individual target module documentation for the API specific to your target processor. 55 | */ 56 | 57 | #ifndef __SPI_H__ 58 | #define __SPI_H__ 59 | 60 | /* Macros: */ 61 | #define __INCLUDE_FROM_SPI_H 62 | 63 | /* Includes: */ 64 | #include "../../Common/Common.h" 65 | 66 | /* Includes: */ 67 | #if (ARCH == ARCH_AVR8) 68 | #include "AVR8/SPI_AVR8.h" 69 | #elif (ARCH == ARCH_XMEGA) 70 | #include "XMEGA/SPI_XMEGA.h" 71 | #else 72 | #error The SPI peripheral driver is not currently available for your selected architecture. 73 | #endif 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/TEENSY/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 PJRC Teensy 1.x/2.x boards. 33 | * \copydetails Group_BoardInfo_TEENSY 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_TEENSY2 TEENSY2 41 | * \brief Board specific information header for the PJRC Teensy 2 boards. 42 | * 43 | * See \ref Group_BoardInfo_TEENSY for more details. 44 | */ 45 | 46 | /** \ingroup Group_BoardInfo 47 | * \defgroup Group_BoardInfo_TEENSY TEENSY 48 | * \brief Board specific information header for the PJRC Teensy 1.x/2.x boards. 49 | * 50 | * Board specific information header for the PJRC Teensy boards (http://www.pjrc.com/teensy/index.html). 51 | * 52 | * @{ 53 | */ 54 | 55 | #ifndef __BOARD_TEENSY_H__ 56 | #define __BOARD_TEENSY_H__ 57 | 58 | /* Includes: */ 59 | #include "../../../../Common/Common.h" 60 | #include "../../LEDs.h" 61 | 62 | /* Enable C linkage for C++ Compilers: */ 63 | #if defined(__cplusplus) 64 | extern "C" { 65 | #endif 66 | 67 | /* Preprocessor Checks: */ 68 | #if !defined(__INCLUDE_FROM_BOARD_H) 69 | #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 70 | #endif 71 | 72 | /* Public Interface - May be used in end-application: */ 73 | /* Macros: */ 74 | /** Indicates the board has hardware LEDs mounted. */ 75 | #define BOARD_HAS_LEDS 76 | 77 | /* Disable C linkage for C++ Compilers: */ 78 | #if defined(__cplusplus) 79 | } 80 | #endif 81 | 82 | #endif 83 | 84 | /** @} */ 85 | 86 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/AVR8/BUMBLEB/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 Fletchtronics BUMBLEB. 33 | * \copydetails Group_BoardInfo_BUMBLEB 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_BUMBLEB BUMBLEB 41 | * \brief Board specific information header for the Fletchtronics BUMBLEB. 42 | * 43 | * Board specific information header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_BUMBLEB_H__ 49 | #define __BOARD_BUMBLEB_H__ 50 | 51 | /* Includes: */ 52 | #include "../../../../Common/Common.h" 53 | #include "../../Buttons.h" 54 | #include "../../Joystick.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 a hardware Joystick mounted. */ 73 | #define BOARD_HAS_JOYSTICK 74 | 75 | /** Indicates the board has hardware LEDs mounted. */ 76 | #define BOARD_HAS_LEDS 77 | 78 | /* Disable C linkage for C++ Compilers: */ 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | /** @} */ 86 | 87 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 B1 Xplained. 33 | * \copydetails Group_BoardInfo_B1_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_B1_XPLAINED B1_XPLAINED 41 | * \brief Board specific information header for the Atmel XMEGA B1 Xplained. 42 | * 43 | * Board specific information header for the Atmel XMEGA B1 Xplained. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_B1_XPLAINED_H__ 49 | #define __BOARD_B1_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 a hardware Dataflash mounted. */ 73 | #define BOARD_HAS_DATAFLASH 74 | 75 | /** Indicates the board has hardware LEDs mounted. */ 76 | #define BOARD_HAS_LEDS 77 | 78 | /* Disable C linkage for C++ Compilers: */ 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | /** @} */ 86 | 87 | -------------------------------------------------------------------------------- /driver/at90usb162/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Board.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2013 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 A3BU Xplained. 33 | * \copydetails Group_BoardInfo_A3BU_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_A3BU_XPLAINED A3BU_XPLAINED 41 | * \brief Board specific information header for the Atmel XMEGA A3BU Xplained. 42 | * 43 | * Board specific information header for the Atmel XMEGA A3BU Xplained. 44 | * 45 | * @{ 46 | */ 47 | 48 | #ifndef __BOARD_A3BU_XPLAINED_H__ 49 | #define __BOARD_A3BU_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 a hardware Dataflash mounted. */ 73 | #define BOARD_HAS_DATAFLASH 74 | 75 | /** Indicates the board has hardware LEDs mounted. */ 76 | #define BOARD_HAS_LEDS 77 | 78 | /* Disable C linkage for C++ Compilers: */ 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | /** @} */ 86 | 87 | --------------------------------------------------------------------------------