Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cproject175
-rw-r--r--.settings/language.settings.xml34
-rw-r--r--src/Alligator/DAC/DAC084S085.cpp72
-rw-r--r--src/Alligator/DAC/DAC084S085.h35
-rw-r--r--src/Alligator/EUI48/EUI48EEPROM.cpp66
-rw-r--r--src/Alligator/EUI48/EUI48EEPROM.h41
-rw-r--r--src/Alligator/Microstepping.cpp58
-rw-r--r--src/Alligator/Microstepping.h28
-rw-r--r--src/Alligator/Pins_Alligator.h180
9 files changed, 672 insertions, 17 deletions
diff --git a/.cproject b/.cproject
index e2c71f28..8ff2faa3 100644
--- a/.cproject
+++ b/.cproject
@@ -113,7 +113,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Duet/Lwip/lwip/src/core/ipv6|src/RADDS|src/Duet/Lwip/lwip/test|src/DuetNG" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Alligator|src/Duet/Lwip/lwip/src/core/ipv6|src/RADDS|src/Duet/Lwip/lwip/test|src/DuetNG" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -236,7 +236,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/RADDS|src/DuetNG/DuetEthernet|src/Duet" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Alligator|src/RADDS|src/DuetNG/DuetEthernet|src/Duet" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -261,8 +261,8 @@
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289" name="RADDS" parent="cdt.managedbuild.config.gnu.cross.exe.release" postannouncebuildStep="Generating binary file" postbuildStep="arm-none-eabi-objcopy -O binary ${workspace_loc:/${ProjName}/${ConfigName}}/${ProjName}.elf ${workspace_loc:/${ProjName}/${ConfigName}}/${ProjName}.bin">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.1973208555" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
- <option id="cdt.managedbuild.option.gnu.cross.path.2092504710" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="C:\Arduino-1.5.8\hardware\tools\gcc-arm-none-eabi-4.8.3-2014q1\bin" valueType="string"/>
- <option id="cdt.managedbuild.option.gnu.cross.prefix.1606498191" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-eabi-" valueType="string"/>
+ <option id="cdt.managedbuild.option.gnu.cross.path.2092504710" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false" value="C:\Arduino-1.5.8\hardware\tools\gcc-arm-none-eabi-4.8.3-2014q1\bin" valueType="string"/>
+ <option id="cdt.managedbuild.option.gnu.cross.prefix.1606498191" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.342355349" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/RepRapFirmware}/Release" id="cdt.managedbuild.builder.gnu.cross.1336978387" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.863511428" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
@@ -299,14 +299,14 @@
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1692168928" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1755453550" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${LINK_FLAGS_1} &quot;${workspace_loc:/${CoreName}/RADDS/cores/arduino/syscalls.o}&quot; ${INPUTS} ${LINK_FLAGS_2}" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1176271302" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
- <option id="gnu.cpp.link.option.nostdlibs.706270025" name="No startup or default libs (-nostdlib)" superClass="gnu.cpp.link.option.nostdlibs" value="false" valueType="boolean"/>
- <option id="gnu.cpp.link.option.paths.1160723414" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+ <option id="gnu.cpp.link.option.nostdlibs.706270025" name="No startup or default libs (-nostdlib)" superClass="gnu.cpp.link.option.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.cpp.link.option.paths.1160723414" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/RADDS/}&quot;"/>
</option>
- <option id="gnu.cpp.link.option.libs.1006761104" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
+ <option id="gnu.cpp.link.option.libs.1006761104" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="${CoreName}"/>
</option>
- <option id="gnu.cpp.link.option.flags.827167716" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m3 -T${workspace_loc:/${CoreName}/variants/RADDS/linker_scripts/gcc/flash.ld} -Wl,-Map,${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.map" valueType="string"/>
+ <option id="gnu.cpp.link.option.flags.827167716" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m3 -T${workspace_loc:/${CoreName}/variants/RADDS/linker_scripts/gcc/flash.ld} -Wl,-Map,${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.map" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.99895855" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
@@ -351,7 +351,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Webserver|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/DuetNG|src/Duet" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Alligator|src/Webserver|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/DuetNG|src/Duet" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -495,7 +495,133 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/DuetNG/DuetEthernet/Wiznet/Internet/FTPServer|src/DuetNG/DuetEthernet/Wiznet/Internet/DNS|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPClient|src/DuetNG/DuetEthernet/Wiznet/Internet/MQTT|src/DuetNG/DuetEthernet/Wiznet/Internet/SNMP|src/DuetNG/DuetEthernet/Wiznet/Internet/SNTP|src/DuetNG/DuetEthernet/Wiznet/Internet/TFTP|src/DuetNG/DuetEthernet/Wiznet/Internet/httpServer|src/DuetNG/DuetEthernet/Wiznet/Application|src/DuetNG/DuetEthernet/Ethernet3|src/DuetNG/DuetEthernet/Ethernet3/examples|src/RADDS|src/DuetNG/DuetWiFi|src/Duet" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Alligator|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPServer|src/DuetNG/DuetEthernet/Wiznet/Internet/DNS|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPClient|src/DuetNG/DuetEthernet/Wiznet/Internet/MQTT|src/DuetNG/DuetEthernet/Wiznet/Internet/SNMP|src/DuetNG/DuetEthernet/Wiznet/Internet/SNTP|src/DuetNG/DuetEthernet/Wiznet/Internet/TFTP|src/DuetNG/DuetEthernet/Wiznet/Internet/httpServer|src/DuetNG/DuetEthernet/Wiznet/Application|src/DuetNG/DuetEthernet/Ethernet3|src/DuetNG/DuetEthernet/Ethernet3/examples|src/RADDS|src/DuetNG/DuetWiFi|src/Duet" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887" moduleId="org.eclipse.cdt.core.settings" name="Alligator">
+ <macros>
+ <stringMacro name="CoreName" type="VALUE_TEXT" value="CoreNG"/>
+ </macros>
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="elf" artifactName="${ProjName}-Alligator" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887" name="Alligator" parent="cdt.managedbuild.config.gnu.cross.exe.release" postannouncebuildStep="Generating binary file" postbuildStep="arm-none-eabi-objcopy -O binary ${workspace_loc:/${ProjName}/${ConfigName}}/${ProjName}-Alligator.elf ${workspace_loc:/${ProjName}/${ConfigName}}/${ProjName}-Alligator.bin">
+ <folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.623324432" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
+ <option id="cdt.managedbuild.option.gnu.cross.path.645044151" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false" value="/Users/marcoantonini/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin" valueType="string"/>
+ <option id="cdt.managedbuild.option.gnu.cross.prefix.629438941" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.878309876" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+ <builder buildPath="${workspace_loc:/RepRapFirmware}/Release" id="cdt.managedbuild.builder.gnu.cross.56178753" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
+ <tool id="cdt.managedbuild.tool.gnu.cross.assembler.384615201" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1769413014" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cross.c.compiler.429394189" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1940178744" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.c.optimization.level.more" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.debugging.level.1345702698" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.misc.verbose.1965295612" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.c.compiler.option.misc.other.2089676962" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -std=gnu99 -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -nostdlib &quot;-Wa,-ahl=$*.s&quot;" valueType="string"/>
+ <option id="gnu.c.compiler.option.include.paths.1071791609" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/cores/arduino}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Storage}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/emac}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/hsmci}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/rstc}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/rtc}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/cmsis/sam3x/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/header_files}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/preprocessor}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/thirdparty/CMSIS/Include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/variants/alligator}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Duet/Lwip}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Duet/Lwip/lwip/src/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Duet/EMAC}&quot;"/>
+ </option>
+ <option id="gnu.c.compiler.option.preprocessor.def.symbols.680004295" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="__SAM3X8E__"/>
+ <listOptionValue builtIn="false" value="__ALLIGATOR__"/>
+ <listOptionValue builtIn="false" value="printf=iprintf"/>
+ </option>
+ <option id="gnu.c.compiler.option.dialect.std.1020546177" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.files.1091766282" name="Include files (-include)" superClass="gnu.c.compiler.option.include.files" useByScannerDiscovery="false" valueType="includeFiles"/>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1737201945" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1510685625" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
+ <tool id="cdt.managedbuild.tool.gnu.cross.archiver.2031955379" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+ <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${LINK_FLAGS_1} &quot;${workspace_loc:/${CoreName}/SAM3X8E/cores/arduino/syscalls.o}&quot; ${INPUTS} ${LINK_FLAGS_2}" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1616069436" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
+ <option id="gnu.cpp.link.option.nostdlibs.760089516" name="No startup or default libs (-nostdlib)" superClass="gnu.cpp.link.option.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.cpp.link.option.paths.1593340130" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/Alligator/}&quot;"/>
+ </option>
+ <option id="gnu.cpp.link.option.libs.1260510068" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
+ <listOptionValue builtIn="false" value="${CoreName}"/>
+ </option>
+ <option id="gnu.cpp.link.option.flags.1376831701" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m3 -T${workspace_loc:/${CoreName}/variants/alligator/linker_scripts/gcc/flash.ld} -Wl,-Map,${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.map" valueType="string"/>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1951368129" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="g++" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1533537470" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
+ <option id="gnu.cpp.compiler.option.optimization.level.1431609218" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.more" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.debugging.level.1167774913" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.other.verbose.68487747" name="Verbose (-v)" superClass="gnu.cpp.compiler.option.other.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.cpp.compiler.option.other.other.1532821901" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -std=gnu++11 -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib &quot;-Wa,-ahl=$*.s&quot;" valueType="string"/>
+ <option id="gnu.cpp.compiler.option.include.paths.1825159078" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/cores/arduino}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Flash}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/SharedSpi}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Storage}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Wire}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/services/clock}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/efc}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/emac}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/pmc}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/spi}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers/twi}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/services/flash_efc}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/cmsis/sam3x/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/header_files}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/preprocessor}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/thirdparty/CMSIS/Include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/variants/alligator}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Alligator}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Duet}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Duet/Lwip}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Duet/EMAC}&quot;"/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.890621467" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="__SAM3X8E__"/>
+ <listOptionValue builtIn="false" value="__ALLIGATOR__"/>
+ <listOptionValue builtIn="false" value="printf=iprintf"/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.undef.913409309" name="Undefined symbols (-U)" superClass="gnu.cpp.compiler.option.preprocessor.undef" useByScannerDiscovery="false" valueType="undefDefinedSymbols"/>
+ <option id="gnu.cpp.compiler.option.dialect.std.603621474" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.include.files.1575937801" name="Include files (-include)" superClass="gnu.cpp.compiler.option.include.files" useByScannerDiscovery="false" valueType="includeFiles"/>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.667323948" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="src/Duet/MCP4461|src/Alligator/Lwip/lwip/src/core/ipv6|src/Alligator/Lwip/lwip/src/include/ipv6|src/Alligator/Lwip/lwip/test|src/Duet/Lwip/lwip/src/core/ipv6|src/RADDS|src/Duet/Lwip/lwip/test|src/DuetNG" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -507,20 +633,47 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Alligator">
+ <resource resourceType="PROJECT" workspacePath="/RepRapFirmware"/>
+ </configuration>
<configuration configurationName="DuetEthernet"/>
<configuration configurationName="RADDS"/>
<configuration configurationName="DuetWiFi"/>
<configuration configurationName="Duet085"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+ <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.1275216290;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.1275216290.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1806370384;cdt.managedbuild.tool.gnu.cpp.compiler.input.2135034744">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.1275216290;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.1275216290.;cdt.managedbuild.tool.gnu.cross.c.compiler.1431507147;cdt.managedbuild.tool.gnu.c.compiler.input.786131774">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201;cdt.managedbuild.config.gnu.cross.exe.release.516195201.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1703390221;cdt.managedbuild.tool.gnu.cpp.compiler.input.111814721">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.2077096750;cdt.managedbuild.tool.gnu.cpp.compiler.input.1578939493">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887.;cdt.managedbuild.tool.gnu.cross.c.compiler.429394189;cdt.managedbuild.tool.gnu.c.compiler.input.1737201945">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201;cdt.managedbuild.config.gnu.cross.exe.release.516195201.;cdt.managedbuild.tool.gnu.cross.c.compiler.220085372;cdt.managedbuild.tool.gnu.c.compiler.input.1345445195">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289.;cdt.managedbuild.tool.gnu.cross.c.compiler.764246283;cdt.managedbuild.tool.gnu.c.compiler.input.110609707">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1533537470;cdt.managedbuild.tool.gnu.cpp.compiler.input.667323948">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1261470824;cdt.managedbuild.tool.gnu.cpp.compiler.input.948285998">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850;cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.;cdt.managedbuild.tool.gnu.cross.c.compiler.278237460;cdt.managedbuild.tool.gnu.c.compiler.input.1642892736">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 4530d927..70674390 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -1,33 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
- <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850" name="SAM3X_CoreNG">
+ <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850" name="Duet085">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-303428918971435778" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="785353586651" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
- <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451" name="SAM4E_CoreNG">
+ <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451" name="DuetWiFi">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-303428918971435778" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="785353586651" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
- <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.286403080" name="SAM4E_PROTO1">
+ <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1027429289" name="RADDS">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-303428918971435778" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="785353586651" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <language-scope id="org.eclipse.cdt.core.gcc"/>
+ <language-scope id="org.eclipse.cdt.core.g++"/>
+ </provider>
+ </extension>
+ </configuration>
+ <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.1275216290" name="DuetEthernet">
+ <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
+ <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
+ <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="785353586651" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <language-scope id="org.eclipse.cdt.core.gcc"/>
+ <language-scope id="org.eclipse.cdt.core.g++"/>
+ </provider>
+ </extension>
+ </configuration>
+ <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.1745168887" name="Alligator">
+ <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
+ <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
+ <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-304732438711739086" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
diff --git a/src/Alligator/DAC/DAC084S085.cpp b/src/Alligator/DAC/DAC084S085.cpp
new file mode 100644
index 00000000..aab0dea1
--- /dev/null
+++ b/src/Alligator/DAC/DAC084S085.cpp
@@ -0,0 +1,72 @@
+/*
+ * Texas Instruments SPI DAC084S085
+ *
+ * Created on: 14 May 2017
+ * Author: Marco Antonini
+ */
+
+#include "DAC084S085.h"
+
+//***************************************************************************************************
+// Texas Instruments SPI DAC084S085 class
+
+DAC084S085::DAC084S085()
+{
+ initialized = false;
+}
+
+void DAC084S085::Init(uint8_t cs)
+{
+ if( cs != 0xFF && cs > 0 && !initialized)
+ {
+ pinMode(cs,OUTPUT_HIGH);
+ device.csPin = cs; // chip select pin
+ device.spiMode = SPI_MODE_1; // CPHA Clock phase
+ device.clockFrequency = DAC084S085_MAX_FREQ; // setup Clock Freq
+ sspi_master_init(&device, 8);
+ initialized = true;
+ }
+}
+
+void DAC084S085::setChannel(uint8_t channel, unsigned short value)
+{
+ if(initialized)
+ {
+ uint8_t dacBuff[2] = { 0x10, 0x00 };
+
+ // Do not exceed the maximum value
+ if(value > 255) // Dac is 8 bit
+ {
+ value=255;
+ }
+ if(channel < 0) // Channel is [0-3]
+ {
+ channel = 0;
+ }
+ else if(channel > 3) // Channel is [0-3]
+ {
+ channel = 3;
+ }
+
+ dacBuff[1] |= (value << 4);
+ sspi_master_setup_device(&device);
+
+ // Select this DAC device
+ sspi_select_device(&device);
+ delayMicroseconds(1);
+
+ dacBuff[0] |= ( channel << 6);
+ dacBuff[0] |= (value >> 4);
+
+ // Write register and update the DAC output
+ sspi_write_packet(dacBuff, 2);
+
+ // Deselect this DAC device
+ delayMicroseconds(1);
+ sspi_deselect_device(&device);
+ delayMicroseconds(1);
+ }
+}
+
+
+// End
diff --git a/src/Alligator/DAC/DAC084S085.h b/src/Alligator/DAC/DAC084S085.h
new file mode 100644
index 00000000..0ead020e
--- /dev/null
+++ b/src/Alligator/DAC/DAC084S085.h
@@ -0,0 +1,35 @@
+/*
+ * Texas Instruments SPI DAC084S085
+ *
+ * Created on: 14 May 2017
+ * Author: Marco Antonini
+ */
+
+#ifndef DAC084S085_H_
+#define DAC084S085_H_
+
+#include <inttypes.h>
+#include "Core.h"
+#include "SharedSpi.h"
+
+// 10.0 MHz standard clock frequency for DAC084S085
+#define DAC084S085_MAX_FREQ 10000000u
+
+
+class DAC084S085{
+
+public:
+
+ DAC084S085();
+
+ void Init(uint8_t cs);
+ void setChannel(uint8_t channel, unsigned short value);
+
+private:
+
+ bool initialized;
+ struct sspi_device device; // Alligator onboard DAC
+};
+
+
+#endif /* DAC084S_ */
diff --git a/src/Alligator/EUI48/EUI48EEPROM.cpp b/src/Alligator/EUI48/EUI48EEPROM.cpp
new file mode 100644
index 00000000..c4e8788f
--- /dev/null
+++ b/src/Alligator/EUI48/EUI48EEPROM.cpp
@@ -0,0 +1,66 @@
+/*
+ * SPI Microchip 25AA02E48 EUI48 Eeeprom
+ *
+ * Created on: 14 May 2017
+ * Author: Marco Antonini
+ */
+
+#include "EUI48EEPROM.h"
+
+//***************************************************************************************************
+// SPI Microchip 25AA02E48 EUI48EEPROM class
+
+EUI48EEPROM::EUI48EEPROM()
+{
+ initialized = false;
+}
+
+void EUI48EEPROM::Init(uint8_t cs)
+{
+ if( cs != 0xFF && cs > 0 && !initialized)
+ {
+ pinMode(cs,OUTPUT_HIGH);
+ device.csPin = cs; // chip select pin
+ device.spiMode = SPI_MODE_1; // CPHA Clock phase
+ device.clockFrequency = EUI48EEPROM_MAX_FREQ; // setup Clock Freq
+ sspi_master_init(&device, 8);
+ initialized = true;
+ }
+}
+
+bool EUI48EEPROM::getEUI48(uint8_t *EUI48buff)
+{
+ bool ret = false;
+ if( initialized )
+ {
+ uint8_t instBuff[2] = { READ_INSTRUCTION, EUI48_START_ADDRESS };
+
+ // Select this device
+ sspi_select_device(&device);
+ delayMicroseconds(1);
+
+ // Send EEPROM address and read the EUI48
+ sspi_write_packet(instBuff, 2);
+ delayMicroseconds(1);
+ sspi_read_packet(EUI48buff, 6);
+
+ // Deselect this device
+ delayMicroseconds(1);
+ sspi_deselect_device(&device);
+ delayMicroseconds(1);
+
+ //Check if the first 3 byte are Microchip OUIs
+ if ( (EUI48buff[0] == 0x00 || EUI48buff[0] == 0xD8) &&
+ (EUI48buff[1] == 0x04 || EUI48buff[1] == 0x1E || EUI48buff[1] == 0x80 ) &&
+ (EUI48buff[2] == 0xA3 || EUI48buff[2] == 0xC0 || EUI48buff[2] == 0x39 ) )
+ {
+ ret=true;
+ }
+ else
+ {
+ ret=false;
+ }
+ }
+ return ret;
+}
+// End
diff --git a/src/Alligator/EUI48/EUI48EEPROM.h b/src/Alligator/EUI48/EUI48EEPROM.h
new file mode 100644
index 00000000..ee3d91b6
--- /dev/null
+++ b/src/Alligator/EUI48/EUI48EEPROM.h
@@ -0,0 +1,41 @@
+/*
+ * SPI Microchip 25AA02E48 EUI48 EEPROM
+ *
+ * Created on: 14 May 2017
+ * Author: Marco Antonini
+ */
+
+#ifndef EUI48EEPROM_H_
+#define EUI48EEPROM_H_
+
+#include <inttypes.h>
+#include "Core.h"
+#include "SharedSpi.h"
+
+
+// 2.0 MHz standard clock frequency for Microchip 25AA02E48 @ 3.3V
+#define EUI48EEPROM_MAX_FREQ 2000000u
+
+// Microchip 25AA02E48 Addresses
+#define READ_INSTRUCTION 0b00000011
+#define WRITE_INSTRUCTION 0b00000010
+#define READ_STATUS_INSTRUCTION 0b00000101
+#define WRITE_STATUS_INSTRUCTION 0b00000001
+#define EUI48_START_ADDRESS 0xFA
+
+class EUI48EEPROM{
+
+public:
+
+ EUI48EEPROM();
+ void Init(uint8_t cs);
+ bool getEUI48(uint8_t *buffer);
+
+private:
+
+ bool initialized;
+ struct sspi_device device;
+
+};
+
+#endif /* EUI48EEPROM_ */
diff --git a/src/Alligator/Microstepping.cpp b/src/Alligator/Microstepping.cpp
new file mode 100644
index 00000000..baf62efc
--- /dev/null
+++ b/src/Alligator/Microstepping.cpp
@@ -0,0 +1,58 @@
+/*
+ * Alligator Microstepping Settings
+ *
+ * Created on: 15 May 2017
+ * Author: Marco Antonini
+ */
+
+#include "Microstepping.h"
+
+
+//***************************************************************************************************
+// Alligator Microstepping static class
+
+uint8_t microsteppingPins[ DRIVES - MinAxes ];
+
+void Microstepping::Init() {
+
+
+ static_assert(sizeof(microsteppingPins) == sizeof(MICROSTEPPING_PINS), "Incompatible array types");
+ memcpy(microsteppingPins, MICROSTEPPING_PINS, sizeof(MICROSTEPPING_PINS));
+
+ for(uint8_t pin=0; pin < (DRIVES-MinAxes); pin++ ) {
+ pinMode( microsteppingPins[pin], OUTPUT_HIGH);
+ }
+}
+
+bool Microstepping::Set(uint8_t drive, uint8_t value) {
+
+ // Do not exceed the maximum value
+ if ( drive >= (DRIVES - MinAxes) )
+ {
+ return false;
+ }
+ if ( value != 16 && value != 32 )
+ {
+ return false;
+ }
+
+ // Write Value and check status
+ digitalWrite( microsteppingPins[drive], value == 16 ? LOW : HIGH );
+
+ return true;
+}
+
+uint8_t Microstepping::Read( uint8_t drive ) {
+
+ // Do not exceed the maximum value
+ if ( drive < (DRIVES - MinAxes) )
+ {
+ return ( digitalRead(microsteppingPins[drive]) == LOW ? 16 : 32 );
+ }
+ else
+ {
+ return 16;
+ }
+}
+
+// End
diff --git a/src/Alligator/Microstepping.h b/src/Alligator/Microstepping.h
new file mode 100644
index 00000000..58ff734a
--- /dev/null
+++ b/src/Alligator/Microstepping.h
@@ -0,0 +1,28 @@
+/*
+ * Alligator Microstepping Settings
+ *
+ * Created on: 15 May 2017
+ * Author: Marco Antonini
+ */
+
+#ifndef ALLIGATOR_MICROSTEPPING_H_
+#define ALLIGATOR_MICROSTEPPING_H_
+
+#include <inttypes.h>
+#include "Core.h"
+#include "Pins_Alligator.h"
+
+class Microstepping {
+
+ public:
+
+ static void Init();
+ static bool Set(uint8_t drive, uint8_t value);
+ static uint8_t Read( uint8_t drive );
+
+ private:
+
+ Microstepping() { };
+
+};
+#endif /* ALLIGATOR_MICROSTEPPING_H_ */
diff --git a/src/Alligator/Pins_Alligator.h b/src/Alligator/Pins_Alligator.h
new file mode 100644
index 00000000..38e613dc
--- /dev/null
+++ b/src/Alligator/Pins_Alligator.h
@@ -0,0 +1,180 @@
+#ifndef PINS_DUET_H__
+#define PINS_DUET_H__
+
+#define FIRMWARE_NAME "RepRapFirmware for Alligator"
+
+const size_t NumFirmwareUpdateModules = 1;
+#define IAP_UPDATE_FILE "iapalligator.bin"
+#define IAP_FIRMWARE_FILE "RepRapFirmware-Alligator.bin"
+
+// Default board type
+#define DEFAULT_BOARD_TYPE BoardType::Alligator_2
+
+#define SUPPORT_INKJET 0 // set nonzero to support inkjet control
+#define SUPPORT_SCANNER 0 // set nonzero to support FreeLSS scanners
+
+// The physical capabilities of the machine
+
+// Alligator + Piggy module max 7 stepper driver
+const size_t DRIVES = 7; // The number of drives in the machine, including X, Y, and Z plus extruder drives
+#define DRIVES_(a,b,c,d,e,f,g,h,i,j,k,l) { a,b,c,d,e,f,g }
+const size_t MaxDriversPerAxis = 4; // The maximum number of stepper drivers assigned to one axis
+// Initialization macro used in statements needing to initialize values in arrays of size MAX_AXES
+#define AXES_(a,b,c,d,e,f,g,h,i) { a,b,c,d,e,f }
+
+// Alligator + Piggy module max 5 heaters
+const int8_t Heaters = 5; // The number of heaters in the machine; 0 is the heated bed even if there isn't one
+#define HEATERS_(a,b,c,d,e,f,g,h) { a,b,c,d,e }
+
+const size_t MaxAxes = 7; // The maximum number of movement axes in the machine, usually just X, Y and Z, <= DRIVES
+const size_t MinAxes = 3; // The minimum and default number of axes
+const size_t MaxExtruders = DRIVES - MinAxes; // The maximum number of extruders
+
+const size_t NUM_SERIAL_CHANNELS = 3; // The number of serial IO channels (USB and two auxiliary UARTs)
+#define SERIAL_MAIN_DEVICE SerialUSB
+#define SERIAL_AUX_DEVICE Serial
+#define SERIAL_AUX2_DEVICE Serial1
+
+// The numbers of entries in each array must correspond with the values of DRIVES, AXES, or HEATERS. Set values to -1 to flag unavailability.
+// DRIVES
+const Pin ENABLE_PINS[DRIVES] = { 24, NoPin, NoPin, NoPin, NoPin, NoPin, NoPin };
+const Pin STEP_PINS[DRIVES] = { X16, X14, X1, 5, 28, 11, X9 };
+const Pin DIRECTION_PINS[DRIVES] = { 2, 78, X13, 4, 27, 29, 12};
+
+// MICROSTEPPING Pins
+const Pin MICROSTEPPING_PINS[DRIVES - MinAxes] = { X12, X10, 44, 45 };
+
+// Motor FAULT Pin
+const Pin MotorFaultDetectPin = 22;
+
+// Endstops
+// RepRapFirmware only has a single endstop per axis.
+// Gcode defines if it is a max ("high end") or min ("low end") endstop and sets if it is active HIGH or LOW.
+// Alligator End-stop pinout mapping for RepRapFirmware:
+// 5V SIGN SIGN GND , 5V SIGN SIGN GND, 5V SIGN SIGN GND
+// X E0 Y E1 Z E2-Zprobe
+const Pin END_STOP_PINS[DRIVES] = { 33, 35, 38, 34, 37, 39 ,NoPin };
+
+// SPI DAC Motor for Current Vref
+const size_t MaxSpiDac = 2;
+const Pin SPI_DAC_CS[MaxSpiDac] = { 53, 6 };
+
+// HEATERS
+const bool HEAT_ON = true; // Not inverted heater for Alligator
+const Pin TEMP_SENSE_PINS[Heaters] = HEATERS_(1, 0, 2, 3, 4, f, g, h); // Analogue pin numbers
+
+// h1,h2,h3,h4: X2,8,9,X8 is hardware PWM
+// b: X3 is not hardware PWM
+const Pin HEAT_ON_PINS[Heaters] = HEATERS_(X3, X2, 8, 9, X8, f, g, h); // b,h1,h2,h3,h4
+
+
+// Default thermistor parameters
+// Bed thermistor: http://uk.farnell.com/epcos/b57863s103f040/sensor-miniature-ntc-10k/dp/1299930?Ntt=129-9930
+// Hot end thermistor: http://www.digikey.co.uk/product-search/en?x=20&y=11&KeyWords=480-3137-ND
+const float BED_R25 = 10000.0;
+const float BED_BETA = 3988.0;
+const float BED_SHC = 0.0;
+const float EXT_R25 = 100000.0;
+const float EXT_BETA = 4388.0;
+const float EXT_SHC = 0.0;
+
+// Thermistor series resistor value in Ohms
+// On Alligator board it is selectable via dip-switch 4700 ohms or 1000 ohms.
+// Default value is 4700, If your dip-switch has been moved to 1000 set it wit M305 command
+const float THERMISTOR_SERIES_RS = 4700.0;
+
+// Number of SPI temperature sensors to support
+const size_t MaxSpiTempSensors = 1;
+
+// Digital pins the 31855s have their select lines tied to
+const Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { NoPin };
+
+
+// Arduino Due pin number that controls the ATX power on/off
+const Pin ATX_POWER_PIN = NoPin; // Arduino Due pin number that controls the ATX power on/off
+
+// Z probe
+const Pin Z_PROBE_PIN = 39; // Z min pin ,Last signal of the end-stop connectors
+
+// Digital pin number to turn the IR LED on (high) or off (low)
+const Pin Z_PROBE_MOD_PIN = NoPin; // Digital pin number to turn the IR LED on (high) or off (low) on Duet v0.6 and v1.0 (PB21)
+const Pin Z_PROBE_MOD_PIN07 = NoPin; // Digital pin number to turn the IR LED on (high) or off (low) on Duet v0.7 and v0.8.5 (PC10)
+
+// Pin number that the DAC that controls the second extruder motor current on the Duet 0.8.5 is connected to
+const int Dac0DigitalPin = NoPin; // Arduino Due pin number corresponding to DAC0 output pin
+
+// COOLING FANS
+const size_t NUM_FANS = 4;
+// Fan1: X0 PA5 is in A peripheral is in TIOA2 TC A channel, it get hardware PWM
+// Fan2: 31 is not hardware PWM
+// J5 pin1 black connector ha hardware PWM, attached to FANS
+const Pin COOLING_FAN_PINS[NUM_FANS] = { X0, 31, X17};
+const Pin COOLING_FAN_RPM_PIN = NoPin; // Pin PA15
+
+// SD cards
+const size_t NumSdCards = 1;
+const Pin SdCardDetectPins[NumSdCards] = { 87 };
+const Pin SdWriteProtectPins[NumSdCards] = { NoPin };
+const Pin SdSpiCSPins[NumSdCards] = { 77 };
+
+// SPI EUI48 Mac Address CS Pin
+const Pin Eui48csPin = 26; // Chip select Eui48 eeprom
+
+// Other SPI CS Pins
+const Pin SpiEEPROMcsPin = 25; // SPI EEPROM, for now not implemented
+const Pin SpiFLASHcsPin = 23; // SPI FLASH, for now not implemented
+
+#if SUPPORT_INKJET
+// Inkjet control pins
+const Pin INKJET_SERIAL_OUT = 21; // Serial bitpattern into the shift register
+const Pin INKJET_SHIFT_CLOCK = 20; // Shift the register
+const Pin INKJET_STORAGE_CLOCK = 67; // Put the pattern in the output register
+const Pin INKJET_OUTPUT_ENABLE = 66; // Make the output visible
+const Pin INKJET_CLEAR = 65; // Clear the register to 0
+#endif
+
+// Expansion Settings
+// J14 Expansion connector GPIOs has firmware voltage level selector, 3.3V or 5V
+const Pin ExpansionVoltageLevelPin = 65; // Translator voltage level pin
+const size_t ExpansionVoltageLevel = 3; // Default expansion voltage level value 3 for 3.3V , 5 for 5V
+const Pin ExpansionPiggyDetectPin = 7; // Piggy modulee Detect Pin
+
+// Reset Pins
+const Pin FTDIconverterResetPin = 32; // FTDI USB converter on Serial reset PIN
+const Pin EthernetPhyResetPin = 73; // Ethernet PHY chip Reset Pin
+
+
+// M42 and M208 commands now use logical pin numbers, not firmware pin numbers.
+// This is the mapping from logical pins 60+ to firmware pin numbers
+const Pin SpecialPinMap[] =
+{
+ // RPI-GEN0 - RPI-GEN6 on J15 RaspberryPI shared GPIO
+ // PC11 PC12 PC13 PC14 PC15 PC16 PC17
+ X4 , 51 , 50 , 49 , 48 , 47 , 46 ,
+ // J5 ,only PC8 and PC9, PC4 configured as PWM
+ // PC8 PC9
+ X5 , 41,
+ // J14 Expansion
+ // PB18 PD5 PD4 PA13 PA12 PA11 PA10
+ 63 , 15 , 14 , 16 , 17 , 18 , 19
+};
+
+// This next definition defines the highest one.
+const int HighestLogicalPin = 60 + ARRAY_SIZE(SpecialPinMap) - 1; // highest logical pin number on this electronics
+
+// SAM3X Flash locations (may be expanded in the future)
+const uint32_t IAP_FLASH_START = 0x000F0000;
+const uint32_t IAP_FLASH_END = 0x000FFBFF; // don't touch the last 1KB, it's used for NvData
+
+// Timer allocation
+#define NETWORK_TC (TC1)
+#define NETWORK_TC_CHAN (1)
+#define NETWORK_TC_IRQN TC4_IRQn
+#define NETWORK_TC_HANDLER TC4_Handler
+
+#define STEP_TC (TC1)
+#define STEP_TC_CHAN (0)
+#define STEP_TC_IRQN TC3_IRQn
+#define STEP_TC_HANDLER TC3_Handler
+
+#endif