├── .cproject
├── .gitignore
├── .project
├── .settings
└── de.innot.avreclipse.core.prefs
├── CMakeLists.txt
├── LICENSE.txt
├── README.md
├── SIMMProgrammer-AVRStudio.atsln
├── SIMMProgrammer-AVRStudio.cproj
├── chip_id.h
├── drivers
├── mcp23s17.c
├── mcp23s17.h
├── parallel_flash.c
└── parallel_flash.h
├── hal
├── at90usb646
│ ├── Descriptors.c
│ ├── Descriptors.h
│ ├── LUFA
│ │ ├── CodeTemplates
│ │ │ ├── DriverStubs
│ │ │ │ ├── Buttons.h
│ │ │ │ ├── Dataflash.h
│ │ │ │ ├── Joystick.h
│ │ │ │ └── LEDs.h
│ │ │ ├── LUFAConfig.h
│ │ │ ├── makefile_template.avr8
│ │ │ ├── makefile_template.uc3
│ │ │ └── makefile_template.xmega
│ │ ├── Common
│ │ │ ├── ArchitectureSpecific.h
│ │ │ ├── Architectures.h
│ │ │ ├── Attributes.h
│ │ │ ├── BoardTypes.h
│ │ │ ├── Common.h
│ │ │ ├── CompilerSpecific.h
│ │ │ └── Endianness.h
│ │ ├── Doxygen.conf
│ │ ├── DoxygenPages
│ │ │ ├── AboutLUFA.txt
│ │ │ ├── AlternativeStacks.txt
│ │ │ ├── Author.jpg
│ │ │ ├── BuildingLinkableLibraries.txt
│ │ │ ├── ChangeLog.txt
│ │ │ ├── CompileTimeTokens.txt
│ │ │ ├── CompilingApps.txt
│ │ │ ├── ConfiguringApps.txt
│ │ │ ├── DevelopingWithLUFA.txt
│ │ │ ├── DeviceSupport.txt
│ │ │ ├── DirectorySummaries.txt
│ │ │ ├── Donating.txt
│ │ │ ├── FutureChanges.txt
│ │ │ ├── GettingStarted.txt
│ │ │ ├── Groups.txt
│ │ │ ├── LUFA.png
│ │ │ ├── LUFAPoweredProjects.txt
│ │ │ ├── LUFA_thumb.png
│ │ │ ├── LUFAvsAtmelStack.txt
│ │ │ ├── LibraryApps.txt
│ │ │ ├── LibraryResources.txt
│ │ │ ├── LicenseInfo.txt
│ │ │ ├── MainPage.txt
│ │ │ ├── MigrationInformation.txt
│ │ │ ├── ProgrammingApps.txt
│ │ │ ├── SoftwareBootloaderJump.txt
│ │ │ ├── VIDAndPIDValues.txt
│ │ │ ├── WhyUseLUFA.txt
│ │ │ ├── WritingBoardDrivers.txt
│ │ │ └── footer.htm
│ │ ├── Drivers
│ │ │ └── USB
│ │ │ │ ├── Class
│ │ │ │ ├── CDCClass.h
│ │ │ │ ├── Common
│ │ │ │ │ └── CDCClassCommon.h
│ │ │ │ └── Device
│ │ │ │ │ ├── CDCClassDevice.c
│ │ │ │ │ └── CDCClassDevice.h
│ │ │ │ ├── Core
│ │ │ │ ├── AVR8
│ │ │ │ │ ├── Device_AVR8.c
│ │ │ │ │ ├── Device_AVR8.h
│ │ │ │ │ ├── EndpointStream_AVR8.c
│ │ │ │ │ ├── EndpointStream_AVR8.h
│ │ │ │ │ ├── Endpoint_AVR8.c
│ │ │ │ │ ├── Endpoint_AVR8.h
│ │ │ │ │ ├── Host_AVR8.c
│ │ │ │ │ ├── Host_AVR8.h
│ │ │ │ │ ├── OTG_AVR8.h
│ │ │ │ │ ├── PipeStream_AVR8.c
│ │ │ │ │ ├── PipeStream_AVR8.h
│ │ │ │ │ ├── Pipe_AVR8.c
│ │ │ │ │ ├── Pipe_AVR8.h
│ │ │ │ │ ├── Template
│ │ │ │ │ │ ├── Template_Endpoint_Control_R.c
│ │ │ │ │ │ ├── Template_Endpoint_Control_W.c
│ │ │ │ │ │ ├── Template_Endpoint_RW.c
│ │ │ │ │ │ └── Template_Pipe_RW.c
│ │ │ │ │ ├── USBController_AVR8.c
│ │ │ │ │ ├── USBController_AVR8.h
│ │ │ │ │ ├── USBInterrupt_AVR8.c
│ │ │ │ │ └── USBInterrupt_AVR8.h
│ │ │ │ ├── ConfigDescriptor.c
│ │ │ │ ├── ConfigDescriptor.h
│ │ │ │ ├── Device.h
│ │ │ │ ├── DeviceStandardReq.c
│ │ │ │ ├── DeviceStandardReq.h
│ │ │ │ ├── Endpoint.h
│ │ │ │ ├── EndpointStream.h
│ │ │ │ ├── Events.c
│ │ │ │ ├── Events.h
│ │ │ │ ├── Host.h
│ │ │ │ ├── HostStandardReq.c
│ │ │ │ ├── HostStandardReq.h
│ │ │ │ ├── OTG.h
│ │ │ │ ├── Pipe.h
│ │ │ │ ├── PipeStream.h
│ │ │ │ ├── StdDescriptors.h
│ │ │ │ ├── StdRequestType.h
│ │ │ │ ├── USBController.h
│ │ │ │ ├── USBInterrupt.h
│ │ │ │ ├── USBMode.h
│ │ │ │ ├── USBTask.c
│ │ │ │ └── USBTask.h
│ │ │ │ └── USB.h
│ │ ├── License.txt
│ │ ├── Version.h
│ │ └── makefile
│ ├── LUFAConfig.h
│ ├── at90usb646_options.cmake
│ ├── at90usb646_sources.cmake
│ ├── board.c
│ ├── board_hw.h
│ ├── cdc_device_definition.c
│ ├── cdc_device_definition.h
│ ├── gpio.c
│ ├── gpio_hw.h
│ ├── hardware.h
│ ├── parallel_bus.c
│ ├── spi.c
│ ├── spi_private.h
│ ├── usbcdc.c
│ └── usbcdc_hw.h
├── board.h
├── gpio.h
├── m258ke
│ ├── board.c
│ ├── board_hw.h
│ ├── descriptors.c
│ ├── gpio.c
│ ├── gpio_hw.h
│ ├── hardware.h
│ ├── m258ke_options.cmake
│ ├── m258ke_sources.cmake
│ ├── nuvoton
│ │ ├── LDROM.ld
│ │ ├── M251.h
│ │ ├── NuMicro.h
│ │ ├── README.md
│ │ ├── acmp_reg.h
│ │ ├── bpwm_reg.h
│ │ ├── clk_reg.h
│ │ ├── cmsis_armcc.h
│ │ ├── cmsis_armclang.h
│ │ ├── cmsis_compiler.h
│ │ ├── cmsis_gcc.h
│ │ ├── cmsis_version.h
│ │ ├── core_cm23.h
│ │ ├── crc_reg.h
│ │ ├── crypto_reg.h
│ │ ├── dac_reg.h
│ │ ├── eadc_reg.h
│ │ ├── ebi_reg.h
│ │ ├── fmc_reg.h
│ │ ├── gcc_arm.ld
│ │ ├── gpio_reg.h
│ │ ├── i2c_reg.h
│ │ ├── lcd_reg.h
│ │ ├── opa_reg.h
│ │ ├── pdma_reg.h
│ │ ├── psio_reg.h
│ │ ├── pwm_reg.h
│ │ ├── qspi_reg.h
│ │ ├── rtc_reg.h
│ │ ├── sc_reg.h
│ │ ├── spi_reg.h
│ │ ├── startup_M251.S
│ │ ├── sys_reg.h
│ │ ├── system_M251.c
│ │ ├── system_M251.h
│ │ ├── timer_reg.h
│ │ ├── tk_reg.h
│ │ ├── uart_reg.h
│ │ ├── ui2c_reg.h
│ │ ├── usbd.c
│ │ ├── usbd.h
│ │ ├── usbd_reg.h
│ │ ├── uspi_reg.h
│ │ ├── uuart_reg.h
│ │ ├── wdt_reg.h
│ │ └── wwdt_reg.h
│ ├── parallel_bus.c
│ ├── spi.c
│ ├── spi_private.h
│ ├── usbcdc.c
│ └── usbcdc_hw.h
├── parallel_bus.h
├── spi.h
└── usbcdc.h
├── led.h
├── main.c
├── programmer_protocol.h
├── simm_programmer.c
├── simm_programmer.h
├── tests
├── simm_electrical_test.c
└── simm_electrical_test.h
├── toolchain-avr.cmake
├── toolchain-m258ke.cmake
└── util.h
/.gitignore:
--------------------------------------------------------------------------------
1 | /Debug
2 | /Release
3 | .settings/org.eclipse.cdt.core.prefs
4 | CMakeLists.txt.user
5 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | SIMMProgrammer
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 | ?name?
14 |
15 |
16 |
17 | org.eclipse.cdt.make.core.append_environment
18 | true
19 |
20 |
21 | org.eclipse.cdt.make.core.autoBuildTarget
22 | all
23 |
24 |
25 | org.eclipse.cdt.make.core.buildArguments
26 |
27 |
28 |
29 | org.eclipse.cdt.make.core.buildCommand
30 | make
31 |
32 |
33 | org.eclipse.cdt.make.core.buildLocation
34 | ${workspace_loc:/SIMMProgrammer/Release}
35 |
36 |
37 | org.eclipse.cdt.make.core.cleanBuildTarget
38 | clean
39 |
40 |
41 | org.eclipse.cdt.make.core.contents
42 | org.eclipse.cdt.make.core.activeConfigSettings
43 |
44 |
45 | org.eclipse.cdt.make.core.enableAutoBuild
46 | false
47 |
48 |
49 | org.eclipse.cdt.make.core.enableCleanBuild
50 | true
51 |
52 |
53 | org.eclipse.cdt.make.core.enableFullBuild
54 | true
55 |
56 |
57 | org.eclipse.cdt.make.core.fullBuildTarget
58 | all
59 |
60 |
61 | org.eclipse.cdt.make.core.stopOnError
62 | true
63 |
64 |
65 | org.eclipse.cdt.make.core.useDefaultBuildCmd
66 | true
67 |
68 |
69 |
70 |
71 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
72 | full,incremental,
73 |
74 |
75 |
76 |
77 |
78 | org.eclipse.cdt.core.cnature
79 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
80 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
81 | de.innot.avreclipse.core.avrnature
82 |
83 |
84 |
--------------------------------------------------------------------------------
/.settings/de.innot.avreclipse.core.prefs:
--------------------------------------------------------------------------------
1 | #Sat Mar 03 13:46:14 PST 2012
2 | avrtarget/ClockFrequency=16000000
3 | avrtarget/ExtRAMSize=0
4 | avrtarget/ExtendedRAM=false
5 | avrtarget/MCUType=at90usb646
6 | avrtarget/UseEEPROM=false
7 | avrtarget/UseExtendedRAMforHeap=true
8 | avrtarget/avrdude/BitBangDelay=
9 | avrtarget/avrdude/Bitclock=
10 | avrtarget/avrdude/EEPROMFile=
11 | avrtarget/avrdude/EEPROMFromConfig=true
12 | avrtarget/avrdude/FlashFile=
13 | avrtarget/avrdude/FlashFromConfig=true
14 | avrtarget/avrdude/Fuses/ByteValues=223\:208\:248
15 | avrtarget/avrdude/Fuses/FileName=
16 | avrtarget/avrdude/Fuses/MCUid=at90usb646
17 | avrtarget/avrdude/Fuses/UseFile=false
18 | avrtarget/avrdude/Fuses/Write=true
19 | avrtarget/avrdude/Locks/ByteValues=-1
20 | avrtarget/avrdude/Locks/FileName=
21 | avrtarget/avrdude/Locks/MCUid=at90usb646
22 | avrtarget/avrdude/Locks/UseFile=false
23 | avrtarget/avrdude/Locks/Write=false
24 | avrtarget/avrdude/NoChipErase=false
25 | avrtarget/avrdude/NoSigCheck=false
26 | avrtarget/avrdude/NoVerify=false
27 | avrtarget/avrdude/NoWrite=false
28 | avrtarget/avrdude/OtherOptions=
29 | avrtarget/avrdude/ProgrammerID=programmerconfig.1
30 | avrtarget/avrdude/UseCounter=false
31 | avrtarget/avrdude/WriteEEPROM=false
32 | avrtarget/avrdude/WriteFlash=true
33 | avrtarget/perConfig=false
34 | eclipse.preferences.version=1
35 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.13)
2 | enable_language(ASM)
3 | project(SIMMProgrammer)
4 |
5 | # Create a list of all source files common to all architectures
6 | set(SOURCES
7 | drivers/mcp23s17.c
8 | drivers/mcp23s17.h
9 | drivers/parallel_flash.c
10 | drivers/parallel_flash.h
11 | hal/board.h
12 | hal/gpio.h
13 | hal/parallel_bus.h
14 | hal/spi.h
15 | hal/usbcdc.h
16 | tests/simm_electrical_test.c
17 | tests/simm_electrical_test.h
18 | chip_id.h
19 | main.c
20 | led.h
21 | programmer_protocol.h
22 | simm_programmer.c
23 | simm_programmer.h
24 | util.h
25 | )
26 |
27 | # Get hardware-specific source files
28 | if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "avr")
29 | include(hal/at90usb646/at90usb646_sources.cmake)
30 | elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
31 | include(hal/m258ke/m258ke_sources.cmake)
32 | else()
33 | message(FATAL_ERROR "unrecognized architecture for build")
34 | endif()
35 |
36 | # The actual executable, in ELF format
37 | add_executable(SIMMProgrammer.elf ${SOURCES} ${HWSOURCES})
38 |
39 | # Common compiler options
40 | target_compile_options(SIMMProgrammer.elf PRIVATE
41 | -Wall -Os -ffunction-sections -fdata-sections
42 | )
43 | set_property(TARGET SIMMProgrammer.elf PROPERTY C_STANDARD 99)
44 |
45 | # Common linker options
46 | target_link_options(SIMMProgrammer.elf PRIVATE
47 | -Wl,-Map,SIMMProgrammer.map -Wl,--gc-sections
48 | )
49 |
50 | # Get hardware-specific options
51 | if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "avr")
52 | include(hal/at90usb646/at90usb646_options.cmake)
53 | elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
54 | include(hal/m258ke/m258ke_options.cmake)
55 | endif()
56 |
--------------------------------------------------------------------------------
/SIMMProgrammer-AVRStudio.atsln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # AvrStudio Solution File, Format Version 11.00
4 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "SIMMProgrammer-AVRStudio", "SIMMProgrammer-AVRStudio.cproj", "{A831F317-AB11-4E59-8FCF-0E48824CE1BA}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|AVR = Debug|AVR
9 | Release|AVR = Release|AVR
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {A831F317-AB11-4E59-8FCF-0E48824CE1BA}.Debug|AVR.ActiveCfg = Debug|AVR
13 | {A831F317-AB11-4E59-8FCF-0E48824CE1BA}.Debug|AVR.Build.0 = Debug|AVR
14 | {A831F317-AB11-4E59-8FCF-0E48824CE1BA}.Release|AVR.ActiveCfg = Release|AVR
15 | {A831F317-AB11-4E59-8FCF-0E48824CE1BA}.Release|AVR.Build.0 = Release|AVR
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/chip_id.h:
--------------------------------------------------------------------------------
1 | /*
2 | * chip_id.h
3 | *
4 | * Created on: Dec 10, 2011
5 | * Author: Doug
6 | *
7 | * Copyright (C) 2011-2023 Doug Brown
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | *
22 | */
23 |
24 | #ifndef CHIP_ID_H_
25 | #define CHIP_ID_H_
26 |
27 | #define SST_GREENLIANT 0xBF
28 | #define GLS29EE010 0x07
29 | #define GLS29SF020 0x24
30 | #define GLS29SF040 0x13
31 | #define SST39SF010A 0xB5
32 | #define SST39SF020A 0xB6
33 | #define SST39SF040 0xB7
34 |
35 | #define AMD 0x01
36 | #define AM29F040B 0xA4
37 |
38 | #endif /* CHIP_ID_H_ */
39 |
--------------------------------------------------------------------------------
/drivers/mcp23s17.h:
--------------------------------------------------------------------------------
1 | /*
2 | * mcp23s17.h
3 | *
4 | * Created on: Nov 25, 2011
5 | * Author: Doug
6 | *
7 | * Copyright (C) 2011-2023 Doug Brown
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | *
22 | */
23 |
24 | #ifndef DRIVERS_MCP23S17_H_
25 | #define DRIVERS_MCP23S17_H_
26 |
27 | #include "../hal/spi.h"
28 |
29 | /// A few register defines. Ordinarily I wouldn't put these in the header file
30 | /// because users of this module shouldn't care...but I have had to do some
31 | /// optimizations with the AVR to bypass the hardware abstraction layer.
32 | #define MCP23S17_CONTROL_WRITE(address) (0x40 | (address << 1))
33 | #define MCP23S17_CONTROL_READ(address) (0x40 | (address << 1) | 1)
34 | #define MCP23S17_IODIRA 0x00
35 | #define MCP23S17_IODIRB 0x01
36 | #define MCP23S17_IPOLA 0x02
37 | #define MCP23S17_IPOLB 0x03
38 | #define MCP23S17_GPINTENA 0x04
39 | #define MCP23S17_GPINTENB 0x05
40 | #define MCP23S17_DEFVALA 0x06
41 | #define MCP23S17_DEFVALB 0x07
42 | #define MCP23S17_INTCONA 0x08
43 | #define MCP23S17_INTCONB 0x09
44 | #define MCP23S17_IOCON 0x0A
45 | #define MCP23S17_IOCON_AGAIN 0x0B
46 | #define MCP23S17_GPPUA 0x0C
47 | #define MCP23S17_GPPUB 0x0D
48 | #define MCP23S17_INTFA 0x0E
49 | #define MCP23S17_INTFB 0x0F
50 | #define MCP23S17_INTCAPA 0x10
51 | #define MCP23S17_INTCAPB 0x11
52 | #define MCP23S17_GPIOA 0x12
53 | #define MCP23S17_GPIOB 0x13
54 | #define MCP23S17_OLATA 0x14
55 | #define MCP23S17_OLATB 0x15
56 |
57 | /// Struct representing a single MCP23S17 device
58 | typedef struct MCP23S17
59 | {
60 | /// The SPI device representing this MCP23S17
61 | SPIDevice spi;
62 | } MCP23S17;
63 |
64 | void MCP23S17_Init(MCP23S17 *mcp, GPIOPin resetPin);
65 | void MCP23S17_Begin(MCP23S17 *mcp);
66 | void MCP23S17_End(MCP23S17 *mcp);
67 | void MCP23S17_SetDDR(MCP23S17 *mcp, uint16_t ddr);
68 | uint16_t MCP23S17_DDR(MCP23S17 *mcp);
69 | void MCP23S17_SetOutputs(MCP23S17 *mcp, uint16_t data);
70 | uint16_t MCP23S17_Outputs(MCP23S17 *mcp);
71 | uint16_t MCP23S17_ReadInputs(MCP23S17 *mcp);
72 | void MCP23S17_SetPullups(MCP23S17 *mcp, uint16_t pullups);
73 | uint16_t MCP23S17_Pullups(MCP23S17 *mcp);
74 |
75 | #endif /* DRIVERS_MCP23S17_H_ */
76 |
--------------------------------------------------------------------------------
/drivers/parallel_flash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * parallel_flash.h
3 | *
4 | * Created on: Nov 25, 2011
5 | * Author: Doug
6 | *
7 | * Copyright (C) 2011-2023 Doug Brown
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | *
22 | */
23 |
24 | #ifndef DRIVERS_PARALLEL_FLASH_H_
25 | #define DRIVERS_PARALLEL_FLASH_H_
26 |
27 | #include "../hal/parallel_bus.h"
28 |
29 | /// The number of chips we are simultaneously addressing
30 | #define PARALLEL_FLASH_NUM_CHIPS 4
31 |
32 | /// Masks for functions that want a chip mask...
33 | #define IC1 (1 << 3)
34 | #define IC2 (1 << 2)
35 | #define IC3 (1 << 1)
36 | #define IC4 (1 << 0)
37 | #define ALL_CHIPS (IC1 | IC2 | IC3 | IC4)
38 |
39 | /// Holds info about the chip (retrieved with JEDEC standards)
40 | typedef struct ParallelFlashChipID
41 | {
42 | /// The manufacturer ID
43 | uint8_t manufacturer;
44 | /// The device ID
45 | uint8_t device;
46 | } ParallelFlashChipID;
47 |
48 | /// Type/layout of chips currently being addressed
49 | typedef enum ParallelFlashChipType
50 | {
51 | /// Four SST39SF040 chips, 512 KB each, for a total of 2 MB
52 | ParallelFlash_SST39SF040_x4,
53 | /// Four M29F160FB5AN6E2 chips, 2 MB each, in 8-bit mode, for a total of 8 MB
54 | ParallelFlash_M29F160FB5AN6E2_x4,
55 | } ParallelFlashChipType;
56 |
57 | /// Struct representing a group of identical erase sectors
58 | typedef struct ParallelFlashEraseSectorGroup
59 | {
60 | uint32_t count;
61 | uint32_t size;
62 | } ParallelFlashEraseSectorGroup;
63 |
64 | // Tells which type of flash chip we are communicating with
65 | void ParallelFlash_SetChipType(ParallelFlashChipType type);
66 | ParallelFlashChipType ParallelFlash_ChipType(void);
67 |
68 | // Reads a set of data from all 4 chips simultaneously
69 | void ParallelFlash_Read(uint32_t startAddress, uint32_t *buf, uint16_t len);
70 |
71 | // Does an unlock sequence on the chips requested
72 | void ParallelFlash_UnlockChips(uint8_t chipsMask);
73 |
74 | // Identifies all four chips
75 | void ParallelFlash_IdentifyChips(ParallelFlashChipID *chips);
76 |
77 | // Erases the chips/sectors requested
78 | void ParallelFlash_EraseChips(uint8_t chipsMask);
79 | bool ParallelFlash_EraseSectors(uint32_t address, uint32_t length, uint8_t chipsMask, uint8_t numEraseSectorGroups, ParallelFlashEraseSectorGroup const *eraseSectorGroups);
80 |
81 | // Writes a buffer to all 4 chips simultaneously (each uint32_t contains an 8-bit portion for each chip).
82 | // Optimized variant of this function if we know we're writing to all 4 chips simultaneously.
83 | // Allows us to bypass a lot of operations involving "chipsMask".
84 | void ParallelFlash_WriteAllChips(uint32_t startAddress, uint32_t const *buf, uint16_t len);
85 |
86 | // Writes a buffer to a mask of requested chips (each uint32_t contains an 8-bit portion for each chip).
87 | void ParallelFlash_WriteSomeChips(uint32_t startAddress, uint32_t const *buf, uint16_t len, uint8_t chipsMask);
88 |
89 | #endif /* DRIVERS_PARALLEL_FLASH_H_ */
90 |
--------------------------------------------------------------------------------
/hal/at90usb646/Descriptors.h:
--------------------------------------------------------------------------------
1 | /*
2 | LUFA Library
3 | Copyright (C) Dean Camera, 2011.
4 |
5 | dean [at] fourwalledcubicle [dot] com
6 | www.lufa-lib.org
7 | */
8 |
9 | /*
10 | Copyright 2011 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 disclaim all warranties with regard to this
22 | software, including all implied warranties of merchantability
23 | and fitness. In no event shall the author be liable for any
24 | special, indirect or consequential damages or any damages
25 | whatsoever resulting from loss of use, data or profits, whether
26 | in an action of contract, negligence or other tortious action,
27 | arising out of or in connection with the use or performance of
28 | this software.
29 | */
30 |
31 | /** \file
32 | *
33 | * Header file for Descriptors.c.
34 | */
35 |
36 | #ifndef _DESCRIPTORS_H_
37 | #define _DESCRIPTORS_H_
38 |
39 | /* Includes: */
40 | #include
41 |
42 | #include "LUFA/Drivers/USB/USB.h"
43 |
44 | /* Macros: */
45 | /** Endpoint number of the CDC device-to-host notification IN endpoint. */
46 | #define CDC_NOTIFICATION_EPNUM 2
47 |
48 | /** Endpoint number of the CDC device-to-host data IN endpoint. */
49 | #define CDC_TX_EPNUM 3
50 |
51 | /** Endpoint number of the CDC host-to-device data OUT endpoint. */
52 | #define CDC_RX_EPNUM 4
53 |
54 | /** Size in bytes of the CDC device-to-host notification IN endpoint. */
55 | #define CDC_NOTIFICATION_EPSIZE 8
56 |
57 | /** Size in bytes of the CDC data IN and OUT endpoints. */
58 | #define CDC_TXRX_EPSIZE 64
59 |
60 | /* Type Defines: */
61 | /** Type define for the device configuration descriptor structure. This must be defined in the
62 | * application code, as the configuration descriptor contains several sub-descriptors which
63 | * vary between devices, and which describe the device's usage to the host.
64 | */
65 | typedef struct
66 | {
67 | USB_Descriptor_Configuration_Header_t Config;
68 |
69 | // CDC Command Interface
70 | USB_Descriptor_Interface_t CDC_CCI_Interface;
71 | USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
72 | USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
73 | USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
74 | USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
75 |
76 | // CDC Data Interface
77 | USB_Descriptor_Interface_t CDC_DCI_Interface;
78 | USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
79 | USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
80 | } USB_Descriptor_Configuration_t;
81 |
82 | /* Function Prototypes: */
83 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
84 | const uint8_t wIndex,
85 | const void** const DescriptorAddress)
86 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
87 |
88 | #endif
89 |
90 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/CodeTemplates/DriverStubs/Buttons.h:
--------------------------------------------------------------------------------
1 | /*
2 | LUFA Library
3 | Copyright (C) Dean Camera, 2012.
4 |
5 | dean [at] fourwalledcubicle [dot] com
6 | www.lufa-lib.org
7 | */
8 |
9 | /*
10 | Copyright 2012 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 disclaim 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 | /*
32 | This is a stub driver header file, for implementing custom board
33 | layout hardware with compatible LUFA board specific drivers. If
34 | the library is configured to use the BOARD_USER board mode, this
35 | driver file should be completed and copied into the "/Board/" folder
36 | inside the application's folder.
37 |
38 | This stub is for the board-specific component of the LUFA Buttons driver,
39 | for the control of physical board-mounted GPIO pushbuttons.
40 | */
41 |
42 | #ifndef __BUTTONS_USER_H__
43 | #define __BUTTONS_USER_H__
44 |
45 | /* Includes: */
46 | // TODO: Add any required includes here
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_BUTTONS_H)
55 | #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
56 | #endif
57 |
58 | /* Public Interface - May be used in end-application: */
59 | /* Macros: */
60 | /** Button mask for the first button on the board. */
61 | #define BUTTONS_BUTTON1 // TODO: Add mask for first board button here
62 |
63 | /* Inline Functions: */
64 | #if !defined(__DOXYGEN__)
65 | static inline void Buttons_Init(void)
66 | {
67 | // TODO: Initialize the appropriate port pins as an inputs here, with pull-ups
68 | }
69 |
70 | static inline void Buttons_Disable(void)
71 | {
72 | // TODO: Clear the appropriate port pins as high impedance inputs here
73 | }
74 |
75 | static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
76 | static inline uint8_t Buttons_GetStatus(void)
77 | {
78 | // TODO: Return current button status here, debounced if required
79 | }
80 | #endif
81 |
82 | /* Disable C linkage for C++ Compilers: */
83 | #if defined(__cplusplus)
84 | }
85 | #endif
86 |
87 | #endif
88 |
89 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/CodeTemplates/DriverStubs/Joystick.h:
--------------------------------------------------------------------------------
1 | /*
2 | LUFA Library
3 | Copyright (C) Dean Camera, 2012.
4 |
5 | dean [at] fourwalledcubicle [dot] com
6 | www.lufa-lib.org
7 | */
8 |
9 | /*
10 | Copyright 2012 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 disclaim 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 | /*
32 | This is a stub driver header file, for implementing custom board
33 | layout hardware with compatible LUFA board specific drivers. If
34 | the library is configured to use the BOARD_USER board mode, this
35 | driver file should be completed and copied into the "/Board/" folder
36 | inside the application's folder.
37 |
38 | This stub is for the board-specific component of the LUFA Joystick
39 | driver, for a digital four-way (plus button) joystick.
40 | */
41 |
42 | #ifndef __JOYSTICK_USER_H__
43 | #define __JOYSTICK_USER_H__
44 |
45 | /* Includes: */
46 | // TODO: Add any required includes here
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_JOYSTICK_H)
55 | #error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead.
56 | #endif
57 |
58 | /* Public Interface - May be used in end-application: */
59 | /* Macros: */
60 | /** Mask for the joystick being pushed in the left direction. */
61 | #define JOY_LEFT // TODO: Add mask to indicate joystick left position here
62 |
63 | /** Mask for the joystick being pushed in the right direction. */
64 | #define JOY_RIGHT // TODO: Add mask to indicate joystick right position here
65 |
66 | /** Mask for the joystick being pushed in the upward direction. */
67 | #define JOY_UP // TODO: Add mask to indicate joystick up position here
68 |
69 | /** Mask for the joystick being pushed in the downward direction. */
70 | #define JOY_DOWN // TODO: Add mask to indicate joystick down position here
71 |
72 | /** Mask for the joystick being pushed inward. */
73 | #define JOY_PRESS // TODO: Add mask to indicate joystick pressed position here
74 |
75 | /* Inline Functions: */
76 | #if !defined(__DOXYGEN__)
77 | static inline void Joystick_Init(void)
78 | {
79 | // TODO: Initialize joystick port pins as inputs with pull-ups
80 | }
81 |
82 | static inline void Joystick_Disable(void)
83 | {
84 | // TODO: Clear the joystick pins as high impedance inputs here
85 | }
86 |
87 | static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
88 | static inline uint8_t Joystick_GetStatus(void)
89 | {
90 | // TODO: Return current joystick position data which can be obtained by masking against the JOY_* macros
91 | }
92 | #endif
93 |
94 | /* Disable C linkage for C++ Compilers: */
95 | #if defined(__cplusplus)
96 | }
97 | #endif
98 |
99 | #endif
100 |
101 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/CodeTemplates/DriverStubs/LEDs.h:
--------------------------------------------------------------------------------
1 | /*
2 | LUFA Library
3 | Copyright (C) Dean Camera, 2012.
4 |
5 | dean [at] fourwalledcubicle [dot] com
6 | www.lufa-lib.org
7 | */
8 |
9 | /*
10 | Copyright 2012 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 disclaim 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 | /*
32 | This is a stub driver header file, for implementing custom board
33 | layout hardware with compatible LUFA board specific drivers. If
34 | the library is configured to use the BOARD_USER board mode, this
35 | driver file should be completed and copied into the "/Board/" folder
36 | inside the application's folder.
37 |
38 | This stub is for the board-specific component of the LUFA LEDs driver,
39 | for the LEDs (up to four) mounted on most development boards.
40 | */
41 |
42 | #ifndef __LEDS_USER_H__
43 | #define __LEDS_USER_H__
44 |
45 | /* Includes: */
46 | // TODO: Add any required includes here
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_LEDS_H)
55 | #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
56 | #endif
57 |
58 | /* Public Interface - May be used in end-application: */
59 | /* Macros: */
60 | /** LED mask for the first LED on the board. */
61 | #define LEDS_LED1 // TODO: Add mask for first board LED here
62 |
63 | /** LED mask for the second LED on the board. */
64 | #define LEDS_LED2 // TODO: Add mask for second board LED here
65 |
66 | /** LED mask for the third LED on the board. */
67 | #define LEDS_LED3 // TODO: Add mask for third board LED here
68 |
69 | /** LED mask for the fourth LED on the board. */
70 | #define LEDS_LED4 // TODO: Add mask for fourth board LED here
71 |
72 | /** LED mask for all the LEDs on the board. */
73 | #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
74 |
75 | /** LED mask for none of the board LEDs. */
76 | #define LEDS_NO_LEDS 0
77 |
78 | /* Inline Functions: */
79 | #if !defined(__DOXYGEN__)
80 | static inline void LEDs_Init(void)
81 | {
82 | // TODO: Add code to initialize LED port pins as outputs here
83 | }
84 |
85 | static inline void LEDs_Disable(void)
86 | {
87 | // TODO: Clear the LED port pins as high impedance inputs here
88 | }
89 |
90 | static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
91 | {
92 | // TODO: Add code to turn on LEDs given in the LEDMask mask here, leave others as-is
93 | }
94 |
95 | static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
96 | {
97 | // TODO: Add code to turn off LEDs given in the LEDMask mask here, leave others as-is
98 | }
99 |
100 | static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
101 | {
102 | // TODO: Add code to turn on only LEDs given in the LEDMask mask here, all others off
103 | }
104 |
105 | static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
106 | {
107 | // TODO: Add code to set the Leds in the given LEDMask to the status given in ActiveMask here
108 | }
109 |
110 | static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
111 | {
112 | // TODO: Add code to toggle the Leds in the given LEDMask, ignoring all others
113 | }
114 |
115 | static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
116 | static inline uint8_t LEDs_GetLEDs(void)
117 | {
118 | // TODO: Add code to return the current LEDs status' here which can be masked against LED_LED* macros
119 | }
120 | #endif
121 |
122 | /* Disable C linkage for C++ Compilers: */
123 | #if defined(__cplusplus)
124 | }
125 | #endif
126 |
127 | #endif
128 |
129 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/CodeTemplates/makefile_template.avr8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dougg3/mac-rom-simm-programmer/87e074413c24a10ac9ac6eddd17e2dbc8793f40d/hal/at90usb646/LUFA/CodeTemplates/makefile_template.avr8
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/CodeTemplates/makefile_template.uc3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dougg3/mac-rom-simm-programmer/87e074413c24a10ac9ac6eddd17e2dbc8793f40d/hal/at90usb646/LUFA/CodeTemplates/makefile_template.uc3
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/CodeTemplates/makefile_template.xmega:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dougg3/mac-rom-simm-programmer/87e074413c24a10ac9ac6eddd17e2dbc8793f40d/hal/at90usb646/LUFA/CodeTemplates/makefile_template.xmega
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/Common/Architectures.h:
--------------------------------------------------------------------------------
1 | /*
2 | LUFA Library
3 | Copyright (C) Dean Camera, 2012.
4 |
5 | dean [at] fourwalledcubicle [dot] com
6 | www.lufa-lib.org
7 | */
8 |
9 | /*
10 | Copyright 2012 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 disclaim 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 Supported library architecture defines.
33 | *
34 | * \copydetails Group_Architectures
35 | *
36 | * \note Do not include this file directly, rather include the Common.h header file instead to gain this file's
37 | * functionality.
38 | */
39 |
40 | /** \ingroup Group_Common
41 | * \defgroup Group_Architectures Hardware Architectures
42 | * \brief Supported library architecture defines.
43 | *
44 | * Architecture macros for selecting the desired target microcontroller architecture. One of these values should be
45 | * defined as the value of \c ARCH in the user project makefile via the \c -D compiler switch to GCC, to select the
46 | * target architecture.
47 | *
48 | * The selected architecture should remain consistent with the makefile \c ARCH value, which is used to select the
49 | * underlying driver source files for each architecture.
50 | *
51 | * @{
52 | */
53 |
54 | #ifndef __LUFA_ARCHITECTURES_H__
55 | #define __LUFA_ARCHITECTURES_H__
56 |
57 | /* Preprocessor Checks: */
58 | #if !defined(__INCLUDE_FROM_COMMON_H)
59 | #error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
60 | #endif
61 |
62 | /* Public Interface - May be used in end-application: */
63 | /* Macros: */
64 | /** Selects the Atmel 8-bit AVR (AT90USB* and ATMEGA*U* chips) architecture. */
65 | #define ARCH_AVR8 0
66 |
67 | /** Selects the Atmel 32-bit UC3 AVR (AT32UC3* chips) architecture. */
68 | #define ARCH_UC3 1
69 |
70 | /** Selects the Atmel XMEGA AVR (ATXMEGA*U chips) architecture. */
71 | #define ARCH_XMEGA 2
72 |
73 | #if !defined(__DOXYGEN__)
74 | #define ARCH_ ARCH_AVR8
75 |
76 | #if !defined(ARCH)
77 | #define ARCH ARCH_AVR8
78 | #endif
79 | #endif
80 |
81 | #endif
82 |
83 | /** @} */
84 |
85 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/Common/CompilerSpecific.h:
--------------------------------------------------------------------------------
1 | /*
2 | LUFA Library
3 | Copyright (C) Dean Camera, 2012.
4 |
5 | dean [at] fourwalledcubicle [dot] com
6 | www.lufa-lib.org
7 | */
8 |
9 | /*
10 | Copyright 2012 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 disclaim 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 Compiler specific definitions for code optimization and correctness.
33 | *
34 | * \copydetails Group_CompilerSpecific
35 | *
36 | * \note Do not include this file directly, rather include the Common.h header file instead to gain this file's
37 | * functionality.
38 | */
39 |
40 | /** \ingroup Group_Common
41 | * \defgroup Group_CompilerSpecific Compiler Specific Definitions
42 | * \brief Compiler specific definitions for code optimization and correctness.
43 | *
44 | * Compiler specific definitions to expose certain compiler features which may increase the level of code optimization
45 | * for a specific compiler, or correct certain issues that may be present such as memory barriers for use in conjunction
46 | * with atomic variable access.
47 | *
48 | * Where possible, on alternative compilers, these macros will either have no effect, or default to returning a sane value
49 | * so that they can be used in existing code without the need for extra compiler checks in the user application code.
50 | *
51 | * @{
52 | */
53 |
54 | #ifndef __LUFA_COMPILERSPEC_H__
55 | #define __LUFA_COMPILERSPEC_H__
56 |
57 | /* Preprocessor Checks: */
58 | #if !defined(__INCLUDE_FROM_COMMON_H)
59 | #error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
60 | #endif
61 |
62 | /* Public Interface - May be used in end-application: */
63 | /* Macros: */
64 | #if defined(__GNUC__) || defined(__DOXYGEN__)
65 | /** Forces GCC to use pointer indirection (via the device's pointer register pairs) when accessing the given
66 | * struct pointer. In some cases GCC will emit non-optimal assembly code when accessing a structure through
67 | * a pointer, resulting in a larger binary. When this macro is used on a (non \c const) structure pointer before
68 | * use, it will force GCC to use pointer indirection on the elements rather than direct store and load
69 | * instructions.
70 | *
71 | * \param[in, out] StructPtr Pointer to a structure which is to be forced into indirect access mode.
72 | */
73 | #define GCC_FORCE_POINTER_ACCESS(StructPtr) __asm__ __volatile__("" : "=b" (StructPtr) : "0" (StructPtr))
74 |
75 | /** Forces GCC to create a memory barrier, ensuring that memory accesses are not reordered past the barrier point.
76 | * This can be used before ordering-critical operations, to ensure that the compiler does not re-order the resulting
77 | * assembly output in an unexpected manner on sections of code that are ordering-specific.
78 | */
79 | #define GCC_MEMORY_BARRIER() __asm__ __volatile__("" ::: "memory");
80 |
81 | /** Determines if the specified value can be determined at compile-time to be a constant value when compiling under GCC.
82 | *
83 | * \param[in] x Value to check compile-time constantness of.
84 | *
85 | * \return Boolean true if the given value is known to be a compile time constant, false otherwise.
86 | */
87 | #define GCC_IS_COMPILE_CONST(x) __builtin_constant_p(x)
88 | #else
89 | #define GCC_FORCE_POINTER_ACCESS(StructPtr)
90 | #define GCC_MEMORY_BARRIER()
91 | #define GCC_IS_COMPILE_CONST(x) 0
92 | #endif
93 |
94 | #endif
95 |
96 | /** @} */
97 |
98 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/AboutLUFA.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_AboutLUFA About LUFA
9 | *
10 | * This section of the manual contains information about the library as a whole, including its supported targets,
11 | * past and planned changes, and links to other projects incorporating LUFA.
12 | *
13 | * Subsections:
14 | * \li \subpage Page_DeviceSupport - Current Device and Hardware Support
15 | * \li \subpage Page_Resources - LUFA and USB Related Resources
16 | * \li \subpage Page_ChangeLog - Project Changelog
17 | * \li \subpage Page_FutureChanges - Planned Changes to the Library
18 | * \li \subpage Page_LUFAPoweredProjects - Other Projects Using LUFA
19 | */
20 |
21 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/AlternativeStacks.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_AlternativeStacks Alternative USB AVR Stacks
9 | *
10 | * LUFA is not the only stack available for the USB AVRs, although it is perhaps the best (see \ref Page_WhyUseLUFA).
11 | * In the interests of completeness and user choice, other known USB AVR stacks are listed here.
12 | *
13 | * \section Sec_HardwareStacks Hardware USB AVR Stacks
14 | * These are the known alternative USB stacks which are designed for and run exclusively on the USB AVR series microcontrollers,
15 | * which contain on-chip USB controller hardware for maximum features and speed.
16 | *
17 | * - Name: Atmel USB AVR Stack (Atmel Inc.) \n
18 | * Cost: Free \n
19 | * License: Atmel Limited License (see Atmel download for details) \n
20 | * Website: http://atmel.com/dyn/products/app_notes.asp?family_id=607#USB \n
21 | * Description: This is the official Atmel USB AVR stack, for their 8-bit USB AVR lineup. Each series of
22 | * USB AVR is separated into a separate download stack, which is both AVR-GCC and IAR compatible.
23 | *
24 | * - Name: Dr. Stefan Salewski's AT90USB1287 Stack (Dr. Stefan Salewski) \n
25 | * Cost: Free \n
26 | * License: GPL \n
27 | * Website: http://www.ssalewski.de/AT90USB_firmware.html.en \n
28 | * Description: This is a GPL'd library specifically designed for the AT90USB1287, by Dr. Stefan Salewski, a
29 | * German Physicist. It compiles for AVR-GCC and can potentially be modified to work on other USB
30 | * AVR models.
31 | *
32 | * - Name: FreakUSB Stack (FreakLabs) \n
33 | * Cost: Free \n
34 | * License: Modified BSD \n
35 | * Website: http://freaklabs.org/index.php/FreakUSB-Open-Source-USB-Device-Stack.html \n
36 | * Description: An open source simple USB stack for a selection of the USB AVRs. Contains a sample class driver
37 | * for the CDC-ACM class, however other class driver implementations are also possible.
38 | *
39 | * - Name: PJRC Teensy Stack (Paul Stoffregen) \n
40 | * Cost: Free \n
41 | * License: BSD \n
42 | * Website: http://www.pjrc.com/teensy/usb_debug_only.html \n
43 | * Description: Not so much a complete stack as a collection of USB enabled demos, this library is specifically
44 | * designed for the PJRC Teensy line of USB AVRs, and thus may need to be modified for other USB AVR
45 | * chips. These minimal code samples shows the inner workings of the USB controller, without all the
46 | * abstraction present in most other USB AVR stacks.
47 | *
48 | * \section Sec_SoftwareStacks Software AVR Stacks
49 | * These are the known alternative USB stacks which can run on regular AVR models, lacking dedicated hardware USB controllers
50 | * via a bit-banged (emulated) version of the USB protocol. They are limited in their capabilities due to the cycles required
51 | * to be dedicated to managing the USB bus, but offer a cheap way to implement USB functionality into a design.
52 | *
53 | * - Name: AVR309: Software USB (Atmel) \n
54 | * Cost: Free \n
55 | * License: None Stated \n
56 | * Website: http://www.atmel.com/dyn/Products/app_notes.asp?family_id=607 \n
57 | * Description: Atmel's official software USB implementation, an Application Note containing work by Igor Cesko. This
58 | * is a minimal assembly-only implementation of software USB, providing HID functionality. Less compile
59 | * options than V-USB (see below).
60 | *
61 | * - Name: V-USB (Objective Development) \n
62 | * Cost: Free for some uses, see website for licensing \n
63 | * License: Dual GPL2/Custom \n
64 | * Website: http://www.obdev.at/products/vusb/index.html \n
65 | * Description: Well regarded and complete USB 1.1 software stack for several AVR models, implementing Low Speed HID.
66 | * Used in many commercial and non-commercial designs, with user-submitted projects available for viewing
67 | * on the company's website. Uses C language code mixed with assembly for time-critical sections.
68 | */
69 |
70 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/Author.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dougg3/mac-rom-simm-programmer/87e074413c24a10ac9ac6eddd17e2dbc8793f40d/hal/at90usb646/LUFA/DoxygenPages/Author.jpg
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/BuildingLinkableLibraries.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \page Page_BuildLibrary Building as a Linkable Library
8 | *
9 | * The LUFA library can be built as a proper linkable library (with the extention .a) under AVR-GCC, so that
10 | * the library does not need to be recompiled with each revision of a user project. Instructions for creating
11 | * a library from a given source tree can be found in the AVR-GCC user manual included in the WinAVR install
12 | * /Docs/ directory.
13 | *
14 | * However, building the library is not recommended, as the static (compile-time) options will be
15 | * unable to be changed without a recompilation of the LUFA code. Therefore, if the library is to be built
16 | * from the LUFA source, it should be made to be application-specific and compiled with the static options
17 | * that are required for each project (which should be recorded along with the library).
18 | *
19 | * Normal library use has the library components compiled in at the same point as the application code, as
20 | * demonstrated in the library demos and applications. This is the preferred method, as the library is recompiled
21 | * each time to ensure that all static options for a particular application are applied.
22 | */
23 |
24 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/CompilingApps.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \page Page_CompilingApps Compiling the Demos, Bootloaders and Projects
8 | *
9 | * The following details how to compile the included LUFA demos, applications and bootloaders using AVR-GCC.
10 | *
11 | * \section Sec_Prerequisites Prerequisites
12 | * Before you can compile any of the LUFA library code or demos, you will need a recent distribution of avr-libc (1.6.2+)
13 | * and the AVR-GCC (4.2+) compiler. For Windows users, the best way to obtain these is the WinAVR project
14 | * (http://winavr.sourceforge.net) as this provides a single-file setup for everything required to compile your
15 | * own AVR projects.
16 | *
17 | * \section Sec_Compiling Compiling a LUFA Application
18 | * Compiling the LUFA demos, applications and/or bootloaders is very simple. LUFA comes with makefile scripts for
19 | * each individual demo, bootloader and project folder, as well as scripts in the /Demos/, /Bootloaders/, /Projects/
20 | * and the LUFA root directory. This means that compilation can be started from any of the above directories, with
21 | * a build started from an upper directory in the directory structure executing build of all child directories under it.
22 | * This means that while a build inside a particular demo directory will build only that particular demo, a build stated
23 | * from the /Demos/ directory will build all LUFA demo projects sequentially.
24 | *
25 | * To build a project from the source via the command line, the command "make all" should be executed from the command line in the directory
26 | * of interest. To remove compiled files (including the binary output, all intermediately files and all diagnostic output
27 | * files), execute "make clean". Once a "make all" has been run and no errors were encountered, the resulting binary will
28 | * be located in the generated ".HEX" file. If your project makes use of pre-initialized EEPROM variables, the generated ".EEP"
29 | * file will contain the project's EEPROM data.
30 | */
31 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/DevelopingWithLUFA.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_DevelopingWithLUFA Developing With LUFA
9 | *
10 | * This section of the manual contains information on LUFA development, such as Getting Started information,
11 | * information on compile-time tuning of the library and other developer-related sections.
12 | *
13 | * Subsections:
14 | * \li \subpage Page_TokenSummary - Summary of Compile Time Tokens
15 | * \li \subpage Page_Migration - Migrating from an Older LUFA Version
16 | * \li \subpage Page_VIDPID - Allocated USB VID and PID Values
17 | * \li \subpage Page_BuildLibrary - Building as a Linkable Library
18 | * \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers
19 | * \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software
20 | */
21 |
22 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/Donating.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_Donating Donating to Support This Project
9 | *
10 | * \image html Author.jpg "Dean Camera, LUFA Developer"
11 | *
12 | * I am a 22 year old University student studying for a double degree in Computer Science and Electronics Engineering.
13 | * The development and support of this library requires much effort from myself, as I am the sole developer, maintainer
14 | * and supporter. Please consider donating a small amount to support this and my future Open Source projects - All
15 | * donations are greatly appreciated.
16 | *
17 | * Note that commercial entities can remove the attribution portion of the LUFA license by a one-time fee - see
18 | * \ref Page_LicenseInfo for more details (Note: Please do NOT pay this in advance through the donation link below -
19 | * contact author for payment details.).
20 | *
21 | * \image html "http://www.pledgie.com/campaigns/6927.png?skin_name=chrome"
22 | * Donate to this project via PayPal - Thanks in Advance!
23 | */
24 |
25 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/FutureChanges.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \page Page_FutureChanges Future Changes
8 | *
9 | * Below is a list of future changes which are proposed for the LUFA library, but not yet started/complete.
10 | * This gives an unordered list of future changes which may be available in future releases of the library.
11 | * If you have an item to add to this list, please contact the library author via email, the LUFA mailing list,
12 | * or post your suggestion as an enhancement request to the project bug tracker.
13 | *
14 | * Targeted for Future Releases:
15 | * - Code Features
16 | * -# Add hub support when in Host mode for multiple devices
17 | * -# Investigate virtual hubs when in device mode instead of composite devices
18 | * -# Change makefiles to allow for absolute LUFA location to be used
19 | * -# Re-add interrupt Pipe/Endpoint support
20 | * -# Add makefile includes to reduce boilerplate in user makefiles
21 | * -# Update stream APIs to use DMA transfers on supported architectures
22 | * -# Pull out third party libraries into a separate folder and reference them as required
23 | * -# Add a LUFA_YIELD macro for integration into a third-party RTOS
24 | * -# Abstract out Mass Storage byte send/receive to prevent low level API use in projects
25 | * -# Consider switch from endpoint numbers to full endpoint addresses to ease future architecture expansion
26 | * -# Fix HID report parser usage support for array types
27 | * -# Make HOST_DEVICE_SETTLE_DELAY_MS a global variable that can be changed
28 | * -# Add MANDATORY_EVENT_FUNCTIONS compile time option
29 | * -# Add watchdog support to the library and apps/bootloaders
30 | * -# Re-run USBIF test suite on all classes to formally verify operation
31 | * - Documentation/Support
32 | * -# Add detailed overviews of how each demo works
33 | * -# Add board overviews
34 | * -# Write LUFA tutorials
35 | * - Demos/Projects
36 | * -# Device/Host USB bridge
37 | * -# Finish incomplete demos and projects
38 | * -# Add class driver support for Test and Measurement class
39 | * -# Add class driver support for EEM class
40 | * -# Add class driver support for ECM class
41 | * -# Port all demos to multiple architectures
42 | * - Ports
43 | * -# Finish USB XMEGA port
44 | * -# Add AVR32 UC3C, UC3D and UC3L support
45 | * -# Atmel ARM7 series microcontrollers
46 | * -# Other (commercial) C compilers
47 | */
48 |
49 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/GettingStarted.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \page Page_GettingStarted Getting Started
8 | *
9 | * Out of the box, LUFA contains a large number of pre-made class demos for you to test, experiment with and
10 | * ultimately build upon for your own projects. All the demos (where possible) come pre-configured to build and
11 | * run correctly on the AT90USB1287 AVR microcontroller, mounted on the Atmel USBKEY board and running at an 8MHz
12 | * master clock. This is due to two reasons; one, it is the hardware the author possesses, and two, it is the most
13 | * popular Atmel USB demonstration board to date. To learn how to reconfigure, recompile and program the included
14 | * LUFA applications using different settings, see the subsections below.
15 | *
16 | * Most of the included demos in the /Demos/ folder come in both ClassDriver and LowLevel varieties. If you are new
17 | * to LUFA, it is highly recommended that you look at the ClassDriver versions first, which use the pre-made USB
18 | * Class Drivers (\ref Group_USBClassDrivers) to simplify the use of the standard USB classes in user applications.
19 | *
20 | * For an overview of the included library applications, bootloaders and demos, see \ref Page_LibraryApps.
21 | *
22 | * Subsections:
23 | * \li \subpage Page_ConfiguringApps - How to Configure the Included Demos, Projects and Bootloaders
24 | * \li \subpage Page_CompilingApps - How to Compile the Included Demos, Projects and Bootloaders
25 | * \li \subpage Page_ProgrammingApps - How to Program an AVR with the Included Demos, Projects and Bootloaders
26 | */
27 |
28 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/Groups.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \defgroup Group_BoardDrivers Board Drivers
8 | *
9 | * Functions, macros, variables, enums and types related to the control of physical board hardware.
10 | */
11 |
12 | /** \defgroup Group_PeripheralDrivers On-chip Peripheral Drivers
13 | *
14 | * Functions, macros, variables, enums and types related to the control of AVR subsystems.
15 | */
16 |
17 | /** \defgroup Group_MiscDrivers Miscellaneous Drivers
18 | *
19 | * Miscellaneous driver Functions, macros, variables, enums and types.
20 | */
21 |
22 | /** \defgroup Group_PlatformDrivers System Platform Drivers
23 | *
24 | * Drivers relating to the general architecture platform, such as clock setup and interrupt management.
25 | */
26 |
27 | /** \defgroup Group_PlatformDrivers_AVR8 AVR8
28 | * \ingroup Group_PlatformDrivers
29 | *
30 | * Drivers relating to the AVR8 architecture platform, such as clock setup and interrupt management.
31 | */
32 |
33 | /** \defgroup Group_PlatformDrivers_XMEGA XMEGA
34 | * \ingroup Group_PlatformDrivers
35 | *
36 | * Drivers relating to the XMEGA architecture platform, such as clock setup and interrupt management.
37 | */
38 |
39 | /** \defgroup Group_PlatformDrivers_UC3 UC3
40 | * \ingroup Group_PlatformDrivers
41 | *
42 | * Drivers relating to the UC3 architecture platform, such as clock setup and interrupt management.
43 | */
44 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/LUFA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dougg3/mac-rom-simm-programmer/87e074413c24a10ac9ac6eddd17e2dbc8793f40d/hal/at90usb646/LUFA/DoxygenPages/LUFA.png
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/LUFA_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dougg3/mac-rom-simm-programmer/87e074413c24a10ac9ac6eddd17e2dbc8793f40d/hal/at90usb646/LUFA/DoxygenPages/LUFA_thumb.png
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/LUFAvsAtmelStack.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_LUFAvsAtmelStack LUFA vs the Atmel 8-bit USB AVR Stack
9 | *
10 | * Atmel offers an official 8-bit USB AVR stack, which may be incorporated into user projects and products. As LUFA and the Atmel
11 | * stack aims to give roughly the same functionality to a design, it is often asked what advantages LUFA carries over the official
12 | * Atmel USB stack for the 8-bit USB AVRs. Below are just some of the advantages to choosing LUFA over the official Atmel stack.
13 | *
14 | * - Licensing:
15 | * LUFA is released under a very permissive MIT license (see \ref Page_LicenseInfo), while the Atmel stack carries several
16 | * restrictions as to how and where it can be used. LUFA's licensing should be suitable for both Commercial and Non-Commercial
17 | * entities alike.
18 | *
19 | * - Demos and Projects:
20 | * Unlike the Atmel stack, LUFA comes with many different Device and Host mode Demos and Projects ready to run out of the box.
21 | * Atmel favors separate downloads for each of their (small set) of USB AVR demos, which requires more time and offers less
22 | * to the end-user. LUFA also contains several open source Bootloaders, which can be modified as the user wishes to suit his or
23 | * her application, instead of being forced to use Atmel's single prebuilt (closed-source) DFU bootloader.
24 | *
25 | * - Central Library Code:
26 | * LUFA is designed to allow the central library core code to be shared amongst several projects, so long as the compiled object
27 | * files are cleaned between different projects. This is in direct contrast to the Atmel library, which is strongly coupled to the
28 | * project it is integrated with. Using LUFA allows for only one copy of the library core to be needed for all applications, and
29 | * makes updating the library used in all projects a trivial copy-and-paste process.
30 | *
31 | * - Clean API:
32 | * One of the main design goals of LUFA is to make the API easy to use. While LUFA is a fluid project which has undergone many
33 | * API improvements, the API is arguably much nicer to use and easier to understand than the equivalent Atmel stack code. LUFA's
34 | * API is also more complete than the Atmel stack, and contains many features to speed up application development.
35 | *
36 | * - Full Hardware Support:
37 | * LUFA supports the full range of Atmel's USB AVR microcontrollers (see \ref Page_DeviceSupport), with porting between chips being
38 | * as simple as a single compile switch in many cases. Atmel's stack requires different libraries to be used based on the USB AVR
39 | * microcontroller series, complicating the process of moving between USB AVR models. In addition, LUFA contains drivers for all the
40 | * hardware contained on Atmel's USB AVR based boards, so you can get started quickly and easily.
41 | *
42 | * - Better Library Support:
43 | * As many people are now using LUFA, there is a community being built around it. You can get answers to your LUFA related questions
44 | * quickly by either emailing the library author (subject to author's schedule) or by posting to the official LUFA support mailing list.
45 | *
46 | * - More Compact Code:
47 | * LUFA is written from the ground up to compile optimally, using clean code and good design. Two demos giving the same functionality -
48 | * the LUFA Low Level API Mouse Demo vs. the Atmel AVR270 HID Mouse application note shows LUFA to be the clear size winner *.
49 | *
50 | * * LUFA Low Level Mouse Demo: 3510 bytes, Atmel AVR270 Mouse Application Note: 4222 bytes, using an identical build environment.
51 | */
52 |
53 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/LibraryResources.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_Resources Library Resources
9 | *
10 | * \section Sec_UnofficialResources Unofficial Resources
11 | * Unofficial Russian LUFA documentation translation: http://microsin.ru/Download.cnt/doc/LUFA/ \n
12 | *
13 | * \section Sec_ProjectPages LUFA Related Webpages
14 | * Project Homepage: http://www.lufa-lib.org \n
15 | * Commercial Licenses: http://www.lufa-lib.org/license \n
16 | * Author's Website: http://www.fourwalledcubicle.com \n
17 | * Development Blog: http://www.fourwalledcubicle.com/blog \n
18 | *
19 | * \section Sec_ProjectHelp Assistance With LUFA
20 | * Discussion Group: http://www.lufa-lib.org/support \n
21 | * Author's Email: dean [at] fourwalledcubicle [dot] com \n
22 | *
23 | * \section Sec_InDevelopment Latest In-Development Source Code
24 | * Issue Tracker: http://www.lufa-lib.org/tracker \n
25 | * SVN Access: http://www.lufa-lib.org/svn \n
26 | * GIT Access: http://www.lufa-lib.org/git \n
27 | * Latest Repository Source Archive: http://www.lufa-lib.org/latest-archive \n
28 | * Commit RSS Feed: http://www.lufa-lib.org/rss \n
29 | *
30 | * \section Sec_USBResources USB Resources
31 | * USB-IF Website: http://www.usb.org \n
32 | */
33 |
34 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/LicenseInfo.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_LicenseInfo Source Code License
9 | *
10 | * The LUFA library is currently released under the MIT license, included below.
11 | *
12 | * Commercial entities can opt out of the public disclosure clause in this license
13 | * for a one-time US$1500 payment. This provides a non-exclusive modified MIT licensed which
14 | * allows for the free use of the LUFA library, bootloaders and (where the sole copyright
15 | * is attributed to Dean Camera) demos without public disclosure within an organization, in
16 | * addition to three free hours of consultation with the library author, and priority support.
17 | * Please visit the Commercial License link on \ref Page_Resources for more information on
18 | * ordering a commercial license for your company.
19 | *
20 | * \verbinclude License.txt
21 | */
22 |
23 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/MainPage.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \mainpage
9 | *
10 | * \image html LUFA.png
11 | *
12 | * \n
13 | *
14 | * \n
15 | *
16 | * LUFA is donationware. For author and donation information, see \ref Page_Donating.
17 | *
18 | * LUFA is an open-source USB library for the USB-enabled AVR microcontrollers, released under the MIT license (see \ref Page_LicenseInfo).
19 | * It supports a large number of USB AVR models and boards (see \ref Page_DeviceSupport). It is designed to provide an easy to use,
20 | * feature rich framework for the development of USB peripherals and hosts.
21 | *
22 | * LUFA focuses on the microcontroller side of USB development only; it includes no PC host USB driver development facilities - other projects
23 | * such as the Windows Driver Development Kit, Windows USB Device Mode Framework and libusb may be of interest for developing custom OS drivers.
24 | * While custom USB devices can be made with LUFA using such tools, the included demos all use the inbuilt OS drivers for each USB class for
25 | * simplicity.
26 | *
27 | * The library is currently in a stable release, suitable for download and incorporation into user projects for
28 | * both host and device modes. For information about the project progression, see the blog link at \ref Page_Resources.
29 | *
30 | * LUFA is written specifically for the free AVR-GCC compiler, and uses several GCC-only extensions to make the
31 | * library API more streamlined and robust. You can download AVR-GCC for free in a convenient windows package,
32 | * from the the WinAVR website (see \ref Page_Resources).
33 | *
34 | * The only required AVR peripherals for LUFA is the USB controller itself and interrupts - LUFA does not require the use of the
35 | * microcontroller's timers or other hardware, leaving more hardware to the application developer.
36 | *
37 | * Accompanying LUFA in the download package is a set of example demo applications, plus several Bootloaders of different classes
38 | * and open source LUFA powered projects.
39 | *
40 | * Subsections:
41 | * \li \subpage Page_WhyUseLUFA - What are the advantages of using LUFA?
42 | * \li \subpage Page_LUFAvsAtmelStack - How does LUFA compare to the Atmel USB AVR stack?
43 | * \li \subpage Page_AlternativeStacks - Alternative USB AVR Stacks
44 | * \li \subpage Page_LicenseInfo - Project source license and commercial use information
45 | * \li \subpage Page_Donating - Donating to support this project
46 | * \li \subpage Page_LibraryApps - Overview of included Demos, Bootloaders and Projects
47 | */
48 |
49 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/ProgrammingApps.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \page Page_ProgrammingApps Programming an Application into a USB AVR
8 | *
9 | * Once you have built an application, you will need a way to program in the resulting ".HEX" file (and, if your
10 | * application uses EEPROM variables with initial values, also a ".EEP" file) into your USB AVR. Normally, the
11 | * reprogramming of an AVR device must be performed using a special piece of programming hardware, through one of the
12 | * supported AVR programming protocols - ISP, HVSP, HVPP, JTAG or dW. This can be done through a custom programmer,
13 | * a third party programmer, or an official Atmel AVR tool - for more information, see the Atmel.com website.
14 | *
15 | * Alternatively, you can use the bootloader. From the Atmel factory, each USB AVR comes preloaded with the Atmel
16 | * DFU (Device Firmware Update) class bootloader, a small piece of AVR firmware which allows the remainder of the
17 | * AVR to be programmed through a non-standard interface such as the serial USART port, SPI, or (in this case) USB.
18 | * Bootloaders have the advantage of not requiring any special hardware for programming, and cannot usually be erased
19 | * or broken without an external programming device. They have disadvantages however; they cannot change the fuses of
20 | * the AVR (special configuration settings that control the operation of the chip itself) and a small portion of the
21 | * AVR's FLASH program memory must be reserved to contain the bootloader firmware, and thus cannot be used by the
22 | * loaded application. Atmel's DFU bootloader is either 4KB (for the smaller USB AVRs) or 8KB (for the larger USB AVRs).
23 | *
24 | * If you wish to use the DFU bootloader to program in your application, refer to your DFU programmer's documentation.
25 | * Atmel provides a free utility called FLIP which is USB AVR compatible, and an open source (Linux compatible)
26 | * alternative exists called "dfu-programmer".
27 | */
28 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/SoftwareBootloaderJump.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_SoftwareBootloaderStart Entering the Bootloader via Software
9 | *
10 | * A common requirement of many applications is the ability to jump to the programmed bootloader of a chip
11 | * on demand, via the code's firmware (i.e. not as a result of any physical user interaction with the
12 | * hardware). This might be required because the device does not have any physical user input, or simply
13 | * just to streamline the device upgrade process on the host PC.
14 | *
15 | * The following C code snippets may be used to enter the bootloader upon request by the user application.
16 | * By using the watchdog to physically reset the controller, it is ensured that all system hardware is
17 | * completely reset to their defaults before the bootloader is run. This is important; since bootloaders
18 | * are written to occupy a very limited space, they usually make assumptions about the register states based
19 | * on the default values after a hard-reset of the chip.
20 | *
21 | * \section Sec_SoftareBootAVR8 AVR8 Architecture
22 | * The following software bootloader jump code is written for the AVR8 architecture.
23 | *
24 | * \code
25 | * #include
26 | * #include
27 | * #include
28 | *
29 | * #include
30 | * #include
31 | *
32 | * uint32_t Boot_Key ATTR_NO_INIT;
33 | *
34 | * #define MAGIC_BOOT_KEY 0xDC42ACCA
35 | * #define BOOTLOADER_START_ADDRESS (FLASH_SIZE_BYTES - BOOTLOADER_SEC_SIZE_BYTES)
36 | *
37 | * void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3);
38 | * void Bootloader_Jump_Check(void)
39 | * {
40 | * // If the reset source was the bootloader and the key is correct, clear it and jump to the bootloader
41 | * if ((MCUSR & (1 << WDRF)) && (Boot_Key == MAGIC_BOOT_KEY))
42 | * {
43 | * Boot_Key = 0;
44 | * ((void (*)(void))BOOTLOADER_START_ADDRESS)();
45 | * }
46 | * }
47 | *
48 | * void Jump_To_Bootloader(void)
49 | * {
50 | * // If USB is used, detach from the bus and reset it
51 | * USB_Disable();
52 | *
53 | * // Disable all interrupts
54 | * cli();
55 | *
56 | * // Wait two seconds for the USB detachment to register on the host
57 | * Delay_MS(2000);
58 | *
59 | * // Set the bootloader key to the magic value and force a reset
60 | * Boot_Key = MAGIC_BOOT_KEY;
61 | * wdt_enable(WDTO_250MS);
62 | * for (;;);
63 | * }
64 | * \endcode
65 | *
66 | * Note that the bootloader magic key can be any arbitrary value. The FLASH_SIZE_BYTES and
67 | * BOOTLOADER_SEC_SIZE_BYTES tokens should be replaced with the total flash size of the AVR
68 | * in bytes, and the allocated size of the bootloader section for the target AVR.
69 | *
70 | */
71 |
72 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/WhyUseLUFA.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /**
8 | * \page Page_WhyUseLUFA Why Use LUFA?
9 | *
10 | * The LUFA Library has many advantages over implementing the code required to drive the USB AVRs directly.
11 | * It is much more preferable to incorporate LUFA into your existing projects - or even make a new project
12 | * using LUFA - than it is to start from scratch and use the USB AVR registers directly. Some of these reasons
13 | * are:
14 | *
15 | * - Portability:
16 | * The LUFA stack is designed to run (at some capacity) on the entire Atmel range of USB AVRs, regardless of the
17 | * exact USB controller revision used. If you decide to implement your own USB stack, you will either need to
18 | * code around the differences between each USB AVR controller's implementation between different chip models, or
19 | * require your code to run on only one specific USB AVR model series.
20 | *
21 | * - Speed of Development:
22 | * LUFA ships with a wide range of pre-made demos, bootloaders and projects for you to try, learn and extend. Each
23 | * of these demos are tested (where possible) across as many USB AVRs and Operating Systems as possible, to ensure
24 | * that they work under as many conditions as possible. In addition, there are inbuilt class drivers for several of
25 | * the USB classes which you can make use of in your projects with minimal effort.
26 | *
27 | * - Maintainability:
28 | * As LUFA takes care of much of the USB implementation, you can be left to focusing on your actual project's
29 | * functionality, rather than being held back developing and debugging the USB stack code. Since LUFA uses clear APIs
30 | * for USB development, your code will be more readable than if it had the low level USB stack code integrated into
31 | * it directly. Updating the LUFA library is a simple folder-replacement and gives new features and bug fixes in
32 | * seconds each time a new release is made.
33 | *
34 | * - Size:
35 | * Not just requiring less code to make complex USB devices, LUFA is written to compile down as much as possible into
36 | * optimal code, to occupy only a small space for its feature set.
37 | *
38 | * - Support:
39 | * Since many people are now using LUFA in their own projects, you can take advantage of other's knowledge when you run
40 | * into difficulties or need some advice. In addition, you can also email the library author to receive personalized
41 | * support when you need it (subject to author's schedule).
42 | */
43 |
44 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/WritingBoardDrivers.txt:
--------------------------------------------------------------------------------
1 | /** \file
2 | *
3 | * This file contains special DoxyGen information for the generation of the main page and other special
4 | * documentation pages. It is not a project source file.
5 | */
6 |
7 | /** \page Page_WritingBoardDrivers Writing LUFA Board Drivers
8 | *
9 | * LUFA ships with several basic pre-made board drivers, to control hardware present on the supported board
10 | * hardware - such as Dataflash ICs, LEDs, Joysticks, or other hardware peripherals. When compiling an application
11 | * which makes use of one or more board drivers located in LUFA/Drivers/Board, you must also indicate what board
12 | * hardware you are using in your project makefile. This is done by defining the BOARD macro using the -D switch
13 | * passed to the compiler, with a constant of BOARD_{Name}. For example -DBOARD=BOARD_USBKEY instructs the
14 | * compiler to use the USBKEY board hardware drivers.
15 | *
16 | * If your application does not use *any* board level drivers, you can omit the definition of the BOARD macro.
17 | * However, some users may wish to write their own custom board hardware drivers which are to remain compatible
18 | * with the LUFA hardware API. To do this, the BOARD macro should be defined to the value BOARD_USER. This indicates
19 | * that the board level drivers should be located in a folder named "Board" located inside the application's folder.
20 | *
21 | * When used, the driver stub files located in the LUFA/CodeTemplates/DriverStubs folder should be copied to the user
22 | * Board/ directory, and fleshed out to include the values and code needed to control the custom board hardware. Once
23 | * done, the existing LUFA board level APIs (accessed in the regular LUFA/Drivers/Board/ folder) will redirect to the
24 | * user board drivers, maintaining code compatibility and allowing for a different board to be selected through the
25 | * project makefile with no code changes.
26 | */
27 |
28 |
--------------------------------------------------------------------------------
/hal/at90usb646/LUFA/DoxygenPages/footer.htm:
--------------------------------------------------------------------------------
1 |