diff --git a/Matomat/Controller/Instruction.cs b/Matomat/Controller/Instruction.cs
index 3d4ebe2..3397ebb 100644
--- a/Matomat/Controller/Instruction.cs
+++ b/Matomat/Controller/Instruction.cs
@@ -252,8 +252,8 @@ namespace Matomat
}
Factory.getLCD().print("Koffein im Umlauf: " + k.ToString().PadLeft(4, ' ') + " mg (" + avg.ToString().PadLeft(4, ' ') + " mg/Per)" +
"²²²²²²²²²²²²²²²²²²²²²²²²²²²²" + p[0] +
- "² MATOMAT Wilkommen! ²" + p[1] +
- "² Frohes genießen der Mate ²" + p[2]);
+ "² MATOMAT Willkommen! ²" + p[1] +
+ "² Frohes Genießen der Mate ²" + p[2]);
}
public static void showUserInfo(User user)
diff --git a/Matomat/Matomat.csproj b/Matomat/Matomat.csproj
index b418683..c9e2665 100644
--- a/Matomat/Matomat.csproj
+++ b/Matomat/Matomat.csproj
@@ -29,10 +29,13 @@
pdbonly
true
bin\Release\
- TRACE
+ DEBUG;TRACE
prompt
4
+
+ icon.ico
+
False
@@ -90,6 +93,7 @@
+
diff --git a/Matomat/Output/LCDDisplay.cs b/Matomat/Output/LCDDisplay.cs
index c527221..5945004 100644
--- a/Matomat/Output/LCDDisplay.cs
+++ b/Matomat/Output/LCDDisplay.cs
@@ -41,9 +41,11 @@ namespace Matomat.Output
private volatile bool _shouldStop;
private SerialPort serialPort;
private bool disable = false;
+ private string ComPort;
private LCDDisplay(string port)
{
+ this.ComPort = port;
this.serialPort = new SerialPort(port, 19200, Parity.None, 8, StopBits.One);
try
{
@@ -132,6 +134,14 @@ namespace Matomat.Output
text = text.PadRight(160, ' ');
text = text.Substring(0, 40) + "\n" + text.Substring(40, 40) + "\n" + text.Substring(80, 40) + "\n" + text.Substring(120, 40);
Console.WriteLine(text);
+ if (!disable)
+ {
+ if (this.serialPort.IsOpen)
+ {
+ this.serialPort.Close();
+ }
+ this.serialPort.Open();
+ }
}
private void displayClear()
diff --git a/Matomat/Properties/AssemblyInfo.cs b/Matomat/Properties/AssemblyInfo.cs
index 6c41eab..80da6b3 100644
--- a/Matomat/Properties/AssemblyInfo.cs
+++ b/Matomat/Properties/AssemblyInfo.cs
@@ -11,7 +11,7 @@ using System.Resources;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BlubbFish")]
[assembly: AssemblyProduct("Matomat")]
-[assembly: AssemblyCopyright("Copyright © BlubbFish 2013")]
+[assembly: AssemblyCopyright("Copyright © BlubbFish 2013-2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -33,6 +33,6 @@ using System.Resources;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.1")]
-[assembly: AssemblyFileVersion("1.0.0.1")]
+[assembly: AssemblyVersion("1.0.0.2")]
+[assembly: AssemblyFileVersion("1.0.0.2")]
[assembly: NeutralResourcesLanguageAttribute("de-DE")]
diff --git a/Matomat/icon.ico b/Matomat/icon.ico
new file mode 100644
index 0000000..c1921a9
Binary files /dev/null and b/Matomat/icon.ico differ
diff --git a/firmware/.dep/Cstartup_SAM7.o.d b/firmware/.dep/Cstartup_SAM7.o.d
new file mode 100644
index 0000000..c57b75e
--- /dev/null
+++ b/firmware/.dep/Cstartup_SAM7.o.d
@@ -0,0 +1,8 @@
+src/start/Cstartup_SAM7.o: src/start/Cstartup_SAM7.c include/board.h \
+ include/AT91SAM7.h include/lib_AT91SAM7.h
+
+include/board.h:
+
+include/AT91SAM7.h:
+
+include/lib_AT91SAM7.h:
diff --git a/firmware/.dep/blinkcode.o.d b/firmware/.dep/blinkcode.o.d
new file mode 100644
index 0000000..99e6a42
--- /dev/null
+++ b/firmware/.dep/blinkcode.o.d
@@ -0,0 +1,46 @@
+src/os/blinkcode.o: src/os/blinkcode.c src/os/pit.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ src/os/dbgu.h src/os/led.h src/os/blinkcode.h
+
+src/os/pit.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+src/os/dbgu.h:
+
+src/os/led.h:
+
+src/os/blinkcode.h:
diff --git a/firmware/.dep/ctype.o.d b/firmware/.dep/ctype.o.d
new file mode 100644
index 0000000..d3cd4f4
--- /dev/null
+++ b/firmware/.dep/ctype.o.d
@@ -0,0 +1,3 @@
+lib/ctype.o: lib/ctype.c include/asm/ctype.h
+
+include/asm/ctype.h:
diff --git a/firmware/.dep/dbgu.o.d b/firmware/.dep/dbgu.o.d
new file mode 100644
index 0000000..e43fb1c
--- /dev/null
+++ b/firmware/.dep/dbgu.o.d
@@ -0,0 +1,67 @@
+src/dfu/dbgu.o: src/dfu/dbgu.c include/lib_AT91SAM7.h include/AT91SAM7.h \
+ include/board.h src/dfu/dbgu.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+include/board.h:
+
+src/dfu/dbgu.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
diff --git a/firmware/.dep/dfu.o.d b/firmware/.dep/dfu.o.d
new file mode 100644
index 0000000..3af1d63
--- /dev/null
+++ b/firmware/.dep/dfu.o.d
@@ -0,0 +1,86 @@
+src/dfu/dfu.o: src/dfu/dfu.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ include/usb_ch9.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/usb_dfu.h include/board.h include/AT91SAM7.h \
+ include/lib_AT91SAM7.h src/pcd/usb_strings_dfu.h src/dfu/dfu.h \
+ src/dfu/../config.h src/dfu/dbgu.h src/os/flash.h src/os/pcd_enumerate.h \
+ include/asm/atomic.h include/asm/system.h include/asm/compiler.h \
+ include/openpcd.h src/dfu/../openpcd.h include/compile.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+include/usb_ch9.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/usb_dfu.h:
+
+include/board.h:
+
+include/AT91SAM7.h:
+
+include/lib_AT91SAM7.h:
+
+src/pcd/usb_strings_dfu.h:
+
+src/dfu/dfu.h:
+
+src/dfu/../config.h:
+
+src/dfu/dbgu.h:
+
+src/os/flash.h:
+
+src/os/pcd_enumerate.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+include/openpcd.h:
+
+src/dfu/../openpcd.h:
+
+include/compile.h:
diff --git a/firmware/.dep/fifo.o.d b/firmware/.dep/fifo.o.d
new file mode 100644
index 0000000..94db243
--- /dev/null
+++ b/firmware/.dep/fifo.o.d
@@ -0,0 +1,57 @@
+src/os/fifo.o: src/os/fifo.c src/os/fifo.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h
+
+src/os/fifo.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
diff --git a/firmware/.dep/flash.o.d b/firmware/.dep/flash.o.d
new file mode 100644
index 0000000..999540d
--- /dev/null
+++ b/firmware/.dep/flash.o.d
@@ -0,0 +1,46 @@
+src/os/flash.o: src/os/flash.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h src/dfu/dbgu.h include/board.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/dfu/dbgu.h:
+
+include/board.h:
diff --git a/firmware/.dep/led.o.d b/firmware/.dep/led.o.d
new file mode 100644
index 0000000..442204e
--- /dev/null
+++ b/firmware/.dep/led.o.d
@@ -0,0 +1,62 @@
+src/os/led.o: src/os/led.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h include/openpcd.h \
+ src/os/../openpcd.h src/os/usb_handler.h src/os/req_ctx.h src/os/dbgu.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+include/openpcd.h:
+
+src/os/../openpcd.h:
+
+src/os/usb_handler.h:
+
+src/os/req_ctx.h:
+
+src/os/dbgu.h:
diff --git a/firmware/.dep/lib_AT91SAM7.o.d b/firmware/.dep/lib_AT91SAM7.o.d
new file mode 100644
index 0000000..271b4ae
--- /dev/null
+++ b/firmware/.dep/lib_AT91SAM7.o.d
@@ -0,0 +1,44 @@
+lib/lib_AT91SAM7.o: lib/lib_AT91SAM7.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/AT91SAM7.h include/lib_AT91SAM7.h include/AT91SAM7.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/AT91SAM7.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
diff --git a/firmware/.dep/main.o.d b/firmware/.dep/main.o.d
new file mode 100644
index 0000000..3bfbbcb
--- /dev/null
+++ b/firmware/.dep/main.o.d
@@ -0,0 +1,108 @@
+src/os/main.o: src/os/main.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ include/compile.h include/lib_AT91SAM7.h include/AT91SAM7.h \
+ src/os/dbgu.h src/os/led.h src/os/blinkcode.h src/os/main.h \
+ src/os/power.h src/os/system_irq.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ src/os/pit.h src/os/wdt.h src/os/usbcmd_generic.h src/os/pcd_enumerate.h \
+ include/lib_AT91SAM7.h include/asm/atomic.h include/asm/system.h \
+ include/asm/compiler.h include/openpcd.h src/dfu/dfu.h include/usb_ch9.h \
+ include/usb_dfu.h src/dfu/../config.h src/os/../openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+include/compile.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/dbgu.h:
+
+src/os/led.h:
+
+src/os/blinkcode.h:
+
+src/os/main.h:
+
+src/os/power.h:
+
+src/os/system_irq.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+src/os/pit.h:
+
+src/os/wdt.h:
+
+src/os/usbcmd_generic.h:
+
+src/os/pcd_enumerate.h:
+
+include/lib_AT91SAM7.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+include/openpcd.h:
+
+src/dfu/dfu.h:
+
+include/usb_ch9.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/../openpcd.h:
diff --git a/firmware/.dep/main_dumbreader.o.d b/firmware/.dep/main_dumbreader.o.d
new file mode 100644
index 0000000..476319b
--- /dev/null
+++ b/firmware/.dep/main_dumbreader.o.d
@@ -0,0 +1,136 @@
+src/pcd/main_dumbreader.o: src/pcd/main_dumbreader.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h include/openpcd.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ src/os/dbgu.h src/pcd/rc632.h include/cl_rc632.h \
+ ../librfid//include/librfid/rfid.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h \
+ ../librfid//include/librfid/rfid_system.h \
+ ../librfid//include/librfid/rfid_asic.h \
+ ../librfid//include/librfid/rfid_asic_rc632.h \
+ ../librfid//include/librfid/rfid_layer2.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443a.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443b.h \
+ ../librfid//include/librfid/rfid_layer2_iso15693.h \
+ ../librfid//include/librfid/rfid_layer2_icode1.h \
+ src/pcd/rc632_highlevel.h src/os/led.h src/os/pcd_enumerate.h \
+ include/lib_AT91SAM7.h include/asm/atomic.h include/asm/system.h \
+ include/asm/compiler.h include/openpcd.h src/dfu/dfu.h include/usb_ch9.h \
+ include/usb_dfu.h src/dfu/../config.h src/os/usb_handler.h \
+ src/os/req_ctx.h src/pcd/../openpcd.h src/os/main.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+include/openpcd.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+src/os/dbgu.h:
+
+src/pcd/rc632.h:
+
+include/cl_rc632.h:
+
+../librfid//include/librfid/rfid.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h:
+
+../librfid//include/librfid/rfid_system.h:
+
+../librfid//include/librfid/rfid_asic.h:
+
+../librfid//include/librfid/rfid_asic_rc632.h:
+
+../librfid//include/librfid/rfid_layer2.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443a.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443b.h:
+
+../librfid//include/librfid/rfid_layer2_iso15693.h:
+
+../librfid//include/librfid/rfid_layer2_icode1.h:
+
+src/pcd/rc632_highlevel.h:
+
+src/os/led.h:
+
+src/os/pcd_enumerate.h:
+
+include/lib_AT91SAM7.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+include/openpcd.h:
+
+src/dfu/dfu.h:
+
+include/usb_ch9.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/usb_handler.h:
+
+src/os/req_ctx.h:
+
+src/pcd/../openpcd.h:
+
+src/os/main.h:
diff --git a/firmware/.dep/pcd_enumerate.o.d b/firmware/.dep/pcd_enumerate.o.d
new file mode 100644
index 0000000..8c5ea2f
--- /dev/null
+++ b/firmware/.dep/pcd_enumerate.o.d
@@ -0,0 +1,87 @@
+src/os/pcd_enumerate.o: src/os/pcd_enumerate.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ include/usb_ch9.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/asm/atomic.h include/asm/system.h include/asm/compiler.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h include/openpcd.h \
+ src/pcd/usb_strings_app.h src/os/pcd_enumerate.h src/dfu/dfu.h \
+ include/usb_dfu.h src/dfu/../config.h src/os/req_ctx.h \
+ src/os/../openpcd.h src/os/dbgu.h src/os/../config.h \
+ src/os/usb_descriptors_openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+include/usb_ch9.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+include/openpcd.h:
+
+src/pcd/usb_strings_app.h:
+
+src/os/pcd_enumerate.h:
+
+src/dfu/dfu.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/req_ctx.h:
+
+src/os/../openpcd.h:
+
+src/os/dbgu.h:
+
+src/os/../config.h:
+
+src/os/usb_descriptors_openpcd.h:
diff --git a/firmware/.dep/pio_irq.o.d b/firmware/.dep/pio_irq.o.d
new file mode 100644
index 0000000..e832ad6
--- /dev/null
+++ b/firmware/.dep/pio_irq.o.d
@@ -0,0 +1,60 @@
+src/os/pio_irq.o: src/os/pio_irq.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h src/os/pio_irq.h src/os/dbgu.h \
+ src/os/req_ctx.h include/openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/pio_irq.h:
+
+src/os/dbgu.h:
+
+src/os/req_ctx.h:
+
+include/openpcd.h:
diff --git a/firmware/.dep/pit.o.d b/firmware/.dep/pit.o.d
new file mode 100644
index 0000000..7c82929
--- /dev/null
+++ b/firmware/.dep/pit.o.d
@@ -0,0 +1,65 @@
+src/os/pit.o: src/os/pit.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/asm/system.h include/lib_AT91SAM7.h include/AT91SAM7.h \
+ src/os/pit.h src/os/dbgu.h src/os/system_irq.h src/os/../openpcd.h \
+ include/openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/asm/system.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/pit.h:
+
+src/os/dbgu.h:
+
+src/os/system_irq.h:
+
+src/os/../openpcd.h:
+
+include/openpcd.h:
diff --git a/firmware/.dep/pwm.o.d b/firmware/.dep/pwm.o.d
new file mode 100644
index 0000000..7ab5c14
--- /dev/null
+++ b/firmware/.dep/pwm.o.d
@@ -0,0 +1,80 @@
+src/os/pwm.o: src/os/pwm.c include/lib_AT91SAM7.h include/AT91SAM7.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ include/openpcd.h src/os/usb_handler.h src/os/req_ctx.h \
+ src/os/pcd_enumerate.h include/asm/atomic.h include/asm/system.h \
+ include/asm/compiler.h src/dfu/dfu.h include/usb_ch9.h include/usb_dfu.h \
+ src/dfu/../config.h src/os/dbgu.h src/os/../openpcd.h
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+include/openpcd.h:
+
+src/os/usb_handler.h:
+
+src/os/req_ctx.h:
+
+src/os/pcd_enumerate.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+src/dfu/dfu.h:
+
+include/usb_ch9.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/dbgu.h:
+
+src/os/../openpcd.h:
diff --git a/firmware/.dep/rc632.o.d b/firmware/.dep/rc632.o.d
new file mode 100644
index 0000000..12fd1dd
--- /dev/null
+++ b/firmware/.dep/rc632.o.d
@@ -0,0 +1,133 @@
+src/pcd/rc632.o: src/pcd/rc632.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h include/cl_rc632.h \
+ include/openpcd.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ src/pcd/../openpcd.h src/os/fifo.h src/os/dbgu.h src/os/pcd_enumerate.h \
+ include/asm/atomic.h include/asm/system.h include/asm/compiler.h \
+ src/dfu/dfu.h include/usb_ch9.h include/usb_dfu.h src/dfu/../config.h \
+ src/os/usb_handler.h src/os/req_ctx.h src/pcd/rc632.h \
+ ../librfid//include/librfid/rfid.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h \
+ ../librfid//include/librfid/rfid_system.h \
+ ../librfid//include/librfid/rfid_asic.h \
+ ../librfid//include/librfid/rfid_asic_rc632.h \
+ ../librfid//include/librfid/rfid_layer2.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443a.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443b.h \
+ ../librfid//include/librfid/rfid_layer2_iso15693.h \
+ ../librfid//include/librfid/rfid_layer2_icode1.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+include/cl_rc632.h:
+
+include/openpcd.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+src/pcd/../openpcd.h:
+
+src/os/fifo.h:
+
+src/os/dbgu.h:
+
+src/os/pcd_enumerate.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+src/dfu/dfu.h:
+
+include/usb_ch9.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/usb_handler.h:
+
+src/os/req_ctx.h:
+
+src/pcd/rc632.h:
+
+../librfid//include/librfid/rfid.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h:
+
+../librfid//include/librfid/rfid_system.h:
+
+../librfid//include/librfid/rfid_asic.h:
+
+../librfid//include/librfid/rfid_asic_rc632.h:
+
+../librfid//include/librfid/rfid_layer2.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443a.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443b.h:
+
+../librfid//include/librfid/rfid_layer2_iso15693.h:
+
+../librfid//include/librfid/rfid_layer2_icode1.h:
diff --git a/firmware/.dep/rc632_highlevel.o.d b/firmware/.dep/rc632_highlevel.o.d
new file mode 100644
index 0000000..dd103fc
--- /dev/null
+++ b/firmware/.dep/rc632_highlevel.o.d
@@ -0,0 +1,112 @@
+src/pcd/rc632_highlevel.o: src/pcd/rc632_highlevel.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ include/cl_rc632.h src/pcd/rc632.h ../librfid//include/librfid/rfid.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h \
+ ../librfid//include/librfid/rfid_system.h \
+ ../librfid//include/librfid/rfid_asic.h \
+ ../librfid//include/librfid/rfid_asic_rc632.h \
+ ../librfid//include/librfid/rfid_layer2.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443a.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443b.h \
+ ../librfid//include/librfid/rfid_layer2_iso15693.h \
+ ../librfid//include/librfid/rfid_layer2_icode1.h src/os/dbgu.h \
+ ../librfid//include/librfid/rfid_protocol_mifare_classic.h \
+ ../librfid//include/librfid/rfid_protocol.h \
+ ../librfid//include/librfid/rfid_protocol_tcl.h \
+ ../librfid//include/librfid/rfid_protocol_mifare_ul.h \
+ ../librfid//include/librfid/rfid_protocol_tagit.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+include/cl_rc632.h:
+
+src/pcd/rc632.h:
+
+../librfid//include/librfid/rfid.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h:
+
+../librfid//include/librfid/rfid_system.h:
+
+../librfid//include/librfid/rfid_asic.h:
+
+../librfid//include/librfid/rfid_asic_rc632.h:
+
+../librfid//include/librfid/rfid_layer2.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443a.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443b.h:
+
+../librfid//include/librfid/rfid_layer2_iso15693.h:
+
+../librfid//include/librfid/rfid_layer2_icode1.h:
+
+src/os/dbgu.h:
+
+../librfid//include/librfid/rfid_protocol_mifare_classic.h:
+
+../librfid//include/librfid/rfid_protocol.h:
+
+../librfid//include/librfid/rfid_protocol_tcl.h:
+
+../librfid//include/librfid/rfid_protocol_mifare_ul.h:
+
+../librfid//include/librfid/rfid_protocol_tagit.h:
diff --git a/firmware/.dep/req_ctx.o.d b/firmware/.dep/req_ctx.o.d
new file mode 100644
index 0000000..8ec1536
--- /dev/null
+++ b/firmware/.dep/req_ctx.o.d
@@ -0,0 +1,77 @@
+src/os/req_ctx.o: src/os/req_ctx.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/unistd.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/unistd.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/stdlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/alloca.h \
+ include/asm/bitops.h include/asm/system.h src/os/dbgu.h src/os/req_ctx.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h src/os/../openpcd.h \
+ include/openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/unistd.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/unistd.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/stdlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/alloca.h:
+
+include/asm/bitops.h:
+
+include/asm/system.h:
+
+src/os/dbgu.h:
+
+src/os/req_ctx.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/../openpcd.h:
+
+include/openpcd.h:
diff --git a/firmware/.dep/string.o.d b/firmware/.dep/string.o.d
new file mode 100644
index 0000000..11d5c2e
--- /dev/null
+++ b/firmware/.dep/string.o.d
@@ -0,0 +1,52 @@
+lib/string.o: lib/string.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ include/asm/ctype.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+include/asm/ctype.h:
diff --git a/firmware/.dep/syscalls.o.d b/firmware/.dep/syscalls.o.d
new file mode 100644
index 0000000..feedc22
--- /dev/null
+++ b/firmware/.dep/syscalls.o.d
@@ -0,0 +1,71 @@
+src/os/syscalls.o: src/os/syscalls.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/stdlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/alloca.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stat.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/time.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/time.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ include/board.h include/AT91SAM7.h include/lib_AT91SAM7.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/stdlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/alloca.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stat.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/time.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/time.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+include/board.h:
+
+include/AT91SAM7.h:
+
+include/lib_AT91SAM7.h:
diff --git a/firmware/.dep/system_irq.o.d b/firmware/.dep/system_irq.o.d
new file mode 100644
index 0000000..d44a595
--- /dev/null
+++ b/firmware/.dep/system_irq.o.d
@@ -0,0 +1,51 @@
+src/os/system_irq.o: src/os/system_irq.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h src/os/system_irq.h \
+ src/os/dbgu.h src/os/../openpcd.h include/openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/system_irq.h:
+
+src/os/dbgu.h:
+
+src/os/../openpcd.h:
+
+include/openpcd.h:
diff --git a/firmware/.dep/tc_cdiv.o.d b/firmware/.dep/tc_cdiv.o.d
new file mode 100644
index 0000000..08638d6
--- /dev/null
+++ b/firmware/.dep/tc_cdiv.o.d
@@ -0,0 +1,51 @@
+src/os/tc_cdiv.o: src/os/tc_cdiv.c include/lib_AT91SAM7.h \
+ include/AT91SAM7.h src/os/dbgu.h src/os/../openpcd.h include/openpcd.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ src/os/tc_cdiv.h
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/dbgu.h:
+
+src/os/../openpcd.h:
+
+include/openpcd.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+src/os/tc_cdiv.h:
diff --git a/firmware/.dep/trigger.o.d b/firmware/.dep/trigger.o.d
new file mode 100644
index 0000000..4f6cbc0
--- /dev/null
+++ b/firmware/.dep/trigger.o.d
@@ -0,0 +1,49 @@
+src/os/trigger.o: src/os/trigger.c include/lib_AT91SAM7.h \
+ include/AT91SAM7.h src/os/trigger.h src/os/../openpcd.h \
+ include/openpcd.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/trigger.h:
+
+src/os/../openpcd.h:
+
+include/openpcd.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
diff --git a/firmware/.dep/usb_benchmark.o.d b/firmware/.dep/usb_benchmark.o.d
new file mode 100644
index 0000000..1520964
--- /dev/null
+++ b/firmware/.dep/usb_benchmark.o.d
@@ -0,0 +1,93 @@
+src/os/usb_benchmark.o: src/os/usb_benchmark.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ include/lib_AT91SAM7.h include/AT91SAM7.h src/os/led.h src/os/dbgu.h \
+ src/os/pcd_enumerate.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/asm/atomic.h include/asm/system.h include/asm/compiler.h \
+ include/openpcd.h src/dfu/dfu.h include/usb_ch9.h include/usb_dfu.h \
+ src/dfu/../config.h src/os/usb_handler.h src/os/req_ctx.h \
+ src/os/../openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/led.h:
+
+src/os/dbgu.h:
+
+src/os/pcd_enumerate.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+include/openpcd.h:
+
+src/dfu/dfu.h:
+
+include/usb_ch9.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/usb_handler.h:
+
+src/os/req_ctx.h:
+
+src/os/../openpcd.h:
diff --git a/firmware/.dep/usb_handler.o.d b/firmware/.dep/usb_handler.o.d
new file mode 100644
index 0000000..1854399
--- /dev/null
+++ b/firmware/.dep/usb_handler.o.d
@@ -0,0 +1,92 @@
+src/os/usb_handler.o: src/os/usb_handler.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ include/openpcd.h src/os/pcd_enumerate.h include/lib_AT91SAM7.h \
+ include/AT91SAM7.h include/asm/atomic.h include/asm/system.h \
+ include/asm/compiler.h src/dfu/dfu.h include/usb_ch9.h include/usb_dfu.h \
+ src/dfu/../config.h src/os/usb_handler.h src/os/req_ctx.h src/os/led.h \
+ src/os/dbgu.h src/os/../openpcd.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/errno.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+include/openpcd.h:
+
+src/os/pcd_enumerate.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+include/asm/atomic.h:
+
+include/asm/system.h:
+
+include/asm/compiler.h:
+
+src/dfu/dfu.h:
+
+include/usb_ch9.h:
+
+include/usb_dfu.h:
+
+src/dfu/../config.h:
+
+src/os/usb_handler.h:
+
+src/os/req_ctx.h:
+
+src/os/led.h:
+
+src/os/dbgu.h:
+
+src/os/../openpcd.h:
diff --git a/firmware/.dep/usbcmd_generic.o.d b/firmware/.dep/usbcmd_generic.o.d
new file mode 100644
index 0000000..663ffd4
--- /dev/null
+++ b/firmware/.dep/usbcmd_generic.o.d
@@ -0,0 +1,110 @@
+src/os/usbcmd_generic.o: src/os/usbcmd_generic.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ include/openpcd.h src/os/req_ctx.h include/lib_AT91SAM7.h \
+ include/AT91SAM7.h src/os/usb_handler.h src/os/led.h src/os/dbgu.h \
+ src/os/main.h src/os/flash.h include/board.h src/pcd/rc632_highlevel.h \
+ ../librfid//include/librfid/rfid_asic.h \
+ ../librfid//include/librfid/rfid_asic_rc632.h \
+ ../librfid//include/librfid/rfid.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h \
+ ../librfid//include/librfid/rfid_system.h \
+ ../librfid//include/librfid/rfid_layer2.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443a.h \
+ ../librfid//include/librfid/rfid_layer2_iso14443b.h \
+ ../librfid//include/librfid/rfid_layer2_iso15693.h \
+ ../librfid//include/librfid/rfid_layer2_icode1.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+include/openpcd.h:
+
+src/os/req_ctx.h:
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/usb_handler.h:
+
+src/os/led.h:
+
+src/os/dbgu.h:
+
+src/os/main.h:
+
+src/os/flash.h:
+
+include/board.h:
+
+src/pcd/rc632_highlevel.h:
+
+../librfid//include/librfid/rfid_asic.h:
+
+../librfid//include/librfid/rfid_asic_rc632.h:
+
+../librfid//include/librfid/rfid.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/stdio.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/stdio.h:
+
+../librfid//include/librfid/rfid_system.h:
+
+../librfid//include/librfid/rfid_layer2.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443a.h:
+
+../librfid//include/librfid/rfid_layer2_iso14443b.h:
+
+../librfid//include/librfid/rfid_layer2_iso15693.h:
+
+../librfid//include/librfid/rfid_layer2_icode1.h:
diff --git a/firmware/.dep/vsprintf.o.d b/firmware/.dep/vsprintf.o.d
new file mode 100644
index 0000000..dc6a47c
--- /dev/null
+++ b/firmware/.dep/vsprintf.o.d
@@ -0,0 +1,68 @@
+lib/vsprintf.o: lib/vsprintf.c \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h \
+ include/asm/ctype.h include/asm/div64.h include/asm/system.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include-fixed/limits.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include-fixed/syslimits.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/limits.h
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stdarg.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/string.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/reent.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/string.h:
+
+include/asm/ctype.h:
+
+include/asm/div64.h:
+
+include/asm/system.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include-fixed/limits.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include-fixed/syslimits.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/limits.h:
diff --git a/firmware/.dep/wdt.o.d b/firmware/.dep/wdt.o.d
new file mode 100644
index 0000000..124c142
--- /dev/null
+++ b/firmware/.dep/wdt.o.d
@@ -0,0 +1,46 @@
+src/os/wdt.o: src/os/wdt.c include/lib_AT91SAM7.h include/AT91SAM7.h \
+ src/os/dbgu.h src/os/system_irq.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h \
+ e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h
+
+include/lib_AT91SAM7.h:
+
+include/AT91SAM7.h:
+
+src/os/dbgu.h:
+
+src/os/system_irq.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/_ansi.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/newlib.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/config.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/ieeefp.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/features.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/_default_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/_types.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/sys/lock.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/include/stddef.h:
+
+e:\programme\mingw\libexec\arm\bin\../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/include/machine/types.h:
diff --git a/firmware/COPYING b/firmware/COPYING
new file mode 100644
index 0000000..d511905
--- /dev/null
+++ b/firmware/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/firmware/Makefile b/firmware/Makefile
new file mode 100644
index 0000000..0a8bdb2
--- /dev/null
+++ b/firmware/Makefile
@@ -0,0 +1,613 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM makefile for the FreeRTOS-demo on LPC2138
+# based in information from the FreeRTOS LPC2106 example
+#
+# by Martin Thomas, Kaiserslautern, Germany
+#
+#
+# based on the WinAVR makefile written by Eric B. Weddington, Jörg Wunsch, et al.
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+#
+# Changelog:
+# - 17. Feb. 2005 - added thumb-interwork support (mth)
+# - 28. Apr. 2005 - added C++ support (mth)
+# - 29. Arp. 2005 - changed handling for lst-Filename (mth)
+# - 1. Nov. 2005 - exception-vector placement options (mth)
+# - 15. Nov. 2005 - added library-search-path (EXTRA_LIB...) (mth)
+# - 2. Dec. 2005 - fixed ihex and binary file extensions (mth)
+# - 22. Feb. 2006 - added AT91LIBNOWARN setting (mth)
+# - 19. Apr. 2006 - option FLASH_TOOL (default lpc21isp); variable IMGEXT (mth)
+# - 19. Mai. 2006 - USE_THUMB_MODE switch, ROM_RUN->RUN_FROM_ROM RAM_RUN->RUN_FROM_RAM
+
+LIBRFID_DIR:=../librfid/
+
+FLASH_TOOL = AT91FLASH
+#FLASH_TOOL = UVISION
+#FLASH_TOOL = OPENOCD
+
+# MCU name and submodel
+MCU = arm7tdmi
+#SUBMDL = AT91SAM7S64
+SUBMDL = AT91SAM7S128
+
+USE_THUMB_MODE = NO
+#USE_THUMB_MODE = YES
+
+## Create ROM-Image (final)
+RUN_MODE=RUN_FROM_ROM
+## Create RAM-Image (debugging) - not used in this example
+#RUN_MODE=RUN_FROM_RAM
+
+## We want to produce a full-flash image, but including DFU
+IMGTYPE=-sam7dfu-app
+
+# with / at end
+PATH_TO_LINKSCRIPTS=link/
+
+#### not used in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+# Target file name (without extension).
+TARGET:=main_reqa
+
+USBSTRINGS=src/picc/usb_strings_app.h src/pcd/usb_strings_app.h
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC =
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+
+# First, build library ...
+SRCARM = lib/lib_AT91SAM7.c
+ifdef DEBUG
+SRCARM += lib/vsprintf.c lib/ctype.c lib/string.c
+endif
+
+# then, OS ...
+SRCARM += src/os/pcd_enumerate.c src/os/fifo.c src/os/dbgu.c \
+ src/os/led.c src/os/req_ctx.c src/os/trigger.c \
+ src/os/main.c src/os/syscalls.c src/os/usb_handler.c \
+ src/os/usb_benchmark.c src/os/tc_cdiv.c src/os/pit.c \
+ src/os/pwm.c src/os/pio_irq.c src/os/usbcmd_generic.c \
+ src/os/wdt.c src/os/blinkcode.c src/os/system_irq.c \
+ src/os/flash.c
+
+ifeq ($(BOARD), PCD)
+# PCD support code
+SRCARM += src/pcd/rc632.c src/pcd/rc632_highlevel.c
+# finally, the actual main application
+SRCARM += src/pcd/$(TARGET).c
+endif
+
+ifeq ($(BOARD), PICC)
+# PICC support code
+SRCARM += src/picc/tc_fdt.c src/picc/ssc_picc.c src/picc/adc.c \
+ src/picc/decoder.c src/picc/decoder_miller.c \
+ src/picc/load_modulation.c src/picc/tc_cdiv_sync.c \
+ src/picc/decoder_nrzl.c src/picc/da.c src/picc/pll.c \
+ src/picc/openpicc.c
+# finally, the actual main application
+SRCARM += src/picc/$(TARGET).c
+endif
+
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+ASRCLIB = lib/changebit.S lib/clearbit.S lib/setbit.S lib/testchangebit.S \
+ lib/testclearbit.S lib/testsetbit.S
+ifdef DEBUG
+#ASRCLIB += lib/memcpy.S lib/memset.S lib/lib1funcs.S lib/div64.S
+ASRCLIB += lib/lib1funcs.S lib/div64.S
+endif
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = src/start/Cstartup_app.S $(ASRCLIB)
+
+## Output format. (can be ihex or binary)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+FORMAT = binary
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+OPT = 2
+#OPT = 0
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUGF = stabs
+DEBUGF = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+#### FreeRTOS
+EXTRAINCDIRS = $(LIBRFID_DIR)/include/
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = $(LIBRFID_DIR)/src/.libs/
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+AT91LIBNOWARN = yes
+#AT91LIBNOWARN = no
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE) -D__MS_types__ -D__LIBRFID__
+
+ifdef DEBUG
+CDEFS += -DDEBUG
+endif
+
+ifdef OLIMEX
+CDEFS += -DOLIMEX
+endif
+
+ifeq ($(BOARD),PICC)
+CDEFS += -DPICC
+CINCS = -Isrc/picc
+endif
+
+ifeq ($(BOARD),PCD)
+CDEFS += -DPCD
+CINCS = -Isrc/pcd
+endif
+
+# Place -I options here
+CINCS += -Iinclude -Isrc
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__$(SUBMDL)__
+ADEFS += -D__$(SUBMDL)__
+
+
+# Compiler flags.
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUGF)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wextra -Wcast-align -Wimplicit -Wunused
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow
+CFLAGS += -Wbad-function-cast -Wsign-compare -Waggregate-return
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+#CFLAGS += -ffunction-sections -fdata-sections
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUGF): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),--g$(DEBUGF) -Iinclude/ -D__ASSEMBLY__
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+ifeq ($(TARGET),main_librfid)
+EXTRA_LIBS = rfid
+endif
+
+ifeq ($(TARGET),main_reqa)
+EXTRA_LIBS = rfid
+endif
+
+ifeq ($(TARGET),main_presence)
+EXTRA_LIBS = rfid
+endif
+
+ifeq ($(TARGET),main_mifare)
+EXTRA_LIBS = rfid
+endif
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = #-lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+#LDFLAGS += --gc-sections
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RUN_FROM_RAM)
+LDFLAGS +=-T$(PATH_TO_LINKSCRIPTS)$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(PATH_TO_LINKSCRIPTS)$(SUBMDL)-ROM$(IMGTYPE).ld
+endif
+
+
+# ---------------------------------------------------------------------------
+# Flash-Programming support using lpc21isp by Martin Maurer
+# only for Philips LPC and Analog ADuC ARMs
+#
+# Settings and variables:
+#LPC21ISP = lpc21isp
+LPC21ISP = lpc21isp
+LPC21ISP_PORT = com1
+LPC21ISP_BAUD = 38400
+LPC21ISP_XTAL = 12000
+LPC21ISP_FLASHFILE = $(TARGET).hex
+# verbose output:
+#LPC21ISP_DEBUG = -debug
+# enter bootloader via RS232 DTR/RTS (only if hardware supports this
+# feature - see Philips AppNote):
+LPC21ISP_CONTROL = -control
+# ---------------------------------------------------------------------------
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = arm-none-eabi-gcc
+CPP = arm-none-eabi-g++
+OBJCOPY = arm-none-eabi-objcopy
+OBJDUMP = arm-none-eabi-objdump
+SIZE = arm-none-eabi-size
+NM = arm-none-eabi-nm
+#CC = arm-elf-gcc
+#CPP = arm-elf-g++
+#OBJCOPY = arm-elf-objcopy
+#OBJDUMP = arm-elf-objdump
+#SIZE = arm-elf-size
+#NM = arm-elf-nm
+REMOVE = rm -f
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+
+# Program the device.
+# Program the device by using our relais card robot over USB
+ifeq ($(FLASH_TOOL),AT91FLASH)
+program: $(TARGET).$(IMGEXT)
+ ls -l $(TARGET).$(IMGEXT)
+ at91flash $(TARGET).$(IMGEXT)
+else
+ifeq ($(FLASH_TOOL),UVISION)
+# Program the device with Keil's uVision (needs configured uVision-Workspace).
+program: $(TARGET).$(IMGEXT)
+ @echo
+ @echo "Programming with uVision"
+ C:\Keil\uv3\Uv3.exe -f uvisionflash.Uv2 -ouvisionflash.txt
+else
+ifeq ($(FLASH_TOOL),OPENOCD)
+# Program the device with Dominic Rath's OPENOCD in "batch-mode", needs cfg and "reset-script".
+program: $(TARGET).$(IMGEXT)
+ @echo
+ @echo "Programming with OPENOCD"
+ C:\WinARM\utils\openocd\openocd_svn59\openocd.exe -f oocd_sam7_flash.cfg
+else
+# Program the device. - lpc21isp will not work for SAM7
+program: $(TARGET).$(IMGEXT)
+ @echo
+ @echo $(MSG_LPC21_RESETREMINDER)
+ $(LPC21ISP) $(LPC21ISP_OPTIONS) $(LPC21ISP_DEBUG) $(LPC21ISP_FLASHFILE) $(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)
+endif
+endif
+endif
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O $(FORMAT) $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O $(FORMAT) $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c include/compile.h $(USBSTRINGS)
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVE) .dep/*
+ $(REMOVE) include/compile.h
+ $(REMOVE) src/picc/usb_strings_app.h
+ $(REMOVE) scripts/usbstring
+
+.PHONY: include/compile.h
+include/compile.h:
+ scripts/mkcompile_h > $@
+
+$(USBSTRINGS): %.h : %.txt ./scripts/usbstring
+ cat $< | ./scripts/usbstring > $@
+
+scripts/usbstring: scripts/usbstring.c
+ gcc $^ -o $@
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
diff --git a/firmware/Makefile.dfu b/firmware/Makefile.dfu
new file mode 100644
index 0000000..a48be63
--- /dev/null
+++ b/firmware/Makefile.dfu
@@ -0,0 +1,572 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM makefile for the FreeRTOS-demo on LPC2138
+# based in information from the FreeRTOS LPC2106 example
+#
+# by Martin Thomas, Kaiserslautern, Germany
+#
+#
+# based on the WinAVR makefile written by Eric B. Weddington, Jörg Wunsch, et al.
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+#
+# Changelog:
+# - 17. Feb. 2005 - added thumb-interwork support (mth)
+# - 28. Apr. 2005 - added C++ support (mth)
+# - 29. Arp. 2005 - changed handling for lst-Filename (mth)
+# - 1. Nov. 2005 - exception-vector placement options (mth)
+# - 15. Nov. 2005 - added library-search-path (EXTRA_LIB...) (mth)
+# - 2. Dec. 2005 - fixed ihex and binary file extensions (mth)
+# - 22. Feb. 2006 - added AT91LIBNOWARN setting (mth)
+# - 19. Apr. 2006 - option FLASH_TOOL (default lpc21isp); variable IMGEXT (mth)
+# - 19. Mai. 2006 - USE_THUMB_MODE switch, ROM_RUN->RUN_FROM_ROM RAM_RUN->RUN_FROM_RAM
+
+
+FLASH_TOOL = AT91FLASH
+#FLASH_TOOL = UVISION
+#FLASH_TOOL = OPENOCD
+
+# MCU name and submodel
+MCU = arm7tdmi
+#SUBMDL = AT91SAM7S64
+SUBMDL = AT91SAM7S256
+
+USE_THUMB_MODE = NO
+#USE_THUMB_MODE = YES
+
+## Create ROM-Image (final)
+RUN_MODE=RUN_FROM_ROM
+## Create RAM-Image (debugging) - not used in this example
+#RUN_MODE=RUN_FROM_RAM
+
+## We want to produce a full-flash image, but including DFU
+IMGTYPE=-sam7dfu-dfu
+
+# with / at end
+PATH_TO_LINKSCRIPTS=link/
+
+#### not used in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+# Target file name (without extension).
+TARGET:=dfu
+
+USBSTRINGS=src/picc/usb_strings_dfu.h src/pcd/usb_strings_dfu.h
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC =
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+
+SRCARM = src/start/Cstartup_SAM7.c lib/lib_AT91SAM7.c \
+ src/dfu/dfu.c src/dfu/dbgu.c src/os/flash.c
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = src/start/Cstartup.S
+
+ifeq ($(DEBUG),1)
+SRCARM += lib/vsprintf.c lib/ctype.c lib/string.c
+ASRCARM += lib/div64.S
+endif
+
+## Output format. (can be ihex or binary)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+FORMAT = binary
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+OPT = s
+#OPT = 0
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUGF = stabs
+DEBUGF = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+#### FreeRTOS
+EXTRAINCDIRS =
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS =
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+AT91LIBNOWARN = yes
+#AT91LIBNOWARN = no
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE) -D__MS_types__ -D__LIBRFID__
+
+ifdef DEBUG
+CDEFS += -DDEBUG
+ADEFS += -DDEBUG
+endif
+
+ifeq ($(BOARD),OLIMEX)
+CDEFS += -DOLIMEX
+ADEFS += -DOLIMEX
+endif
+
+ifeq ($(BOARD),PICC)
+CDEFS += -DPICC
+ADEFS += -DPICC
+CINCS = -Isrc/picc
+endif
+
+ifeq ($(BOARD),PCD)
+SUBMDL = AT91SAM7S128
+CDEFS += -DPCD
+ADEFS += -DPCD
+CINCS = -Isrc/pcd
+endif
+
+# Place -I options here
+CINCS += -Iinclude -Isrc
+
+# Place -D or -U options for ASM here
+ADEFS += -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__$(SUBMDL)__
+ADEFS += -D__$(SUBMDL)__
+
+
+# Compiler flags.
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS += -g$(DEBUGF) -DBOARD=$(BOARD)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wextra -Wcast-align -Wimplicit -Wunused
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow
+CFLAGS += -Wbad-function-cast -Wsign-compare -Waggregate-return
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+#CFLAGS += -ffunction-sections -fdata-sections
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUGF): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),--g$(DEBUGF) -Iinclude/ -D__ASSEMBLY__
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS =
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = #-lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+#LDFLAGS += --gc-sections
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RUN_FROM_RAM)
+LDFLAGS +=-T$(PATH_TO_LINKSCRIPTS)$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(PATH_TO_LINKSCRIPTS)$(SUBMDL)-ROM$(IMGTYPE).ld
+endif
+
+
+# ---------------------------------------------------------------------------
+# Flash-Programming support using lpc21isp by Martin Maurer
+# only for Philips LPC and Analog ADuC ARMs
+#
+# Settings and variables:
+#LPC21ISP = lpc21isp
+LPC21ISP = lpc21isp
+LPC21ISP_PORT = com1
+LPC21ISP_BAUD = 38400
+LPC21ISP_XTAL = 12000
+LPC21ISP_FLASHFILE = $(TARGET).hex
+# verbose output:
+#LPC21ISP_DEBUG = -debug
+# enter bootloader via RS232 DTR/RTS (only if hardware supports this
+# feature - see Philips AppNote):
+LPC21ISP_CONTROL = -control
+# ---------------------------------------------------------------------------
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = arm-none-eabi-gcc
+CPP = arm-none-eabi-g++
+OBJCOPY = arm-none-eabi-objcopy
+OBJDUMP = arm-none-eabi-objdump
+SIZE = arm-none-eabi-size
+NM = arm-none-eabi-nm
+#CC = arm-elf-gcc
+#CPP = arm-elf-g++
+#OBJCOPY = arm-elf-objcopy
+#OBJDUMP = arm-elf-objdump
+#SIZE = arm-elf-size
+#NM = arm-elf-nm
+REMOVE = rm -f
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+
+# Program the device.
+# Program the device by using our relais card robot over USB
+ifeq ($(FLASH_TOOL),AT91FLASH)
+program: $(TARGET).$(IMGEXT)
+ ls -l $(TARGET).$(IMGEXT)
+ at91flash $(TARGET).$(IMGEXT)
+else
+ifeq ($(FLASH_TOOL),UVISION)
+# Program the device with Keil's uVision (needs configured uVision-Workspace).
+program: $(TARGET).$(IMGEXT)
+ @echo
+ @echo "Programming with uVision"
+ C:\Keil\uv3\Uv3.exe -f uvisionflash.Uv2 -ouvisionflash.txt
+else
+ifeq ($(FLASH_TOOL),OPENOCD)
+# Program the device with Dominic Rath's OPENOCD in "batch-mode", needs cfg and "reset-script".
+program: $(TARGET).$(IMGEXT)
+ @echo
+ @echo "Programming with OPENOCD"
+ C:\WinARM\utils\openocd\openocd_svn59\openocd.exe -f oocd_sam7_flash.cfg
+else
+# Program the device. - lpc21isp will not work for SAM7
+program: $(TARGET).$(IMGEXT)
+ @echo
+ @echo $(MSG_LPC21_RESETREMINDER)
+ $(LPC21ISP) $(LPC21ISP_OPTIONS) $(LPC21ISP_DEBUG) $(LPC21ISP_FLASHFILE) $(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)
+endif
+endif
+endif
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O $(FORMAT) $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O $(FORMAT) $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c include/compile.h $(USBSTRINGS)
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVE) .dep/*
+ $(REMOVE) src/picc/usb_strings_dfu.h
+ $(REMOVE) src/dfu/usb_strings_dfu.h
+ $(REMOVE) scripts/usbstring
+
+.PHONY: include/compile.h
+include/compile.h:
+ scripts/mkcompile_h > $@
+
+.PHONY:
+$(USBSTRINGS): %.h : %.txt ./scripts/usbstring
+ cat $< | ./scripts/usbstring > $@
+
+scripts/usbstring: scripts/usbstring.c
+ gcc $^ -o $@
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
diff --git a/firmware/README b/firmware/README
new file mode 100644
index 0000000..b7caba7
--- /dev/null
+++ b/firmware/README
@@ -0,0 +1,13 @@
+Different Targets can be built by implementing a _init_func() and _main_func()_
+function in src/main_foo.c
+
+The resulting binary main_foo.bin can be built by issuing
+ make BOARD=PCD TARGET=main_foo
+
+If you want to add debugging support (debug unit aka DBGU, RS232), add DEBUG=1
+
+
+Building dfu.bin (the DFU loader binary):
+ make -f Makefile.dfu BOARD=PCD
+
+For more information, please read http://wiki.openpcd.org/wiki/Firmware
diff --git a/firmware/TODO b/firmware/TODO
new file mode 100644
index 0000000..d319ee8
--- /dev/null
+++ b/firmware/TODO
@@ -0,0 +1,23 @@
+SPI:
+- use PDC DMA for SPI transfers
+
+RC632:
+- Fix locking between 'atomic' ops like set/clear bit and RC632 IRQ
+- Implement VFIFO handling
+
+USB:
+- Implement suspend/resume handshake
+- Make sure we don't eat a lot of power before entering the configured state
+
+DFU:
+- fix DFU download (usb control write / zlp at end)
+- add capability to flash DFU itself
+- add a header to the application program, checksum and size
+- checksum application image. If wrong, enter DFU recovery mode
+- Get rid of lots of constant values and replace them by proper defines
+
+Generic:
+- why is watchdog apparently not working?
+
+Way Later, for librfid:
+- Implement parts (or all of) 14443 in firmware as alternative configuration
diff --git a/firmware/dfu.bin b/firmware/dfu.bin
new file mode 100644
index 0000000..eec3f2b
Binary files /dev/null and b/firmware/dfu.bin differ
diff --git a/firmware/dfu.elf b/firmware/dfu.elf
new file mode 100644
index 0000000..928ad46
Binary files /dev/null and b/firmware/dfu.elf differ
diff --git a/firmware/dfu.lss b/firmware/dfu.lss
new file mode 100644
index 0000000..b8124ed
--- /dev/null
+++ b/firmware/dfu.lss
@@ -0,0 +1,4097 @@
+
+dfu.elf: file format elf32-littlearm
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 .text 00001ac0 00000000 00000000 00008000 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 1 .data.shared 00000008 00200020 00001ac0 00010020 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 2 .data 00000024 00201ac0 00001ac8 00011ac0 2**2
+ CONTENTS, ALLOC, LOAD, CODE
+ 3 .dfu.functab 00000030 00003fd0 00003fd0 00013fd0 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 4 .bss 00000105 00201ae4 00001aec 00011ae4 2**2
+ ALLOC
+ 5 .ARM.attributes 0000002e 00000000 00000000 00014000 2**0
+ CONTENTS, READONLY
+ 6 .comment 0000002a 00000000 00000000 0001402e 2**0
+ CONTENTS, READONLY
+ 7 .debug_aranges 000000c8 00000000 00000000 00014058 2**3
+ CONTENTS, READONLY, DEBUGGING
+ 8 .debug_pubnames 000002b7 00000000 00000000 00014120 2**0
+ CONTENTS, READONLY, DEBUGGING
+ 9 .debug_info 000040e7 00000000 00000000 000143d7 2**0
+ CONTENTS, READONLY, DEBUGGING
+ 10 .debug_abbrev 00000bb3 00000000 00000000 000184be 2**0
+ CONTENTS, READONLY, DEBUGGING
+ 11 .debug_line 0000089e 00000000 00000000 00019071 2**0
+ CONTENTS, READONLY, DEBUGGING
+ 12 .debug_frame 00000540 00000000 00000000 00019910 2**2
+ CONTENTS, READONLY, DEBUGGING
+ 13 .debug_str 00001637 00000000 00000000 00019e50 2**0
+ CONTENTS, READONLY, DEBUGGING
+ 14 .debug_loc 00001193 00000000 00000000 0001b487 2**0
+ CONTENTS, READONLY, DEBUGGING
+ 15 .debug_ranges 000001d0 00000000 00000000 0001c620 2**3
+ CONTENTS, READONLY, DEBUGGING
+ 16 .debug_pubtypes 00000485 00000000 00000000 0001c7f0 2**0
+ CONTENTS, READONLY, DEBUGGING
+
+Disassembly of section .text:
+
+00000000 :
+//*- guarantee a valid jump. For the moment, all are just looping.
+//*- If an exception occurs before remap, this would result in an infinite loop.
+//*- To ensure if a exeption occurs before start application to infinite loop.
+//*------------------------------------------------------------------------------*/
+
+ B InitReset /* 0x00 Reset handler */
+ 0: ea000026 b a0
+
+00000004 :
+undefvec:
+ B undefvec /* 0x04 Undefined Instruction */
+ 4: eafffffe b 4
+
+00000008 :
+swivec:
+ B swivec /* 0x08 Software Interrupt */
+ 8: eafffffe b 8
+
+0000000c :
+pabtvec:
+ B pabtvec /* 0x0C Prefetch Abort */
+ c: eafffffe b c
+
+00000010 :
+dabtvec:
+ b dabtvec /* 0x10 Data Abort */
+ 10: eafffffe b 10
+
+00000014 :
+rsvdvec:
+ b rsvdvec /* 0x14 reserved */
+ 14: eafffffe b 14
+
+00000018 :
+irqvec:
+ b IRQ_Handler_Entry /* 0x18 IRQ */
+ 18: ea00000b b 4c
+
+0000001c :
+fiqvec:
+ ldr pc, [pc, #-0xF20] /* 0x1c FIQ */
+ 1c: e51fff20 ldr pc, [pc, #-3872] ; fffff104
+
+00000020 :
+ 20: 00000000 .word 0x00000000
+
+00000024 :
+
+/*- Switch in SVC/User Mode to allow User Stack access for C code */
+/* because the FIQ is not yet acknowledged*/
+
+/*- Save and r0 in FIQ_Register */
+ mov r9, r0
+ 24: e1a09000 mov r9, r0
+ ldr r0, [r8, #AIC_FVR]
+ 28: e5980104 ldr r0, [r8, #260] ; 0x104
+ msr CPSR_c, #I_BIT | F_BIT | ARM_MODE_SVC
+ 2c: e321f0d3 msr CPSR_c, #211 ; 0xd3
+
+ /*- Save scratch/used registers and LR in User Stack */
+ stmfd sp!, { r1-r3, r12, lr}
+ 30: e92d500e push {r1, r2, r3, ip, lr}
+
+ /*- Branch to the routine pointed by the AIC_FVR */
+ mov r14, pc
+ 34: e1a0e00f mov lr, pc
+ bx r0
+ 38: e12fff10 bx r0
+
+ /*- Restore scratch/used registers and LR from User Stack */
+ ldmia sp!, { r1-r3, r12, lr}
+ 3c: e8bd500e pop {r1, r2, r3, ip, lr}
+
+ /*- Leave Interrupts disabled and switch back in FIQ mode */
+ msr CPSR_c, #I_BIT | F_BIT | ARM_MODE_FIQ
+ 40: e321f0d1 msr CPSR_c, #209 ; 0xd1
+
+ /*- Restore the R0 ARM_MODE_SVC register */
+ mov r0,r9
+ 44: e1a00009 mov r0, r9
+
+ /*- Restore the Program Counter using the LR_fiq directly in the PC */
+ subs pc, lr, #4
+ 48: e25ef004 subs pc, lr, #4
+
+0000004c :
+
+IRQ_Handler_Entry:
+
+ /*- Manage Exception Entry */
+ /*- Adjust and save LR_irq in IRQ stack */
+ sub lr, lr, #4
+ 4c: e24ee004 sub lr, lr, #4
+ stmfd sp!, {lr}
+ 50: e52de004 push {lr} ; (str lr, [sp, #-4]!)
+
+ /*- Save SPSR need to be saved for nested interrupt */
+ mrs r14, SPSR
+ 54: e14fe000 mrs lr, SPSR
+ stmfd sp!, {r14}
+ 58: e52de004 push {lr} ; (str lr, [sp, #-4]!)
+
+ /*- Save and r0 in IRQ stack */
+ stmfd sp!, {r0}
+ 5c: e52d0004 push {r0} ; (str r0, [sp, #-4]!)
+
+ /*- Write in the IVR to support Protect Mode */
+ /*- No effect in Normal Mode */
+ /*- De-assert the NIRQ and clear the source in Protect Mode */
+ ldr r14, =AT91C_BASE_AIC
+ 60: e59fe148 ldr lr, [pc, #328] ; 1b0
+ ldr r0 , [r14, #AIC_IVR]
+ 64: e59e0100 ldr r0, [lr, #256] ; 0x100
+ str r14, [r14, #AIC_IVR]
+ 68: e58ee100 str lr, [lr, #256] ; 0x100
+
+ /*- Enable Interrupt and Switch in Supervisor Mode */
+ msr CPSR_c, #ARM_MODE_SVC
+ 6c: e321f013 msr CPSR_c, #19
+
+ /*- Save scratch/used registers and LR in User Stack */
+ stmfd sp!, { r1-r3, r12, r14}
+ 70: e92d500e push {r1, r2, r3, ip, lr}
+
+ /*- Branch to the routine pointed by the AIC_IVR */
+ mov r14, pc
+ 74: e1a0e00f mov lr, pc
+ bx r0
+ 78: e12fff10 bx r0
+
+ /*- Restore scratch/used registers and LR from User Stack*/
+ ldmia sp!, { r1-r3, r12, r14}
+ 7c: e8bd500e pop {r1, r2, r3, ip, lr}
+
+ /*- Disable Interrupt and switch back in IRQ mode */
+ msr CPSR_c, #I_BIT | ARM_MODE_IRQ
+ 80: e321f092 msr CPSR_c, #146 ; 0x92
+
+ /*- Mark the End of Interrupt on the AIC */
+ ldr r14, =AT91C_BASE_AIC
+ 84: e59fe124 ldr lr, [pc, #292] ; 1b0
+ str r14, [r14, #AIC_EOICR]
+ 88: e58ee130 str lr, [lr, #304] ; 0x130
+
+ /*- Restore SPSR_irq and r0 from IRQ stack */
+ ldmia sp!, {r0}
+ 8c: e49d0004 pop {r0} ; (ldr r0, [sp], #4)
+
+ /*- Restore SPSR_irq and r0 from IRQ stack */
+ ldmia sp!, {r14}
+ 90: e49de004 pop {lr} ; (ldr lr, [sp], #4)
+ msr SPSR_cxsf, r14
+ 94: e16ff00e msr SPSR_fsxc, lr
+
+ /*- Restore adjusted LR_irq from IRQ stack directly in the PC */
+ ldmia sp!, {pc}^
+ 98: e8fd8000 ldm sp!, {pc}^
+
+0000009c <.RAM_TOP>:
+ 9c: 00208000 .word 0x00208000
+
+000000a0 :
+/*------------------------------------------------------------------------------*/
+ .extern AT91F_LowLevelInit
+/*- minumum C initialization */
+/*- call AT91F_LowLevelInit( void) */
+
+ ldr r13,.RAM_TOP /* temporary stack in internal RAM */
+ a0: e51fd00c ldr sp, [pc, #-12] ; 9c <.RAM_TOP>
+/*--Call Low level init function in ABSOLUTE through the Interworking */
+ ldr r0,=AT91F_LowLevelInit
+ a4: e59f0108 ldr r0, [pc, #264] ; 1b4
+ mov lr, pc
+ a8: e1a0e00f mov lr, pc
+ bx r0
+ ac: e12fff10 bx r0
+
+
+/*------------------------------------------------------------------------------
+//*- Setup the stack for each mode
+//*-------------------------------*/
+ mov r0,r13
+ b0: e1a0000d mov r0, sp
+
+/*- Set up Fast Interrupt Mode and set FIQ Mode Stack*/
+ msr CPSR_c, #ARM_MODE_FIQ | I_BIT | F_BIT
+ b4: e321f0d1 msr CPSR_c, #209 ; 0xd1
+ mov r13, r0
+ b8: e1a0d000 mov sp, r0
+ sub r0, r0, #FIQ_Stack_Size
+ bc: e2400b01 sub r0, r0, #1024 ; 0x400
+
+/*- Init the FIQ register*/
+ ldr r8, =AT91C_BASE_AIC
+ c0: e59f80e8 ldr r8, [pc, #232] ; 1b0
+
+/*- Set up Interrupt Mode and set IRQ Mode Stack*/
+ msr CPSR_c, #ARM_MODE_IRQ | I_BIT | F_BIT
+ c4: e321f0d2 msr CPSR_c, #210 ; 0xd2
+ mov r13, r0 /* Init stack IRQ */
+ c8: e1a0d000 mov sp, r0
+ sub r0, r0, #IRQ_Stack_Size
+ cc: e2400b01 sub r0, r0, #1024 ; 0x400
+
+/*- Set up Supervisor Mode and set Supervisor Mode Stack*/
+ msr CPSR_c, #ARM_MODE_SVC | I_BIT | F_BIT
+ d0: e321f0d3 msr CPSR_c, #211 ; 0xd3
+ mov r13, r0 /* Init stack Sup */
+ d4: e1a0d000 mov sp, r0
+
+/* - Enable Interrupts and FIQ */
+ msr CPSR_c, #ARM_MODE_SVC
+ d8: e321f013 msr CPSR_c, #19
+
+#ifdef CONFIG_DFU_MAGIC
+ ldr r1, =AT91C_RSTC_RSR
+ dc: e59f10d4 ldr r1, [pc, #212] ; 1b8
+ ldr r2, [r1]
+ e0: e5912000 ldr r2, [r1]
+ #and r2, r2, AT91C_RSTC_RSTTYP
+ tst r2, #AT91C_RSTC_RSTTYP_SOFTWARE
+ e4: e3120c03 tst r2, #768 ; 0x300
+ beq dfu_magic_end
+ e8: 0a000003 beq fc
+
+ ldr r1, =dfu_state
+ ec: e59f10c8 ldr r1, [pc, #200] ; 1bc
+ ldr r2, [r1]
+ f0: e5912000 ldr r2, [r1]
+ cmp r2, #DFU_STATE_appDETACH
+ f4: e3520001 cmp r2, #1
+ beq _reloc_dfu
+ f8: 0a000011 beq 144 <_reloc_dfu>
+
+000000fc :
+dfu_magic_end:
+#endif
+
+# Relocate DFU .data.shared section (Copy from ROM to RAM)
+ LDR R1, =_etext
+ fc: e59f10bc ldr r1, [pc, #188] ; 1c0
+ LDR R2, =_data_shared
+ 100: e59f20bc ldr r2, [pc, #188] ; 1c4
+ LDR R3, =_edata_shared
+ 104: e59f30bc ldr r3, [pc, #188] ; 1c8
+
+00000108 :
+LoopRelDS: CMP R2, R3
+ 108: e1520003 cmp r2, r3
+ LDRLO R0, [R1], #4
+ 10c: 34910004 ldrcc r0, [r1], #4
+ STRLO R0, [R2], #4
+ 110: 34820004 strcc r0, [r2], #4
+ BLO LoopRelDS
+ 114: 3afffffb bcc 108
+ STRLO R0, [R1], #4
+ BLO LoopZI
+*/
+
+ /* prepare c function call to main */
+ mov r0, #0 /* argc = 0 */
+ 118: e3a00000 mov r0, #0
+ ldr lr, =exit
+ 11c: e59fe0a8 ldr lr, [pc, #168] ; 1cc
+ ldr r10, =0x00104000
+ 120: e3a0a941 mov sl, #1064960 ; 0x104000
+
+#ifdef CONFIG_DFU_SWITCH
+ /* check whether bootloader button is pressed */
+ ldr r1, =AT91C_PMC_PCER
+ 124: e59f10a4 ldr r1, [pc, #164] ; 1d0
+ mov r2, #(1 << AT91C_ID_PIOA)
+ 128: e3a02004 mov r2, #4
+ str r2, [r1]
+ 12c: e5812000 str r2, [r1]
+
+ ldr r1, =AT91C_BASE_PIOA
+ 130: e59f109c ldr r1, [pc, #156] ; 1d4
+ ldr r2, [r1, #PIOA_PDSR]
+ 134: e591203c ldr r2, [r1, #60] ; 0x3c
+ tst r2, #PIO_BOOTLDR
+ 138: e3120302 tst r2, #134217728 ; 0x8000000
+ bne _reloc_dfu
+ 13c: 1a000000 bne 144 <_reloc_dfu>
+#endif
+
+ bx r10
+ 140: e12fff1a bx sl
+
+00000144 <_reloc_dfu>:
+
+_reloc_dfu:
+ /* Relocate DFU .data section (Copy from ROM to RAM) */
+ LDR R1, =_data_flash
+ 144: e59f108c ldr r1, [pc, #140] ; 1d8
+ LDR R2, =_data
+ 148: e59f208c ldr r2, [pc, #140] ; 1dc
+ LDR R3, =_edata
+ 14c: e59f308c ldr r3, [pc, #140] ; 1e0
+
+00000150 :
+LoopRel: CMP R2, R3
+ 150: e1520003 cmp r2, r3
+ LDRLO R0, [R1], #4
+ 154: 34910004 ldrcc r0, [r1], #4
+ STRLO R0, [R2], #4
+ 158: 34820004 strcc r0, [r2], #4
+ BLO LoopRel
+ 15c: 3afffffb bcc 150
+
+ /* Clear DFU .bss section (Zero init) */
+ MOV R0, #0
+ 160: e3a00000 mov r0, #0
+ LDR R1, =__bss_start__
+ 164: e59f1078 ldr r1, [pc, #120] ; 1e4
+ LDR R2, =__bss_end__
+ 168: e59f2078 ldr r2, [pc, #120] ; 1e8
+
+0000016c :
+LoopZI: CMP R1, R2
+ 16c: e1510002 cmp r1, r2
+ STRLO R0, [R1], #4
+ 170: 34810004 strcc r0, [r1], #4
+ BLO LoopZI
+ 174: 3afffffc bcc 16c
+
+ /* relocate DFU .text into RAM */
+ ldr r1, =0x00100000
+ 178: e3a01601 mov r1, #1048576 ; 0x100000
+ ldr r2, =0x00200000
+ 17c: e3a02602 mov r2, #2097152 ; 0x200000
+ ldr r3, =_etext
+ 180: e59f3038 ldr r3, [pc, #56] ; 1c0
+ add r3, r3, r2
+ 184: e0833002 add r3, r3, r2
+
+00000188 :
+loop_rel_t: cmp r2, r3
+ 188: e1520003 cmp r2, r3
+ ldrlo r4, [r1], #4
+ 18c: 34914004 ldrcc r4, [r1], #4
+ strlo r4, [r2], #4
+ 190: 34824004 strcc r4, [r2], #4
+ blo loop_rel_t
+ 194: 3afffffb bcc 188
+ ldr r4, =_remap_call_dfu
+ 198: e59f404c ldr r4, [pc, #76] ; 1ec
+ bx r4
+ 19c: e12fff14 bx r4
+
+000001a0 :
+
+/* "exit" dummy to avoid sbrk write read etc. needed by the newlib default "exit" */
+ .global exit
+ .func exit
+exit:
+ b .
+ 1a0: eafffffe b 1a0
+
+000001a4 :
+//* This module is only linked if needed for closing files.
+//*---------------------------------------------------------------*/
+ .global AT91F_Default_FIQ_handler
+ .func AT91F_Default_FIQ_handler
+AT91F_Default_FIQ_handler:
+ b AT91F_Default_FIQ_handler
+ 1a4: eafffffe b 1a4
+
+000001a8 :
+ .endfunc
+
+ .global AT91F_Default_IRQ_handler
+ .func AT91F_Default_IRQ_handler
+AT91F_Default_IRQ_handler:
+ b AT91F_Default_IRQ_handler
+ 1a8: eafffffe b 1a8
+
+000001ac :
+ .endfunc
+
+ .global AT91F_Spurious_handler
+ .func AT91F_Spurious_handler
+AT91F_Spurious_handler:
+ b AT91F_Spurious_handler
+ 1ac: eafffffe b 1ac
+ 1b0: fffff000 .word 0xfffff000
+ 1b4: 000001f0 .word 0x000001f0
+ 1b8: fffffd04 .word 0xfffffd04
+ 1bc: 00200020 .word 0x00200020
+ 1c0: 00001ac0 .word 0x00001ac0
+ 1c4: 00200020 .word 0x00200020
+ 1c8: 00200028 .word 0x00200028
+ 1cc: 000001a0 .word 0x000001a0
+ 1d0: fffffc10 .word 0xfffffc10
+ 1d4: fffff400 .word 0xfffff400
+ 1d8: 00001ac8 .word 0x00001ac8
+ 1dc: 00201ac0 .word 0x00201ac0
+ 1e0: 00201ae4 .word 0x00201ae4
+ 1e4: 00201ae4 .word 0x00201ae4
+ 1e8: 00201bec .word 0x00201bec
+ 1ec: 00201ac0 .word 0x00201ac0
+
+000001f0 :
+//* this function can be use a Stack, depending the compilation
+//* optimization mode
+//*----------------------------------------------------------------------------
+void
+AT91F_LowLevelInit (void)
+{
+ 1f0: e24dd008 sub sp, sp, #8
+ volatile int i;
+
+ //* Debounce power supply
+ for(i=0;i<1024;i++);
+ 1f4: e3a03000 mov r3, #0
+ 1f8: ea000001 b 204
+ 1fc: e59d3004 ldr r3, [sp, #4]
+ 200: e2833001 add r3, r3, #1
+ 204: e58d3004 str r3, [sp, #4]
+ 208: e59d3004 ldr r3, [sp, #4]
+ 20c: e3530b01 cmp r3, #1024 ; 0x400
+ 210: bafffff9 blt 1fc
+
+ AT91PS_PMC pPMC = AT91C_BASE_PMC;
+ //* Set Flash Waite sate
+ // Single Cycle Access at Up to 30 MHz, or 40
+ // if MCK = 47923200 I have 50 Cycle for 1 usecond ( flied MC_FMR->FMCN
+ AT91C_BASE_MC->MC_FMR = ((AT91C_MC_FMCN) & (48 << 16)) | AT91C_MC_FWS_1FWS;
+ 214: e59f20c8 ldr r2, [pc, #200] ; 2e4
+ 218: e3e03000 mvn r3, #0
+ 21c: e503209f str r2, [r3, #-159] ; 0xffffff61
+
+ //* Set MCK at 47 923 200
+ // 1 Enabling the Main Oscillator:
+ // SCK = 1/32768 = 30.51 uSecond
+ // Start up time = 8 * 6 / SCK = 56 * 30.51 = 1,46484375 ms
+ pPMC->PMC_MOR = ((AT91C_CKGR_OSCOUNT) & (0x06 << 8)) | AT91C_CKGR_MOSCEN;
+ 220: e59f20c0 ldr r2, [pc, #192] ; 2e8
+ 224: e50323df str r2, [r3, #-991] ; 0xfffffc21
+ // Wait the startup time
+ while (!(pPMC->PMC_SR & AT91C_PMC_MOSCS));
+ 228: e3e03c03 mvn r3, #768 ; 0x300
+ 22c: e5132097 ldr r2, [r3, #-151] ; 0xffffff69
+ 230: e3120001 tst r2, #1
+ 234: 0afffffb beq 228
+#if 0
+ pPMC->PMC_PLLR = ((AT91C_CKGR_DIV & 0x05) |
+ (AT91C_CKGR_PLLCOUNT & (28 << 8)) |
+ (AT91C_CKGR_MUL & (25 << 16)));
+#else
+ pPMC->PMC_PLLR = ((AT91C_CKGR_DIV & 24) |
+ 238: e59f20ac ldr r2, [pc, #172] ; 2ec
+ 23c: e50320d3 str r2, [r3, #-211] ; 0xffffff2d
+ (AT91C_CKGR_PLLCOUNT & (28 << 8)) |
+ (AT91C_CKGR_MUL & (125 << 16)));
+#endif
+
+ // Wait the startup time
+ while (!(pPMC->PMC_SR & AT91C_PMC_LOCK));
+ 240: e3e03c03 mvn r3, #768 ; 0x300
+ 244: e5133097 ldr r3, [r3, #-151] ; 0xffffff69
+ 248: e3130004 tst r3, #4
+ 24c: 0afffffb beq 240
+ while (!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));
+ 250: e3e03c03 mvn r3, #768 ; 0x300
+ 254: e5132097 ldr r2, [r3, #-151] ; 0xffffff69
+ 258: e3120008 tst r2, #8
+ 25c: 0afffffb beq 250
+ // 4. Selection of Master Clock and Processor Clock
+ // select the PLL clock divided by 2
+ pPMC->PMC_MCKR = AT91C_PMC_PRES_CLK_2;
+ 260: e3a02004 mov r2, #4
+ 264: e50320cf str r2, [r3, #-207] ; 0xffffff31
+ while (!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));
+ 268: e3e03c03 mvn r3, #768 ; 0x300
+ 26c: e5132097 ldr r2, [r3, #-151] ; 0xffffff69
+ 270: e3120008 tst r2, #8
+ 274: 0afffffb beq 268
+
+ pPMC->PMC_MCKR |= AT91C_PMC_CSS_PLL_CLK;
+ 278: e51320cf ldr r2, [r3, #-207] ; 0xffffff31
+ 27c: e3822003 orr r2, r2, #3
+ 280: e50320cf str r2, [r3, #-207] ; 0xffffff31
+ while (!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));
+ 284: e3e03c03 mvn r3, #768 ; 0x300
+ 288: e5133097 ldr r3, [r3, #-151] ; 0xffffff69
+ 28c: e3130008 tst r3, #8
+ 290: 0afffffb beq 284
+
+ // Set up the default interrupts handler vectors
+ AT91C_BASE_AIC->AIC_SVR[0] = (int) AT91F_Default_FIQ_handler;
+ 294: e59f2054 ldr r2, [pc, #84] ; 2f0
+ 298: e3e03c0f mvn r3, #3840 ; 0xf00
+ 29c: e503207f str r2, [r3, #-127] ; 0xffffff81
+ for (i = 1; i < 31; i++)
+ 2a0: e3a03001 mov r3, #1
+ 2a4: ea000005 b 2c0
+ {
+ AT91C_BASE_AIC->AIC_SVR[i] = (int) AT91F_Default_IRQ_handler;
+ 2a8: e59d3004 ldr r3, [sp, #4]
+ 2ac: e59f2040 ldr r2, [pc, #64] ; 2f4
+ 2b0: e1a03103 lsl r3, r3, #2
+ 2b4: e5032f80 str r2, [r3, #-3968] ; 0xfffff080
+ pPMC->PMC_MCKR |= AT91C_PMC_CSS_PLL_CLK;
+ while (!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));
+
+ // Set up the default interrupts handler vectors
+ AT91C_BASE_AIC->AIC_SVR[0] = (int) AT91F_Default_FIQ_handler;
+ for (i = 1; i < 31; i++)
+ 2b8: e59d3004 ldr r3, [sp, #4]
+ 2bc: e2833001 add r3, r3, #1
+ 2c0: e58d3004 str r3, [sp, #4]
+ 2c4: e59d3004 ldr r3, [sp, #4]
+ 2c8: e353001e cmp r3, #30
+ 2cc: dafffff5 ble 2a8
+ {
+ AT91C_BASE_AIC->AIC_SVR[i] = (int) AT91F_Default_IRQ_handler;
+ }
+ AT91C_BASE_AIC->AIC_SPU = (int) AT91F_Spurious_handler;
+ 2d0: e59f2020 ldr r2, [pc, #32] ; 2f8
+ 2d4: e3e03c0f mvn r3, #3840 ; 0xf00
+ 2d8: e5832035 str r2, [r3, #53] ; 0x35
+
+}
+ 2dc: e28dd008 add sp, sp, #8
+ 2e0: e12fff1e bx lr
+ 2e4: 00300100 .word 0x00300100
+ 2e8: 00000601 .word 0x00000601
+ 2ec: 007d1c18 .word 0x007d1c18
+ 2f0: 000001a4 .word 0x000001a4
+ 2f4: 000001a8 .word 0x000001a8
+ 2f8: 000001ac .word 0x000001ac
+
+000002fc :
+static inline void AT91F_PDC_SetNextRx (
+ AT91PS_PDC pPDC, // \arg pointer to a PDC controller
+ unsigned char *address,// \arg address to the next bloc to be received
+ unsigned int bytes) // \arg number of bytes to be received
+{
+ pPDC->PDC_RNPR = (unsigned int) address;
+ 2fc: e5801010 str r1, [r0, #16]
+ pPDC->PDC_RNCR = bytes;
+ 300: e5802014 str r2, [r0, #20]
+}
+ 304: e12fff1e bx lr
+
+00000308 :
+static inline void AT91F_PDC_SetNextTx (
+ AT91PS_PDC pPDC, // \arg pointer to a PDC controller
+ const unsigned char *address,// \arg address to the next bloc to be transmitted
+ unsigned int bytes) // \arg number of bytes to be transmitted
+{
+ pPDC->PDC_TNPR = (unsigned int) address;
+ 308: e5801018 str r1, [r0, #24]
+ pPDC->PDC_TNCR = bytes;
+ 30c: e580201c str r2, [r0, #28]
+}
+ 310: e12fff1e bx lr
+
+00000314 :
+static inline void AT91F_PDC_SetRx (
+ AT91PS_PDC pPDC, // \arg pointer to a PDC controller
+ unsigned char *address,// \arg address to the next bloc to be received
+ unsigned int bytes) // \arg number of bytes to be received
+{
+ pPDC->PDC_RPR = (unsigned int) address;
+ 314: e5801000 str r1, [r0]
+ pPDC->PDC_RCR = bytes;
+ 318: e5802004 str r2, [r0, #4]
+}
+ 31c: e12fff1e bx lr
+
+00000320 :
+static inline void AT91F_PDC_SetTx (
+ AT91PS_PDC pPDC, // \arg pointer to a PDC controller
+ const unsigned char *address,// \arg address to the next bloc to be transmitted
+ unsigned int bytes) // \arg number of bytes to be transmitted
+{
+ pPDC->PDC_TPR = (unsigned int) address;
+ 320: e5801008 str r1, [r0, #8]
+ pPDC->PDC_TCR = bytes;
+ 324: e580200c str r2, [r0, #12]
+}
+ 328: e12fff1e bx lr
+
+0000032c :
+//* \brief Disable transmit
+//*----------------------------------------------------------------------------
+static inline void AT91F_PDC_DisableTx (
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ pPDC->PDC_PTCR = AT91C_PDC_TXTDIS;
+ 32c: e3a03c02 mov r3, #512 ; 0x200
+ 330: e5803020 str r3, [r0, #32]
+}
+ 334: e12fff1e bx lr
+
+00000338 :
+//* \brief Disable receive
+//*----------------------------------------------------------------------------
+static inline void AT91F_PDC_DisableRx (
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ pPDC->PDC_PTCR = AT91C_PDC_RXTDIS;
+ 338: e3a03002 mov r3, #2
+ 33c: e5803020 str r3, [r0, #32]
+}
+ 340: e12fff1e bx lr
+
+00000344 :
+//*----------------------------------------------------------------------------
+static inline unsigned int AT91F_CKGR_GetMainClock (
+ AT91PS_CKGR pCKGR, // \arg pointer to CKGR controller
+ unsigned int slowClock) // \arg slowClock in Hz
+{
+ return ((pCKGR->CKGR_MCFR & AT91C_CKGR_MAINF) * slowClock) >> 4;
+ 344: e5900004 ldr r0, [r0, #4]
+ 348: e1a00800 lsl r0, r0, #16
+ 34c: e1a00820 lsr r0, r0, #16
+ 350: e0000091 mul r0, r1, r0
+}
+ 354: e1a00220 lsr r0, r0, #4
+ 358: e12fff1e bx lr
+
+0000035c :
+ unsigned int oldHandler;
+ unsigned int mask ;
+
+ oldHandler = pAic->AIC_SVR[irq_id];
+
+ mask = 0x1 << irq_id ;
+ 35c: e3a0c001 mov ip, #1
+ 360: e1a0c11c lsl ip, ip, r1
+ AT91PS_AIC pAic, // \arg pointer to the AIC registers
+ unsigned int irq_id, // \arg interrupt number to initialize
+ unsigned int priority, // \arg priority to give to the interrupt
+ unsigned int src_type, // \arg activation and sense of activation
+ void (*newHandler) () ) // \arg address of the interrupt handler
+{
+ 364: e92d0070 push {r4, r5, r6}
+ unsigned int oldHandler;
+ unsigned int mask ;
+
+ oldHandler = pAic->AIC_SVR[irq_id];
+ 368: e2814020 add r4, r1, #32
+ 36c: e7905104 ldr r5, [r0, r4, lsl #2]
+
+ mask = 0x1 << irq_id ;
+ //* Disable the interrupt on the interrupt controller
+ pAic->AIC_IDCR = mask ;
+ //* Save the interrupt handler routine pointer and the interrupt priority
+ pAic->AIC_SVR[irq_id] = (unsigned int) newHandler ;
+ 370: e59d600c ldr r6, [sp, #12]
+ //* Store the Source Mode Register
+ pAic->AIC_SMR[irq_id] = src_type | priority ;
+ 374: e1833002 orr r3, r3, r2
+
+ oldHandler = pAic->AIC_SVR[irq_id];
+
+ mask = 0x1 << irq_id ;
+ //* Disable the interrupt on the interrupt controller
+ pAic->AIC_IDCR = mask ;
+ 378: e580c124 str ip, [r0, #292] ; 0x124
+ //* Save the interrupt handler routine pointer and the interrupt priority
+ pAic->AIC_SVR[irq_id] = (unsigned int) newHandler ;
+ 37c: e7806104 str r6, [r0, r4, lsl #2]
+ //* Store the Source Mode Register
+ pAic->AIC_SMR[irq_id] = src_type | priority ;
+ 380: e7803101 str r3, [r0, r1, lsl #2]
+ //* Clear the interrupt on the interrupt controller
+ pAic->AIC_ICCR = mask ;
+ 384: e580c128 str ip, [r0, #296] ; 0x128
+
+ return oldHandler;
+}
+ 388: e1a00005 mov r0, r5
+ 38c: e8bd0070 pop {r4, r5, r6}
+ 390: e12fff1e bx lr
+
+00000394 :
+ unsigned int *pVector, // \arg pointer to the AIC registers
+ void (*Handler) () ) // \arg Interrupt Handler
+{
+ unsigned int oldVector = *pVector;
+
+ if ((unsigned int) Handler == (unsigned int) AT91C_AIC_BRANCH_OPCODE)
+ 394: e59f2028 ldr r2, [pc, #40] ; 3c4
+//* \brief Configure vector handler
+//*----------------------------------------------------------------------------
+unsigned int AT91F_AIC_SetExceptionVector (
+ unsigned int *pVector, // \arg pointer to the AIC registers
+ void (*Handler) () ) // \arg Interrupt Handler
+{
+ 398: e1a03000 mov r3, r0
+ unsigned int oldVector = *pVector;
+
+ if ((unsigned int) Handler == (unsigned int) AT91C_AIC_BRANCH_OPCODE)
+ 39c: e1510002 cmp r1, r2
+ *pVector = (unsigned int) AT91C_AIC_BRANCH_OPCODE;
+ else
+ *pVector = (((((unsigned int) Handler) - ((unsigned int) pVector) - 0x8) >> 2) & 0x00FFFFFF) | 0xEA000000;
+ 3a0: 10632001 rsbne r2, r3, r1
+ 3a4: 12422008 subne r2, r2, #8
+ 3a8: 11a02122 lsrne r2, r2, #2
+ 3ac: 13c224ff bicne r2, r2, #-16777216 ; 0xff000000
+ 3b0: 138224ea orrne r2, r2, #-369098752 ; 0xea000000
+//*----------------------------------------------------------------------------
+unsigned int AT91F_AIC_SetExceptionVector (
+ unsigned int *pVector, // \arg pointer to the AIC registers
+ void (*Handler) () ) // \arg Interrupt Handler
+{
+ unsigned int oldVector = *pVector;
+ 3b4: e5900000 ldr r0, [r0]
+
+ if ((unsigned int) Handler == (unsigned int) AT91C_AIC_BRANCH_OPCODE)
+ *pVector = (unsigned int) AT91C_AIC_BRANCH_OPCODE;
+ 3b8: 05831000 streq r1, [r3]
+ else
+ *pVector = (((((unsigned int) Handler) - ((unsigned int) pVector) - 0x8) >> 2) & 0x00FFFFFF) | 0xEA000000;
+ 3bc: 15832000 strne r2, [r3]
+
+ return oldVector;
+}
+ 3c0: e12fff1e bx lr
+ 3c4: e51fff20 .word 0xe51fff20
+
+000003c8 :
+ void (*IrqHandler) (), // \arg Default IRQ vector exception
+ void (*FiqHandler) (), // \arg Default FIQ vector exception
+ void (*DefaultHandler) (), // \arg Default Handler set in ISR
+ void (*SpuriousHandler) (), // \arg Default Spurious Handler
+ unsigned int protectMode) // \arg Debug Control Register
+{
+ 3c8: e92d41f3 push {r0, r1, r4, r5, r6, r7, r8, lr}
+ 3cc: e1a04000 mov r4, r0
+ 3d0: e1a06001 mov r6, r1
+ 3d4: e1a08002 mov r8, r2
+ 3d8: e1a07003 mov r7, r3
+ int i;
+
+ // Disable all interrupts and set IVR to the default handler
+ for (i = 0; i < 32; ++i) {
+ 3dc: e3a05000 mov r5, #0
+//*----------------------------------------------------------------------------
+static inline void AT91F_AIC_DisableIt (
+ AT91PS_AIC pAic, // \arg pointer to the AIC registers
+ unsigned int irq_id ) // \arg interrupt number to initialize
+{
+ unsigned int mask = 0x1 << irq_id;
+ 3e0: e3a03001 mov r3, #1
+ 3e4: e1a03513 lsl r3, r3, r5
+ AT91F_AIC_DisableIt(pAic, i);
+ AT91F_AIC_ConfigureIt(pAic, i, AT91C_AIC_PRIOR_LOWEST, AT91C_AIC_SRCTYPE_HIGH_LEVEL, DefaultHandler);
+ 3e8: e1a01005 mov r1, r5
+ //* Disable the interrupt on the interrupt controller
+ pAic->AIC_IDCR = mask ;
+ 3ec: e5843124 str r3, [r4, #292] ; 0x124
+ 3f0: e1a00004 mov r0, r4
+ //* Clear the interrupt on the Interrupt Controller ( if one is pending )
+ pAic->AIC_ICCR = mask ;
+ 3f4: e5843128 str r3, [r4, #296] ; 0x128
+ 3f8: e3a02000 mov r2, #0
+ 3fc: e3a03040 mov r3, #64 ; 0x40
+ unsigned int protectMode) // \arg Debug Control Register
+{
+ int i;
+
+ // Disable all interrupts and set IVR to the default handler
+ for (i = 0; i < 32; ++i) {
+ 400: e2855001 add r5, r5, #1
+ AT91F_AIC_DisableIt(pAic, i);
+ AT91F_AIC_ConfigureIt(pAic, i, AT91C_AIC_PRIOR_LOWEST, AT91C_AIC_SRCTYPE_HIGH_LEVEL, DefaultHandler);
+ 404: e58d7000 str r7, [sp]
+ 408: ebffffd3 bl 35c
+ unsigned int protectMode) // \arg Debug Control Register
+{
+ int i;
+
+ // Disable all interrupts and set IVR to the default handler
+ for (i = 0; i < 32; ++i) {
+ 40c: e3550020 cmp r5, #32
+ 410: 1afffff2 bne 3e0
+ AT91F_AIC_DisableIt(pAic, i);
+ AT91F_AIC_ConfigureIt(pAic, i, AT91C_AIC_PRIOR_LOWEST, AT91C_AIC_SRCTYPE_HIGH_LEVEL, DefaultHandler);
+ }
+
+ // Set the IRQ exception vector
+ AT91F_AIC_SetExceptionVector((unsigned int *) 0x18, IrqHandler);
+ 414: e1a01006 mov r1, r6
+ 418: e3a00018 mov r0, #24
+ 41c: ebffffdc bl 394
+ // Set the Fast Interrupt exception vector
+ AT91F_AIC_SetExceptionVector((unsigned int *) 0x1C, FiqHandler);
+ 420: e3a0001c mov r0, #28
+ 424: e1a01008 mov r1, r8
+ 428: ebffffd9 bl 394
+
+ pAic->AIC_SPU = (unsigned int) SpuriousHandler;
+ 42c: e59d3020 ldr r3, [sp, #32]
+ 430: e5843134 str r3, [r4, #308] ; 0x134
+ pAic->AIC_DCR = protectMode;
+ 434: e59d3024 ldr r3, [sp, #36] ; 0x24
+ 438: e5843138 str r3, [r4, #312] ; 0x138
+}
+ 43c: e8bd41fc pop {r2, r3, r4, r5, r6, r7, r8, lr}
+ 440: e12fff1e bx lr
+
+00000444 :
+//*----------------------------------------------------------------------------
+//* \fn AT91F_PDC_Open
+//* \brief Open PDC: disable TX and RX reset transfer descriptors, re-enable RX and TX
+//*----------------------------------------------------------------------------
+void AT91F_PDC_Open(AT91PS_PDC pPDC) // \arg pointer to a PDC controller
+{
+ 444: e92d4010 push {r4, lr}
+ 448: e1a04000 mov r4, r0
+ //* Disable the RX and TX PDC transfer requests
+ AT91F_PDC_DisableRx(pPDC);
+ 44c: ebffffb9 bl 338
+ AT91F_PDC_DisableTx(pPDC);
+ 450: e1a00004 mov r0, r4
+ 454: ebffffb4 bl 32c
+
+ //* Reset all Counter register Next buffer first
+ AT91F_PDC_SetNextTx(pPDC, NULL, 0);
+ 458: e3a01000 mov r1, #0
+ 45c: e1a02001 mov r2, r1
+ 460: e1a00004 mov r0, r4
+ 464: ebffffa7 bl 308
+ AT91F_PDC_SetNextRx(pPDC, NULL, 0);
+ 468: e3a01000 mov r1, #0
+ 46c: e1a02001 mov r2, r1
+ 470: e1a00004 mov r0, r4
+ 474: ebffffa0 bl 2fc
+ AT91F_PDC_SetTx(pPDC, NULL, 0);
+ 478: e3a01000 mov r1, #0
+ 47c: e1a02001 mov r2, r1
+ 480: e1a00004 mov r0, r4
+ 484: ebffffa5 bl 320
+ AT91F_PDC_SetRx(pPDC, NULL, 0);
+ 488: e3a01000 mov r1, #0
+ 48c: e1a00004 mov r0, r4
+ 490: e1a02001 mov r2, r1
+ 494: ebffff9e bl 314
+//* \brief Enable receive
+//*----------------------------------------------------------------------------
+static inline void AT91F_PDC_EnableRx (
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ pPDC->PDC_PTCR = AT91C_PDC_RXTEN;
+ 498: e3a03001 mov r3, #1
+ 49c: e5843020 str r3, [r4, #32]
+//* \brief Enable transmit
+//*----------------------------------------------------------------------------
+static inline void AT91F_PDC_EnableTx (
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ pPDC->PDC_PTCR = AT91C_PDC_TXTEN;
+ 4a0: e28330ff add r3, r3, #255 ; 0xff
+ 4a4: e5843020 str r3, [r4, #32]
+
+ //* Enable the RX and TX PDC transfer requests
+ AT91F_PDC_EnableRx(pPDC);
+ AT91F_PDC_EnableTx(pPDC);
+}
+ 4a8: e8bd4010 pop {r4, lr}
+ 4ac: e12fff1e bx lr
+
+000004b0 :
+//*----------------------------------------------------------------------------
+//* \fn AT91F_PDC_Close
+//* \brief Close PDC: disable TX and RX reset transfer descriptors
+//*----------------------------------------------------------------------------
+void AT91F_PDC_Close(AT91PS_PDC pPDC) // \arg pointer to a PDC controller
+{
+ 4b0: e92d4010 push {r4, lr}
+ 4b4: e1a04000 mov r4, r0
+ //* Disable the RX and TX PDC transfer requests
+ AT91F_PDC_DisableRx(pPDC);
+ 4b8: ebffff9e bl 338
+ AT91F_PDC_DisableTx(pPDC);
+ 4bc: e1a00004 mov r0, r4
+ 4c0: ebffff99 bl 32c
+
+ //* Reset all Counter register Next buffer first
+ AT91F_PDC_SetNextTx(pPDC, NULL, 0);
+ 4c4: e3a01000 mov r1, #0
+ 4c8: e1a00004 mov r0, r4
+ 4cc: e1a02001 mov r2, r1
+ 4d0: ebffff8c bl 308
+ AT91F_PDC_SetNextRx(pPDC, NULL, 0);
+ 4d4: e3a01000 mov r1, #0
+ 4d8: e1a00004 mov r0, r4
+ 4dc: e1a02001 mov r2, r1
+ 4e0: ebffff85 bl 2fc
+ AT91F_PDC_SetTx(pPDC, NULL, 0);
+ 4e4: e3a01000 mov r1, #0
+ 4e8: e1a00004 mov r0, r4
+ 4ec: e1a02001 mov r2, r1
+ 4f0: ebffff8a bl 320
+ AT91F_PDC_SetRx(pPDC, NULL, 0);
+ 4f4: e3a01000 mov r1, #0
+ 4f8: e1a00004 mov r0, r4
+ 4fc: e1a02001 mov r2, r1
+
+}
+ 500: e8bd4010 pop {r4, lr}
+
+ //* Reset all Counter register Next buffer first
+ AT91F_PDC_SetNextTx(pPDC, NULL, 0);
+ AT91F_PDC_SetNextRx(pPDC, NULL, 0);
+ AT91F_PDC_SetTx(pPDC, NULL, 0);
+ AT91F_PDC_SetRx(pPDC, NULL, 0);
+ 504: eaffff82 b 314
+
+00000508 :
+ AT91PS_PDC pPDC,
+ const unsigned char *pBuffer,
+ unsigned int szBuffer,
+ const unsigned char *pNextBuffer,
+ unsigned int szNextBuffer )
+{
+ 508: e92d4038 push {r3, r4, r5, lr}
+ 50c: e1a05003 mov r5, r3
+//* \brief Test if the current transfer descriptor has been sent
+//*----------------------------------------------------------------------------
+static inline int AT91F_PDC_IsTxEmpty ( // \return return 1 if transfer is complete
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ return !(pPDC->PDC_TCR);
+ 510: e590300c ldr r3, [r0, #12]
+ if (AT91F_PDC_IsTxEmpty(pPDC)) {
+ 514: e3530000 cmp r3, #0
+ AT91PS_PDC pPDC,
+ const unsigned char *pBuffer,
+ unsigned int szBuffer,
+ const unsigned char *pNextBuffer,
+ unsigned int szNextBuffer )
+{
+ 518: e1a04000 mov r4, r0
+ if (AT91F_PDC_IsTxEmpty(pPDC)) {
+ 51c: 1a000006 bne 53c
+ //* Buffer and next buffer can be initialized
+ AT91F_PDC_SetTx(pPDC, pBuffer, szBuffer);
+ 520: ebffff7e bl 320
+ AT91F_PDC_SetNextTx(pPDC, pNextBuffer, szNextBuffer);
+ 524: e1a00004 mov r0, r4
+ 528: e1a01005 mov r1, r5
+ 52c: e59d2010 ldr r2, [sp, #16]
+ 530: ebffff74 bl 308
+ return 2;
+ 534: e3a00002 mov r0, #2
+ 538: ea000005 b 554
+//* \brief Test if the next transfer descriptor has been moved to the current td
+//*----------------------------------------------------------------------------
+static inline int AT91F_PDC_IsNextTxEmpty ( // \return return 1 if transfer is complete
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ return !(pPDC->PDC_TNCR);
+ 53c: e590301c ldr r3, [r0, #28]
+ }
+ else if (AT91F_PDC_IsNextTxEmpty(pPDC)) {
+ 540: e3530000 cmp r3, #0
+ AT91F_PDC_SetNextTx(pPDC, pBuffer, szBuffer);
+ return 1;
+ }
+ else {
+ //* All buffer are in use...
+ return 0;
+ 544: 13a00000 movne r0, #0
+ //* Buffer and next buffer can be initialized
+ AT91F_PDC_SetTx(pPDC, pBuffer, szBuffer);
+ AT91F_PDC_SetNextTx(pPDC, pNextBuffer, szNextBuffer);
+ return 2;
+ }
+ else if (AT91F_PDC_IsNextTxEmpty(pPDC)) {
+ 548: 1a000001 bne 554
+ //* Only one buffer can be initialized
+ AT91F_PDC_SetNextTx(pPDC, pBuffer, szBuffer);
+ 54c: ebffff6d bl 308
+ return 1;
+ 550: e3a00001 mov r0, #1
+ }
+ else {
+ //* All buffer are in use...
+ return 0;
+ }
+}
+ 554: e8bd4038 pop {r3, r4, r5, lr}
+ 558: e12fff1e bx lr
+
+0000055c :
+ AT91PS_PDC pPDC,
+ unsigned char *pBuffer,
+ unsigned int szBuffer,
+ unsigned char *pNextBuffer,
+ unsigned int szNextBuffer )
+{
+ 55c: e92d4038 push {r3, r4, r5, lr}
+ 560: e1a05003 mov r5, r3
+//* \brief Test if the current transfer descriptor has been filled
+//*----------------------------------------------------------------------------
+static inline int AT91F_PDC_IsRxEmpty ( // \return return 1 if transfer is complete
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ return !(pPDC->PDC_RCR);
+ 564: e5903004 ldr r3, [r0, #4]
+ if (AT91F_PDC_IsRxEmpty(pPDC)) {
+ 568: e3530000 cmp r3, #0
+ AT91PS_PDC pPDC,
+ unsigned char *pBuffer,
+ unsigned int szBuffer,
+ unsigned char *pNextBuffer,
+ unsigned int szNextBuffer )
+{
+ 56c: e1a04000 mov r4, r0
+ if (AT91F_PDC_IsRxEmpty(pPDC)) {
+ 570: 1a000006 bne 590
+ //* Buffer and next buffer can be initialized
+ AT91F_PDC_SetRx(pPDC, pBuffer, szBuffer);
+ 574: ebffff66 bl 314
+ AT91F_PDC_SetNextRx(pPDC, pNextBuffer, szNextBuffer);
+ 578: e1a00004 mov r0, r4
+ 57c: e1a01005 mov r1, r5
+ 580: e59d2010 ldr r2, [sp, #16]
+ 584: ebffff5c bl 2fc
+ return 2;
+ 588: e3a00002 mov r0, #2
+ 58c: ea000005 b 5a8
+//* \brief Test if the next transfer descriptor has been moved to the current td
+//*----------------------------------------------------------------------------
+static inline int AT91F_PDC_IsNextRxEmpty ( // \return return 1 if transfer is complete
+ AT91PS_PDC pPDC ) // \arg pointer to a PDC controller
+{
+ return !(pPDC->PDC_RNCR);
+ 590: e5903014 ldr r3, [r0, #20]
+ }
+ else if (AT91F_PDC_IsNextRxEmpty(pPDC)) {
+ 594: e3530000 cmp r3, #0
+ AT91F_PDC_SetNextRx(pPDC, pBuffer, szBuffer);
+ return 1;
+ }
+ else {
+ //* All buffer are in use...
+ return 0;
+ 598: 13a00000 movne r0, #0
+ //* Buffer and next buffer can be initialized
+ AT91F_PDC_SetRx(pPDC, pBuffer, szBuffer);
+ AT91F_PDC_SetNextRx(pPDC, pNextBuffer, szNextBuffer);
+ return 2;
+ }
+ else if (AT91F_PDC_IsNextRxEmpty(pPDC)) {
+ 59c: 1a000001 bne 5a8
+ //* Only one buffer can be initialized
+ AT91F_PDC_SetNextRx(pPDC, pBuffer, szBuffer);
+ 5a0: ebffff55 bl 2fc
+ return 1;
+ 5a4: e3a00001 mov r0, #1
+ }
+ else {
+ //* All buffer are in use...
+ return 0;
+ }
+}
+ 5a8: e8bd4038 pop {r3, r4, r5, lr}
+ 5ac: e12fff1e bx lr
+
+000005b0 :
+//*------------------------------------------------------------------------------
+unsigned int AT91F_PMC_GetMasterClock (
+ AT91PS_PMC pPMC, // \arg pointer to PMC controller
+ AT91PS_CKGR pCKGR, // \arg pointer to CKGR controller
+ unsigned int slowClock) // \arg slowClock in Hz
+{
+ 5b0: e92d4038 push {r3, r4, r5, lr}
+ 5b4: e1a03000 mov r3, r0
+ unsigned int reg = pPMC->PMC_MCKR;
+ 5b8: e5933030 ldr r3, [r3, #48] ; 0x30
+//*------------------------------------------------------------------------------
+unsigned int AT91F_PMC_GetMasterClock (
+ AT91PS_PMC pPMC, // \arg pointer to PMC controller
+ AT91PS_CKGR pCKGR, // \arg pointer to CKGR controller
+ unsigned int slowClock) // \arg slowClock in Hz
+{
+ 5bc: e1a00001 mov r0, r1
+ unsigned int reg = pPMC->PMC_MCKR;
+ unsigned int prescaler = (1 << ((reg & AT91C_PMC_PRES) >> 2));
+ 5c0: e203401c and r4, r3, #28
+ 5c4: e3a01001 mov r1, #1
+ unsigned int pllDivider, pllMultiplier;
+
+ switch (reg & AT91C_PMC_CSS) {
+ 5c8: e2033003 and r3, r3, #3
+ AT91PS_PMC pPMC, // \arg pointer to PMC controller
+ AT91PS_CKGR pCKGR, // \arg pointer to CKGR controller
+ unsigned int slowClock) // \arg slowClock in Hz
+{
+ unsigned int reg = pPMC->PMC_MCKR;
+ unsigned int prescaler = (1 << ((reg & AT91C_PMC_PRES) >> 2));
+ 5cc: e1a04124 lsr r4, r4, #2
+ unsigned int pllDivider, pllMultiplier;
+
+ switch (reg & AT91C_PMC_CSS) {
+ 5d0: e1530001 cmp r3, r1
+ AT91PS_PMC pPMC, // \arg pointer to PMC controller
+ AT91PS_CKGR pCKGR, // \arg pointer to CKGR controller
+ unsigned int slowClock) // \arg slowClock in Hz
+{
+ unsigned int reg = pPMC->PMC_MCKR;
+ unsigned int prescaler = (1 << ((reg & AT91C_PMC_PRES) >> 2));
+ 5d4: e1a04411 lsl r4, r1, r4
+ unsigned int pllDivider, pllMultiplier;
+
+ switch (reg & AT91C_PMC_CSS) {
+ 5d8: 0a000005 beq 5f4
+ case AT91C_PMC_CSS_SLOW_CLK: // Slow clock selected
+ return slowClock / prescaler;
+ 5dc: 31a00002 movcc r0, r2
+{
+ unsigned int reg = pPMC->PMC_MCKR;
+ unsigned int prescaler = (1 << ((reg & AT91C_PMC_PRES) >> 2));
+ unsigned int pllDivider, pllMultiplier;
+
+ switch (reg & AT91C_PMC_CSS) {
+ 5e0: 3a000010 bcc 628
+ 5e4: e3530003 cmp r3, #3
+ reg = pCKGR->CKGR_PLLR;
+ pllDivider = (reg & AT91C_CKGR_DIV);
+ pllMultiplier = ((reg & AT91C_CKGR_MUL) >> 16) + 1;
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / pllDivider * pllMultiplier / prescaler;
+ }
+ return 0;
+ 5e8: 13a00000 movne r0, #0
+{
+ unsigned int reg = pPMC->PMC_MCKR;
+ unsigned int prescaler = (1 << ((reg & AT91C_PMC_PRES) >> 2));
+ unsigned int pllDivider, pllMultiplier;
+
+ switch (reg & AT91C_PMC_CSS) {
+ 5ec: 1a00000f bne 630
+ 5f0: ea000002 b 600
+ case AT91C_PMC_CSS_SLOW_CLK: // Slow clock selected
+ return slowClock / prescaler;
+ case AT91C_PMC_CSS_MAIN_CLK: // Main clock is selected
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / prescaler;
+ 5f4: e1a01002 mov r1, r2
+ 5f8: ebffff51 bl 344
+ 5fc: ea000009 b 628
+ case AT91C_PMC_CSS_PLL_CLK: // PLLB clock is selected
+ reg = pCKGR->CKGR_PLLR;
+ 600: e590500c ldr r5, [r0, #12]
+ pllDivider = (reg & AT91C_CKGR_DIV);
+ pllMultiplier = ((reg & AT91C_CKGR_MUL) >> 16) + 1;
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / pllDivider * pllMultiplier / prescaler;
+ 604: e1a01002 mov r1, r2
+ 608: ebffff4d bl 344
+ return slowClock / prescaler;
+ case AT91C_PMC_CSS_MAIN_CLK: // Main clock is selected
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / prescaler;
+ case AT91C_PMC_CSS_PLL_CLK: // PLLB clock is selected
+ reg = pCKGR->CKGR_PLLR;
+ pllDivider = (reg & AT91C_CKGR_DIV);
+ 60c: e20510ff and r1, r5, #255 ; 0xff
+ pllMultiplier = ((reg & AT91C_CKGR_MUL) >> 16) + 1;
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / pllDivider * pllMultiplier / prescaler;
+ 610: eb0003d0 bl 1558 <__aeabi_uidiv>
+ case AT91C_PMC_CSS_MAIN_CLK: // Main clock is selected
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / prescaler;
+ case AT91C_PMC_CSS_PLL_CLK: // PLLB clock is selected
+ reg = pCKGR->CKGR_PLLR;
+ pllDivider = (reg & AT91C_CKGR_DIV);
+ pllMultiplier = ((reg & AT91C_CKGR_MUL) >> 16) + 1;
+ 614: e59f301c ldr r3, [pc, #28] ; 638
+ 618: e0053003 and r3, r5, r3
+ 61c: e1a03823 lsr r3, r3, #16
+ 620: e2833001 add r3, r3, #1
+ return AT91F_CKGR_GetMainClock(pCKGR, slowClock) / pllDivider * pllMultiplier / prescaler;
+ 624: e0000093 mul r0, r3, r0
+ 628: e1a01004 mov r1, r4
+ 62c: eb0003c9 bl 1558 <__aeabi_uidiv>
+ }
+ return 0;
+}
+ 630: e8bd4038 pop {r3, r4, r5, lr}
+ 634: e12fff1e bx lr
+ 638: 07ff0000 .word 0x07ff0000
+
+0000063c :
+//*--------------------------------------------------------------------------------------
+//* \fn AT91F_RTT_ReadValue()
+//* \brief Read the RTT value
+//*--------------------------------------------------------------------------------------
+unsigned int AT91F_RTTReadValue(AT91PS_RTTC pRTTC)
+{
+ 63c: e24dd008 sub sp, sp, #8
+ register volatile unsigned int val1,val2;
+ do
+ {
+ val1 = pRTTC->RTTC_RTVR;
+ 640: e5903008 ldr r3, [r0, #8]
+ 644: e58d3004 str r3, [sp, #4]
+ val2 = pRTTC->RTTC_RTVR;
+ 648: e5903008 ldr r3, [r0, #8]
+ 64c: e58d3000 str r3, [sp]
+ }
+ while(val1 != val2);
+ 650: e59d2004 ldr r2, [sp, #4]
+ 654: e59d3000 ldr r3, [sp]
+ 658: e1520003 cmp r2, r3
+ 65c: 1afffff7 bne 640
+ return(val1);
+ 660: e59d0004 ldr r0, [sp, #4]
+}
+ 664: e28dd008 add sp, sp, #8
+ 668: e12fff1e bx lr
+
+0000066c :
+//* \brief Close SPI: disable IT disable transfert, close PDC
+//*----------------------------------------------------------------------------
+void AT91F_SPI_Close(AT91PS_SPI pSPI) // \arg pointer to a SPI controller
+{
+ //* Reset all the Chip Select register
+ pSPI->SPI_CSR[0] = 0 ;
+ 66c: e3a03000 mov r3, #0
+//*----------------------------------------------------------------------------
+//* \fn AT91F_SPI_Close
+//* \brief Close SPI: disable IT disable transfert, close PDC
+//*----------------------------------------------------------------------------
+void AT91F_SPI_Close(AT91PS_SPI pSPI) // \arg pointer to a SPI controller
+{
+ 670: e92d4010 push {r4, lr}
+ //* Reset all the Chip Select register
+ pSPI->SPI_CSR[0] = 0 ;
+ 674: e5803030 str r3, [r0, #48] ; 0x30
+ pSPI->SPI_CSR[1] = 0 ;
+ 678: e5803034 str r3, [r0, #52] ; 0x34
+ pSPI->SPI_CSR[2] = 0 ;
+ 67c: e5803038 str r3, [r0, #56] ; 0x38
+ pSPI->SPI_CSR[3] = 0 ;
+ 680: e580303c str r3, [r0, #60] ; 0x3c
+
+ //* Reset the SPI mode
+ pSPI->SPI_MR = 0 ;
+ 684: e5803004 str r3, [r0, #4]
+
+ //* Disable all interrupts
+ pSPI->SPI_IDR = 0xFFFFFFFF ;
+ 688: e3e03000 mvn r3, #0
+ 68c: e5803018 str r3, [r0, #24]
+//*----------------------------------------------------------------------------
+//* \fn AT91F_SPI_Close
+//* \brief Close SPI: disable IT disable transfert, close PDC
+//*----------------------------------------------------------------------------
+void AT91F_SPI_Close(AT91PS_SPI pSPI) // \arg pointer to a SPI controller
+{
+ 690: e1a04000 mov r4, r0
+
+ //* Disable all interrupts
+ pSPI->SPI_IDR = 0xFFFFFFFF ;
+
+ //* Abort the Peripheral Data Transfers
+ AT91F_PDC_Close((AT91PS_PDC) &(pSPI->SPI_RPR));
+ 694: e2800c01 add r0, r0, #256 ; 0x100
+ 698: ebffff84 bl 4b0
+
+ //* Disable receiver and transmitter and stop any activity immediately
+ pSPI->SPI_CR = AT91C_SPI_SPIDIS;
+ 69c: e3a03002 mov r3, #2
+ 6a0: e5843000 str r3, [r4]
+}
+ 6a4: e8bd4010 pop {r4, lr}
+ 6a8: e12fff1e bx lr
+
+000006ac :
+ AT91PS_ADC pADC, // pointer to a ADC controller
+ unsigned int mck_clock, // in MHz
+ unsigned int adc_clock, // in MHz
+ unsigned int startup_time, // in us
+ unsigned int sample_and_hold_time) // in ns
+{
+ 6ac: e92d40f8 push {r3, r4, r5, r6, r7, lr}
+ 6b0: e1a04000 mov r4, r0
+ unsigned int prescal,startup,shtim;
+
+ prescal = mck_clock/(2*adc_clock) - 1;
+ 6b4: e1a00001 mov r0, r1
+ 6b8: e1a01082 lsl r1, r2, #1
+ startup = adc_clock*startup_time/8 - 1;
+ 6bc: e0070392 mul r7, r2, r3
+ AT91PS_ADC pADC, // pointer to a ADC controller
+ unsigned int mck_clock, // in MHz
+ unsigned int adc_clock, // in MHz
+ unsigned int startup_time, // in us
+ unsigned int sample_and_hold_time) // in ns
+{
+ 6c0: e1a05002 mov r5, r2
+ unsigned int prescal,startup,shtim;
+
+ prescal = mck_clock/(2*adc_clock) - 1;
+ 6c4: eb0003a3 bl 1558 <__aeabi_uidiv>
+ 6c8: e2406001 sub r6, r0, #1
+ startup = adc_clock*startup_time/8 - 1;
+ shtim = adc_clock*sample_and_hold_time/1000 - 1;
+ 6cc: e59d0018 ldr r0, [sp, #24]
+ 6d0: e3a01ffa mov r1, #1000 ; 0x3e8
+ 6d4: e0000095 mul r0, r5, r0
+ 6d8: eb00039e bl 1558 <__aeabi_uidiv>
+ unsigned int sample_and_hold_time) // in ns
+{
+ unsigned int prescal,startup,shtim;
+
+ prescal = mck_clock/(2*adc_clock) - 1;
+ startup = adc_clock*startup_time/8 - 1;
+ 6dc: e1a071a7 lsr r7, r7, #3
+ 6e0: e2477001 sub r7, r7, #1
+ shtim = adc_clock*sample_and_hold_time/1000 - 1;
+
+ //* Write to the MR register
+ pADC->ADC_MR = ( (prescal<<8) & AT91C_ADC_PRESCAL) | ( (startup<<16) & AT91C_ADC_STARTUP) | ( (shtim<<24) & AT91C_ADC_SHTIM);
+ 6e4: e1a07807 lsl r7, r7, #16
+ 6e8: e1a06406 lsl r6, r6, #8
+{
+ unsigned int prescal,startup,shtim;
+
+ prescal = mck_clock/(2*adc_clock) - 1;
+ startup = adc_clock*startup_time/8 - 1;
+ shtim = adc_clock*sample_and_hold_time/1000 - 1;
+ 6ec: e2403001 sub r3, r0, #1
+
+ //* Write to the MR register
+ pADC->ADC_MR = ( (prescal<<8) & AT91C_ADC_PRESCAL) | ( (startup<<16) & AT91C_ADC_STARTUP) | ( (shtim<<24) & AT91C_ADC_SHTIM);
+ 6f0: e207781f and r7, r7, #2031616 ; 0x1f0000
+ 6f4: e2066c3f and r6, r6, #16128 ; 0x3f00
+ 6f8: e1a03c03 lsl r3, r3, #24
+ 6fc: e1876006 orr r6, r7, r6
+ 700: e203340f and r3, r3, #251658240 ; 0xf000000
+ 704: e1866003 orr r6, r6, r3
+ 708: e5846004 str r6, [r4, #4]
+}
+ 70c: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
+ 710: e12fff1e bx lr
+
+00000714 :
+ unsigned int mainClock, // \arg peripheral clock
+ unsigned int speed) // \arg SSC baudrate
+{
+ unsigned int baud_value;
+ //* Define the baud rate divisor register
+ if (speed == 0)
+ 714: e3520000 cmp r2, #0
+//*----------------------------------------------------------------------------
+void AT91F_SSC_SetBaudrate (
+ AT91PS_SSC pSSC, // \arg pointer to a SSC controller
+ unsigned int mainClock, // \arg peripheral clock
+ unsigned int speed) // \arg SSC baudrate
+{
+ 718: e92d4070 push {r4, r5, r6, lr}
+ 71c: e1a04000 mov r4, r0
+ unsigned int baud_value;
+ //* Define the baud rate divisor register
+ if (speed == 0)
+ baud_value = 0;
+ 720: 01a00002 moveq r0, r2
+ unsigned int mainClock, // \arg peripheral clock
+ unsigned int speed) // \arg SSC baudrate
+{
+ unsigned int baud_value;
+ //* Define the baud rate divisor register
+ if (speed == 0)
+ 724: 0a000010 beq 76c
+ baud_value = 0;
+ else
+ {
+ baud_value = (unsigned int) (mainClock * 10)/(2*speed);
+ 728: e3a0500a mov r5, #10
+ 72c: e0000195 mul r0, r5, r1
+ 730: e1a01082 lsl r1, r2, #1
+ 734: eb000387 bl 1558 <__aeabi_uidiv>
+ if ((baud_value % 10) >= 5)
+ 738: e1a01005 mov r1, r5
+ //* Define the baud rate divisor register
+ if (speed == 0)
+ baud_value = 0;
+ else
+ {
+ baud_value = (unsigned int) (mainClock * 10)/(2*speed);
+ 73c: e1a06000 mov r6, r0
+ if ((baud_value % 10) >= 5)
+ 740: eb0003c1 bl 164c <__aeabi_uidivmod>
+ 744: e3510004 cmp r1, #4
+ 748: 9a000004 bls 760
+ baud_value = (baud_value / 10) + 1;
+ 74c: e1a00006 mov r0, r6
+ 750: e1a01005 mov r1, r5
+ 754: eb00037f bl 1558 <__aeabi_uidiv>
+ 758: e2800001 add r0, r0, #1
+ 75c: ea000002 b 76c
+ else
+ baud_value /= 10;
+ 760: e1a00006 mov r0, r6
+ 764: e1a01005 mov r1, r5
+ 768: eb00037a bl 1558 <__aeabi_uidiv>
+ }
+
+ pSSC->SSC_CMR = baud_value;
+ 76c: e5840004 str r0, [r4, #4]
+}
+ 770: e8bd4070 pop {r4, r5, r6, lr}
+ 774: e12fff1e bx lr
+
+00000778 :
+ unsigned int baud_rate, // \arg Expected Baud Rate Frequency
+ unsigned int clock_rx, // \arg Receiver Clock Parameters
+ unsigned int mode_rx, // \arg mode Register to be programmed
+ unsigned int clock_tx, // \arg Transmitter Clock Parameters
+ unsigned int mode_tx) // \arg mode Register to be programmed
+{
+ 778: e92d41f0 push {r4, r5, r6, r7, r8, lr}
+ 77c: e1a08003 mov r8, r3
+ //* Disable interrupts
+ pSSC->SSC_IDR = (unsigned int) -1;
+ 780: e3e03000 mvn r3, #0
+ 784: e5803048 str r3, [r0, #72] ; 0x48
+
+ //* Reset receiver and transmitter
+ pSSC->SSC_CR = AT91C_SSC_SWRST | AT91C_SSC_RXDIS | AT91C_SSC_TXDIS ;
+ 788: e59f3030 ldr r3, [pc, #48] ; 7c0
+ 78c: e5803000 str r3, [r0]
+ unsigned int baud_rate, // \arg Expected Baud Rate Frequency
+ unsigned int clock_rx, // \arg Receiver Clock Parameters
+ unsigned int mode_rx, // \arg mode Register to be programmed
+ unsigned int clock_tx, // \arg Transmitter Clock Parameters
+ unsigned int mode_tx) // \arg mode Register to be programmed
+{
+ 790: e1a04000 mov r4, r0
+ 794: e28d6018 add r6, sp, #24
+ 798: e89600c0 ldm r6, {r6, r7}
+ 79c: e59d5020 ldr r5, [sp, #32]
+
+ //* Reset receiver and transmitter
+ pSSC->SSC_CR = AT91C_SSC_SWRST | AT91C_SSC_RXDIS | AT91C_SSC_TXDIS ;
+
+ //* Define the Clock Mode Register
+ AT91F_SSC_SetBaudrate(pSSC, syst_clock, baud_rate);
+ 7a0: ebffffdb bl 714
+
+ //* Write the Transmit Frame Mode Register
+ pSSC->SSC_TFMR = mode_tx;
+
+ //* Clear Transmit and Receive Counters
+ AT91F_PDC_Open((AT91PS_PDC) &(pSSC->SSC_RPR));
+ 7a4: e2840c01 add r0, r4, #256 ; 0x100
+
+ //* Define the Clock Mode Register
+ AT91F_SSC_SetBaudrate(pSSC, syst_clock, baud_rate);
+
+ //* Write the Receive Clock Mode Register
+ pSSC->SSC_RCMR = clock_rx;
+ 7a8: e5848010 str r8, [r4, #16]
+
+ //* Write the Transmit Clock Mode Register
+ pSSC->SSC_TCMR = clock_tx;
+ 7ac: e5847018 str r7, [r4, #24]
+
+ //* Write the Receive Frame Mode Register
+ pSSC->SSC_RFMR = mode_rx;
+ 7b0: e5846014 str r6, [r4, #20]
+
+ //* Write the Transmit Frame Mode Register
+ pSSC->SSC_TFMR = mode_tx;
+ 7b4: e584501c str r5, [r4, #28]
+
+ //* Clear Transmit and Receive Counters
+ AT91F_PDC_Open((AT91PS_PDC) &(pSSC->SSC_RPR));
+
+
+}
+ 7b8: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
+
+ //* Write the Transmit Frame Mode Register
+ pSSC->SSC_TFMR = mode_tx;
+
+ //* Clear Transmit and Receive Counters
+ AT91F_PDC_Open((AT91PS_PDC) &(pSSC->SSC_RPR));
+ 7bc: eaffff20 b 444
+ 7c0: 00008202 .word 0x00008202
+
+000007c4 :
+ AT91PS_USART pUSART, // \arg pointer to a USART controller
+ unsigned int mainClock, // \arg peripheral clock
+ unsigned int mode , // \arg mode Register to be programmed
+ unsigned int baudRate , // \arg baudrate to be programmed
+ unsigned int timeguard ) // \arg timeguard to be programmed
+{
+ 7c4: e92d40f8 push {r3, r4, r5, r6, r7, lr}
+ 7c8: e1a06002 mov r6, r2
+ //* Disable interrupts
+ pUSART->US_IDR = (unsigned int) -1;
+ 7cc: e3e02000 mvn r2, #0
+ 7d0: e580200c str r2, [r0, #12]
+//*----------------------------------------------------------------------------
+static inline unsigned int AT91F_US_Baudrate (
+ const unsigned int main_clock, // \arg peripheral clock
+ const unsigned int baud_rate) // \arg UART baudrate
+{
+ unsigned int baud_value = ((main_clock*10)/(baud_rate * 16));
+ 7d4: e3a0500a mov r5, #10
+
+ //* Reset receiver and transmitter
+ pUSART->US_CR = AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS ;
+ 7d8: e28220ad add r2, r2, #173 ; 0xad
+ 7dc: e5802000 str r2, [r0]
+ AT91PS_USART pUSART, // \arg pointer to a USART controller
+ unsigned int mainClock, // \arg peripheral clock
+ unsigned int mode , // \arg mode Register to be programmed
+ unsigned int baudRate , // \arg baudrate to be programmed
+ unsigned int timeguard ) // \arg timeguard to be programmed
+{
+ 7e0: e1a04000 mov r4, r0
+ 7e4: e0000195 mul r0, r5, r1
+ 7e8: e1a01203 lsl r1, r3, #4
+ 7ec: eb000359 bl 1558 <__aeabi_uidiv>
+ if ((baud_value % 10) >= 5)
+ 7f0: e1a01005 mov r1, r5
+//*----------------------------------------------------------------------------
+static inline unsigned int AT91F_US_Baudrate (
+ const unsigned int main_clock, // \arg peripheral clock
+ const unsigned int baud_rate) // \arg UART baudrate
+{
+ unsigned int baud_value = ((main_clock*10)/(baud_rate * 16));
+ 7f4: e1a07000 mov r7, r0
+ if ((baud_value % 10) >= 5)
+ 7f8: eb000393 bl 164c <__aeabi_uidivmod>
+ 7fc: e3510004 cmp r1, #4
+ 800: 9a000004 bls 818
+ baud_value = (baud_value / 10) + 1;
+ 804: e1a00007 mov r0, r7
+ 808: e1a01005 mov r1, r5
+ 80c: eb000351 bl 1558 <__aeabi_uidiv>
+ 810: e2800001 add r0, r0, #1
+ 814: ea000002 b 824
+ else
+ baud_value /= 10;
+ 818: e1a00007 mov r0, r7
+ 81c: e1a01005 mov r1, r5
+ 820: eb00034c bl 1558 <__aeabi_uidiv>
+static inline void AT91F_US_SetTimeguard (
+ AT91PS_USART pUSART, // \arg pointer to a USART controller
+ unsigned int timeguard) // \arg timeguard value
+{
+ //* Write the Timeguard Register
+ pUSART->US_TTGR = timeguard ;
+ 824: e59d3018 ldr r3, [sp, #24]
+ AT91PS_USART pUSART, // \arg pointer to a USART controller
+ unsigned int mainClock, // \arg peripheral clock
+ unsigned int speed) // \arg UART baudrate
+{
+ //* Define the baud rate divisor register
+ pUSART->US_BRGR = AT91F_US_Baudrate(mainClock, speed);
+ 828: e5840020 str r0, [r4, #32]
+static inline void AT91F_US_SetTimeguard (
+ AT91PS_USART pUSART, // \arg pointer to a USART controller
+ unsigned int timeguard) // \arg timeguard value
+{
+ //* Write the Timeguard Register
+ pUSART->US_TTGR = timeguard ;
+ 82c: e5843028 str r3, [r4, #40] ; 0x28
+
+ //* Write the Timeguard Register
+ AT91F_US_SetTimeguard(pUSART, timeguard);
+
+ //* Clear Transmit and Receive Counters
+ AT91F_PDC_Open((AT91PS_PDC) &(pUSART->US_RPR));
+ 830: e2840c01 add r0, r4, #256 ; 0x100
+ 834: ebffff02 bl 444
+
+ //* Define the USART mode
+ pUSART->US_MR = mode ;
+ 838: e5846004 str r6, [r4, #4]
+
+}
+ 83c: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
+ 840: e12fff1e bx lr
+
+00000844 :
+//* \brief Close USART: disable IT disable receiver and transmitter, close PDC
+//*----------------------------------------------------------------------------
+void AT91F_US_Close(AT91PS_USART pUSART) // \arg pointer to a USART controller
+{
+ //* Reset the baud rate divisor register
+ pUSART->US_BRGR = 0 ;
+ 844: e3a03000 mov r3, #0
+//*----------------------------------------------------------------------------
+//* \fn AT91F_US_Close
+//* \brief Close USART: disable IT disable receiver and transmitter, close PDC
+//*----------------------------------------------------------------------------
+void AT91F_US_Close(AT91PS_USART pUSART) // \arg pointer to a USART controller
+{
+ 848: e92d4010 push {r4, lr}
+ //* Reset the baud rate divisor register
+ pUSART->US_BRGR = 0 ;
+ 84c: e5803020 str r3, [r0, #32]
+
+ //* Reset the USART mode
+ pUSART->US_MR = 0 ;
+ 850: e5803004 str r3, [r0, #4]
+
+ //* Reset the Timeguard Register
+ pUSART->US_TTGR = 0;
+ 854: e5803028 str r3, [r0, #40] ; 0x28
+
+ //* Disable all interrupts
+ pUSART->US_IDR = 0xFFFFFFFF ;
+ 858: e3e03000 mvn r3, #0
+ 85c: e580300c str r3, [r0, #12]
+//*----------------------------------------------------------------------------
+//* \fn AT91F_US_Close
+//* \brief Close USART: disable IT disable receiver and transmitter, close PDC
+//*----------------------------------------------------------------------------
+void AT91F_US_Close(AT91PS_USART pUSART) // \arg pointer to a USART controller
+{
+ 860: e1a04000 mov r4, r0
+
+ //* Disable all interrupts
+ pUSART->US_IDR = 0xFFFFFFFF ;
+
+ //* Abort the Peripheral Data Transfers
+ AT91F_PDC_Close((AT91PS_PDC) &(pUSART->US_RPR));
+ 864: e2800c01 add r0, r0, #256 ; 0x100
+ 868: ebffff10 bl 4b0
+
+ //* Disable receiver and transmitter and stop any activity immediately
+ pUSART->US_CR = AT91C_US_TXDIS | AT91C_US_RXDIS | AT91C_US_RSTTX | AT91C_US_RSTRX ;
+ 86c: e3a030ac mov r3, #172 ; 0xac
+ 870: e5843000 str r3, [r4]
+}
+ 874: e8bd4010 pop {r4, lr}
+ 878: e12fff1e bx lr
+
+0000087c :
+ AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4);
+}
+
+/* Send Data through the control endpoint */
+static void __dfufunc udp_ep0_send_data(const char *pData, u_int32_t length)
+{
+ 87c: e92d0033 push {r0, r1, r4, r5}
+ AT91_REG csr;
+
+ DEBUGE("send_data: %u bytes ", length);
+
+ do {
+ cpt = MIN(length, 8);
+ 880: e3510008 cmp r1, #8
+ 884: 31a02001 movcc r2, r1
+ 888: 23a02008 movcs r2, #8
+ 88c: e1a0c002 mov ip, r2
+ length -= cpt;
+
+ while (cpt--)
+ 890: e1a04000 mov r4, r0
+ 894: ea000001 b 8a0
+ pUdp->UDP_FDR[0] = *pData++;
+ 898: e4d45001 ldrb r5, [r4], #1
+ 89c: e50350af str r5, [r3, #-175] ; 0xffffff51
+
+ do {
+ cpt = MIN(length, 8);
+ length -= cpt;
+
+ while (cpt--)
+ 8a0: e24cc001 sub ip, ip, #1
+ 8a4: e37c0001 cmn ip, #1
+ 8a8: e59f30a4 ldr r3, [pc, #164] ; 954
+ 8ac: 1afffff9 bne 898
+ pUdp->UDP_FDR[0] = *pData++;
+
+ if (pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP) {
+ 8b0: e513c0cf ldr ip, [r3, #-207] ; 0xffffff31
+ 8b4: e31c0001 tst ip, #1
+
+ do {
+ cpt = MIN(length, 8);
+ length -= cpt;
+
+ while (cpt--)
+ 8b8: e0800002 add r0, r0, r2
+ pUdp->UDP_FDR[0] = *pData++;
+
+ if (pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP) {
+ 8bc: 0a000006 beq 8dc
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_TXCOMP);
+ 8c0: e513c0cf ldr ip, [r3, #-207] ; 0xffffff31
+ 8c4: e3ccc001 bic ip, ip, #1
+ 8c8: e503c0cf str ip, [r3, #-207] ; 0xffffff31
+ while (pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP) ;
+ 8cc: e59f3080 ldr r3, [pc, #128] ; 954
+ 8d0: e51330cf ldr r3, [r3, #-207] ; 0xffffff31
+ 8d4: e3130001 tst r3, #1
+ 8d8: 1afffffb bne 8cc
+ }
+
+ pUdp->UDP_CSR[0] |= AT91C_UDP_TXPKTRDY;
+ 8dc: e59f3070 ldr r3, [pc, #112] ; 954
+ 8e0: e513c0cf ldr ip, [r3, #-207] ; 0xffffff31
+ 8e4: e38cc010 orr ip, ip, #16
+ 8e8: e503c0cf str ip, [r3, #-207] ; 0xffffff31
+ do {
+ csr = pUdp->UDP_CSR[0];
+ 8ec: e59f3060 ldr r3, [pc, #96] ; 954
+ 8f0: e513c0cf ldr ip, [r3, #-207] ; 0xffffff31
+ 8f4: e58dc004 str ip, [sp, #4]
+
+ /* Data IN stage has been stopped by a status OUT */
+ if (csr & AT91C_UDP_RX_DATA_BK0) {
+ 8f8: e59dc004 ldr ip, [sp, #4]
+ 8fc: e31c0002 tst ip, #2
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_RX_DATA_BK0);
+ 900: 151320cf ldrne r2, [r3, #-207] ; 0xffffff31
+ 904: 13c22002 bicne r2, r2, #2
+ 908: 150320cf strne r2, [r3, #-207] ; 0xffffff31
+ DEBUGE("stopped by status out ");
+ return;
+ 90c: 1a00000e bne 94c
+ }
+ } while (!(csr & AT91C_UDP_TXCOMP));
+ 910: e59dc004 ldr ip, [sp, #4]
+ 914: e31c0001 tst ip, #1
+ 918: 0afffff3 beq 8ec
+
+ } while (length);
+ 91c: e0511002 subs r1, r1, r2
+ 920: 1affffd6 bne 880
+
+ if (pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP) {
+ 924: e51320cf ldr r2, [r3, #-207] ; 0xffffff31
+ 928: e3120001 tst r2, #1
+ 92c: 0a000006 beq 94c
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_TXCOMP);
+ 930: e51320cf ldr r2, [r3, #-207] ; 0xffffff31
+ 934: e3c22001 bic r2, r2, #1
+ 938: e50320cf str r2, [r3, #-207] ; 0xffffff31
+ while (pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP) ;
+ 93c: e59f3010 ldr r3, [pc, #16] ; 954
+ 940: e51330cf ldr r3, [r3, #-207] ; 0xffffff31
+ 944: e3130001 tst r3, #1
+ 948: 1afffffb bne 93c
+ }
+}
+ 94c: e8bd003c pop {r2, r3, r4, r5}
+ 950: e12fff1e bx lr
+ 954: fffb00ff .word 0xfffb00ff
+
+00000958 :
+
+/* Send zero length packet through the control endpoint */
+static void __dfufunc udp_ep0_send_zlp(void)
+{
+ AT91PS_UDP pUdp = AT91C_BASE_UDP;
+ pUdp->UDP_CSR[0] |= AT91C_UDP_TXPKTRDY;
+ 958: e59f3038 ldr r3, [pc, #56] ; 998
+ 95c: e51320cf ldr r2, [r3, #-207] ; 0xffffff31
+ 960: e3822010 orr r2, r2, #16
+ 964: e50320cf str r2, [r3, #-207] ; 0xffffff31
+ while (!(pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP)) ;
+ 968: e51310cf ldr r1, [r3, #-207] ; 0xffffff31
+ 96c: e3110001 tst r1, #1
+ 970: e59f2020 ldr r2, [pc, #32] ; 998
+ 974: 0afffffb beq 968
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_TXCOMP);
+ 978: e51230cf ldr r3, [r2, #-207] ; 0xffffff31
+ 97c: e3c33001 bic r3, r3, #1
+ 980: e50230cf str r3, [r2, #-207] ; 0xffffff31
+ while (pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP) ;
+ 984: e59f300c ldr r3, [pc, #12] ; 998
+ 988: e51330cf ldr r3, [r3, #-207] ; 0xffffff31
+ 98c: e3130001 tst r3, #1
+ 990: 1afffffb bne 984
+}
+ 994: e12fff1e bx lr
+ 998: fffb00ff .word 0xfffb00ff
+
+0000099c :
+
+/* Stall the control endpoint */
+static void __dfufunc udp_ep0_send_stall(void)
+{
+ AT91PS_UDP pUdp = AT91C_BASE_UDP;
+ pUdp->UDP_CSR[0] |= AT91C_UDP_FORCESTALL;
+ 99c: e59f3038 ldr r3, [pc, #56] ; 9dc
+ 9a0: e51320cf ldr r2, [r3, #-207] ; 0xffffff31
+ 9a4: e3822020 orr r2, r2, #32
+ 9a8: e50320cf str r2, [r3, #-207] ; 0xffffff31
+ while (!(pUdp->UDP_CSR[0] & AT91C_UDP_ISOERROR)) ;
+ 9ac: e51310cf ldr r1, [r3, #-207] ; 0xffffff31
+ 9b0: e3110008 tst r1, #8
+ 9b4: e59f2020 ldr r2, [pc, #32] ; 9dc
+ 9b8: 0afffffb beq 9ac
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_FORCESTALL | AT91C_UDP_ISOERROR);
+ 9bc: e51230cf ldr r3, [r2, #-207] ; 0xffffff31
+ 9c0: e3c33028 bic r3, r3, #40 ; 0x28
+ 9c4: e50230cf str r3, [r2, #-207] ; 0xffffff31
+ while (pUdp->UDP_CSR[0] & (AT91C_UDP_FORCESTALL | AT91C_UDP_ISOERROR)) ;
+ 9c8: e59f300c ldr r3, [pc, #12] ; 9dc
+ 9cc: e51330cf ldr r3, [r3, #-207] ; 0xffffff31
+ 9d0: e3130028 tst r3, #40 ; 0x28
+ 9d4: 1afffffb bne 9c8
+}
+ 9d8: e12fff1e bx lr
+ 9dc: fffb00ff .word 0xfffb00ff
+
+000009e0 :
+
+ udp_ep0_send_data((char *)&dstat, sizeof(dstat));
+}
+
+static void __dfufunc handle_getstate(void)
+{
+ 9e0: e92d4007 push {r0, r1, r2, lr}
+ u_int8_t u8 = dfu_state;
+ 9e4: e59f3018 ldr r3, [pc, #24] ; a04
+ 9e8: e5933000 ldr r3, [r3]
+ 9ec: e28d0008 add r0, sp, #8
+ 9f0: e5603001 strb r3, [r0, #-1]!
+ DEBUGE("getstate ");
+
+ udp_ep0_send_data((char *)&u8, sizeof(u8));
+ 9f4: e3a01001 mov r1, #1
+ 9f8: ebffff9f bl 87c
+}
+ 9fc: e8bd400e pop {r1, r2, r3, lr}
+ a00: e12fff1e bx lr
+ a04: 00200020 .word 0x00200020
+
+00000a08 :
+
+#define AT91C_IFLASH_END ((u_int8_t *)AT91C_IFLASH + AT91C_IFLASH_SIZE)
+static __dfufunc int handle_upload(u_int16_t val, u_int16_t len)
+{
+ DEBUGE("upload ");
+ if (len > AT91C_IFLASH_PAGE_SIZE) {
+ a08: e3500c01 cmp r0, #256 ; 0x100
+
+ return RET_ZLP;
+}
+
+#define AT91C_IFLASH_END ((u_int8_t *)AT91C_IFLASH + AT91C_IFLASH_SIZE)
+static __dfufunc int handle_upload(u_int16_t val, u_int16_t len)
+ a0c: e92d4070 push {r4, r5, r6, lr}
+ a10: e1a04000 mov r4, r0
+{
+ DEBUGE("upload ");
+ if (len > AT91C_IFLASH_PAGE_SIZE) {
+ a14: 9a000007 bls a38
+ /* Too big */
+ dfu_state = DFU_STATE_dfuERROR;
+ a18: e59f3054 ldr r3, [pc, #84] ; a74
+ a1c: e3a0200a mov r2, #10
+ a20: e5832000 str r2, [r3]
+ dfu_status = DFU_STATUS_errADDRESS;
+ a24: e3a02008 mov r2, #8
+ a28: e5c32004 strb r2, [r3, #4]
+ udp_ep0_send_stall();
+ a2c: ebffffda bl 99c
+ return -EINVAL;
+ a30: e3e00015 mvn r0, #21
+ a34: ea00000c b a6c
+ }
+
+ if (ptr + len > AT91C_IFLASH_END)
+ a38: e59f6038 ldr r6, [pc, #56] ; a78
+ a3c: e5965000 ldr r5, [r6]
+ a40: e0853000 add r3, r5, r0
+ a44: e3530812 cmp r3, #1179648 ; 0x120000
+ len = AT91C_IFLASH_END - (u_int8_t *)ptr;
+ a48: 82654000 rsbhi r4, r5, #0
+ a4c: 81a04804 lslhi r4, r4, #16
+ a50: 81a04824 lsrhi r4, r4, #16
+
+ udp_ep0_send_data((char *)ptr, len);
+ a54: e1a00005 mov r0, r5
+ a58: e1a01004 mov r1, r4
+ ptr+= len;
+ a5c: e0855004 add r5, r5, r4
+ }
+
+ if (ptr + len > AT91C_IFLASH_END)
+ len = AT91C_IFLASH_END - (u_int8_t *)ptr;
+
+ udp_ep0_send_data((char *)ptr, len);
+ a60: ebffff85 bl 87c
+ ptr+= len;
+ a64: e5865000 str r5, [r6]
+
+ return len;
+ a68: e1a00004 mov r0, r4
+}
+ a6c: e8bd4070 pop {r4, r5, r6, lr}
+ a70: e12fff1e bx lr
+ a74: 00200020 .word 0x00200020
+ a78: 00201adc .word 0x00201adc
+
+00000a7c :
+__dfudata u_int32_t dfu_state = DFU_STATE_appIDLE;
+static u_int32_t pagebuf32[AT91C_IFLASH_PAGE_SIZE/4];
+
+static int __dfufunc handle_dnload(u_int16_t val, u_int16_t len)
+{
+ volatile u_int32_t *p = (volatile u_int32_t *)ptr;
+ a7c: e59f3134 ldr r3, [pc, #308] ; bb8
+ u_int8_t *pagebuf = (u_int8_t *) pagebuf32;
+ int i;
+
+ DEBUGE("download ");
+
+ if (len > AT91C_IFLASH_PAGE_SIZE) {
+ a80: e3500c01 cmp r0, #256 ; 0x100
+static u_int8_t *ptr = (u_int8_t *) AT91C_IFLASH + SAM7DFU_SIZE;
+static __dfudata u_int8_t dfu_status;
+__dfudata u_int32_t dfu_state = DFU_STATE_appIDLE;
+static u_int32_t pagebuf32[AT91C_IFLASH_PAGE_SIZE/4];
+
+static int __dfufunc handle_dnload(u_int16_t val, u_int16_t len)
+ a84: e92d41f3 push {r0, r1, r4, r5, r6, r7, r8, lr}
+{
+ volatile u_int32_t *p = (volatile u_int32_t *)ptr;
+ a88: e5934000 ldr r4, [r3]
+ u_int8_t *pagebuf = (u_int8_t *) pagebuf32;
+ int i;
+
+ DEBUGE("download ");
+
+ if (len > AT91C_IFLASH_PAGE_SIZE) {
+ a8c: 8a00000d bhi ac8
+ DEBUGP("length exceeds flash page size ");
+ dfu_state = DFU_STATE_dfuERROR;
+ dfu_status = DFU_STATUS_errADDRESS;
+ return RET_STALL;
+ }
+ if (len & 0x3) {
+ a90: e2103003 ands r3, r0, #3
+ a94: 1a00000b bne ac8
+ DEBUGP("not four-byte-aligned length ");
+ dfu_state = DFU_STATE_dfuERROR;
+ dfu_status = DFU_STATUS_errADDRESS;
+ return RET_STALL;
+ }
+ if (len == 0) {
+ a98: e3500000 cmp r0, #0
+ a9c: 1a000005 bne ab8
+ DEBUGP("zero-size write -> MANIFEST_SYNC ");
+ flash_page(p);
+ aa0: e1a00004 mov r0, r4
+ aa4: eb00028f bl 14e8
+ dfu_state = DFU_STATE_dfuMANIFEST_SYNC;
+ aa8: e59f310c ldr r3, [pc, #268] ; bbc
+ aac: e3a02006 mov r2, #6
+ ab0: e5832000 str r2, [r3]
+ ab4: ea00003c b bac
+ return RET_ZLP;
+ }
+ if (ptr + len >= (u_int8_t *) AT91C_IFLASH + AT91C_IFLASH_SIZE - ENVIRONMENT_SIZE ) {
+ ab8: e59f2100 ldr r2, [pc, #256] ; bc0
+ abc: e0841000 add r1, r4, r0
+ ac0: e1510002 cmp r1, r2
+ ac4: 9a000006 bls ae4
+ DEBUGP("end of write exceeds flash end ");
+ dfu_state = DFU_STATE_dfuERROR;
+ ac8: e59f30ec ldr r3, [pc, #236] ; bbc
+ acc: e3a0200a mov r2, #10
+ ad0: e5832000 str r2, [r3]
+ dfu_status = DFU_STATUS_errADDRESS;
+ ad4: e3a02008 mov r2, #8
+ ad8: e5c32004 strb r2, [r3, #4]
+ return RET_STALL;
+ adc: e3a00002 mov r0, #2
+ ae0: ea000032 b bb0
+static u_int32_t pagebuf32[AT91C_IFLASH_PAGE_SIZE/4];
+
+static int __dfufunc handle_dnload(u_int16_t val, u_int16_t len)
+{
+ volatile u_int32_t *p = (volatile u_int32_t *)ptr;
+ u_int8_t *pagebuf = (u_int8_t *) pagebuf32;
+ ae4: e59f10d8 ldr r1, [pc, #216] ; bc4
+
+ do {
+ /* FIXME: do we need to check whether we've been interrupted
+ * by a RX SETUP stage? */
+ do {
+ csr = pUdp->UDP_CSR[0];
+ ae8: e59f20d8 ldr r2, [pc, #216] ; bc8
+ aec: e512c0cf ldr ip, [r2, #-207] ; 0xffffff31
+ af0: e58dc004 str ip, [sp, #4]
+ DEBUGR("CSR=%08x ", csr);
+ } while (!(csr & AT91C_UDP_RX_DATA_BK0)) ;
+ af4: e59dc004 ldr ip, [sp, #4]
+ af8: e31c0002 tst ip, #2
+ afc: 0afffff9 beq ae8
+
+ num_rcv = pUdp->UDP_CSR[0] >> 16;
+ b00: e51250cf ldr r5, [r2, #-207] ; 0xffffff31
+ b04: e1a05825 lsr r5, r5, #16
+
+ /* make sure we don't read more than requested */
+ if (num_rcv_total + num_rcv > len)
+ b08: e0832005 add r2, r3, r5
+ b0c: e1520000 cmp r2, r0
+ num_rcv = num_rcv_total - len;
+ b10: 80605003 rsbhi r5, r0, r3
+ b14: 81a05805 lslhi r5, r5, #16
+ b18: 81a05825 lsrhi r5, r5, #16
+static u_int32_t pagebuf32[AT91C_IFLASH_PAGE_SIZE/4];
+
+static int __dfufunc handle_dnload(u_int16_t val, u_int16_t len)
+{
+ volatile u_int32_t *p = (volatile u_int32_t *)ptr;
+ u_int8_t *pagebuf = (u_int8_t *) pagebuf32;
+ b1c: e1a06001 mov r6, r1
+ /* make sure we don't read more than requested */
+ if (num_rcv_total + num_rcv > len)
+ num_rcv = num_rcv_total - len;
+
+ DEBUGR("num_rcv = %u ", num_rcv);
+ for (i = 0; i < num_rcv; i++)
+ b20: e3a02000 mov r2, #0
+ b24: ea000004 b b3c
+ *data++ = pUdp->UDP_FDR[0];
+ b28: e51cc0af ldr ip, [ip, #-175] ; 0xffffff51
+ /* make sure we don't read more than requested */
+ if (num_rcv_total + num_rcv > len)
+ num_rcv = num_rcv_total - len;
+
+ DEBUGR("num_rcv = %u ", num_rcv);
+ for (i = 0; i < num_rcv; i++)
+ b2c: e2822001 add r2, r2, #1
+ b30: e1a02802 lsl r2, r2, #16
+ *data++ = pUdp->UDP_FDR[0];
+ b34: e4c6c001 strb ip, [r6], #1
+ /* make sure we don't read more than requested */
+ if (num_rcv_total + num_rcv > len)
+ num_rcv = num_rcv_total - len;
+
+ DEBUGR("num_rcv = %u ", num_rcv);
+ for (i = 0; i < num_rcv; i++)
+ b38: e1a02822 lsr r2, r2, #16
+ b3c: e1520005 cmp r2, r5
+ b40: e59fc080 ldr ip, [pc, #128] ; bc8
+ b44: 1afffff7 bne b28
+ *data++ = pUdp->UDP_FDR[0];
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_RX_DATA_BK0);
+ b48: e51c50cf ldr r5, [ip, #-207] ; 0xffffff31
+
+ num_rcv_total += num_rcv;
+
+ /* we need to continue to pull data until we either receive
+ * a packet < endpoint size or == 0 */
+ } while (num_rcv == 8 && num_rcv_total < len);
+ b4c: e3520008 cmp r2, #8
+ num_rcv = num_rcv_total - len;
+
+ DEBUGR("num_rcv = %u ", num_rcv);
+ for (i = 0; i < num_rcv; i++)
+ *data++ = pUdp->UDP_FDR[0];
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_RX_DATA_BK0);
+ b50: e3c55002 bic r5, r5, #2
+ /* make sure we don't read more than requested */
+ if (num_rcv_total + num_rcv > len)
+ num_rcv = num_rcv_total - len;
+
+ DEBUGR("num_rcv = %u ", num_rcv);
+ for (i = 0; i < num_rcv; i++)
+ b54: e0811002 add r1, r1, r2
+ *data++ = pUdp->UDP_FDR[0];
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_RX_DATA_BK0);
+ b58: e50c50cf str r5, [ip, #-207] ; 0xffffff31
+
+ num_rcv_total += num_rcv;
+
+ /* we need to continue to pull data until we either receive
+ * a packet < endpoint size or == 0 */
+ } while (num_rcv == 8 && num_rcv_total < len);
+ b5c: 1a000002 bne b6c
+ DEBUGR("num_rcv = %u ", num_rcv);
+ for (i = 0; i < num_rcv; i++)
+ *data++ = pUdp->UDP_FDR[0];
+ pUdp->UDP_CSR[0] &= ~(AT91C_UDP_RX_DATA_BK0);
+
+ num_rcv_total += num_rcv;
+ b60: e2833008 add r3, r3, #8
+
+ /* we need to continue to pull data until we either receive
+ * a packet < endpoint size or == 0 */
+ } while (num_rcv == 8 && num_rcv_total < len);
+ b64: e1530000 cmp r3, r0
+ b68: 3affffde bcc ae8
+
+ /* we can only access the write buffer with correctly aligned
+ * 32bit writes ! */
+#ifndef DEBUG_DFU_NOFLASH
+ DEBUGP("copying ");
+ for (i = 0; i < len/4; i++) {
+ b6c: e1a07120 lsr r7, r0, #2
+ b70: e59f8054 ldr r8, [pc, #84] ; bcc
+ b74: e1a05004 mov r5, r4
+ b78: e3a06000 mov r6, #0
+ b7c: ea000005 b b98
+ *p++ = pagebuf32[i];
+ b80: e5b83004 ldr r3, [r8, #4]!
+ b84: e4853004 str r3, [r5], #4
+ /* If we have filled a page buffer, flash it */
+ if (((unsigned long)p % AT91C_IFLASH_PAGE_SIZE) == 0) {
+ b88: e31500ff tst r5, #255 ; 0xff
+ DEBUGP("page_full ");
+ flash_page(p-1);
+ b8c: 02450004 subeq r0, r5, #4
+ b90: 0b000254 bleq 14e8
+
+ /* we can only access the write buffer with correctly aligned
+ * 32bit writes ! */
+#ifndef DEBUG_DFU_NOFLASH
+ DEBUGP("copying ");
+ for (i = 0; i < len/4; i++) {
+ b94: e2866001 add r6, r6, #1
+ b98: e1560007 cmp r6, r7
+ b9c: bafffff7 blt b80
+ if (((unsigned long)p % AT91C_IFLASH_PAGE_SIZE) == 0) {
+ DEBUGP("page_full ");
+ flash_page(p-1);
+ }
+ }
+ ptr = (u_int8_t *) p;
+ ba0: e59f3010 ldr r3, [pc, #16] ; bb8
+ ba4: e0844107 add r4, r4, r7, lsl #2
+ ba8: e5834000 str r4, [r3]
+#endif
+
+ return RET_ZLP;
+ bac: e3a00001 mov r0, #1
+}
+ bb0: e8bd41fc pop {r2, r3, r4, r5, r6, r7, r8, lr}
+ bb4: e12fff1e bx lr
+ bb8: 00201adc .word 0x00201adc
+ bbc: 00200020 .word 0x00200020
+ bc0: 0011feff .word 0x0011feff
+ bc4: 00201ae4 .word 0x00201ae4
+ bc8: fffb00ff .word 0xfffb00ff
+ bcc: 00201ae0 .word 0x00201ae0
+
+00000bd0 :
+//* \brief Return MC EFC Status
+//*----------------------------------------------------------------------------
+static inline unsigned int AT91F_MC_EFC_GetStatus(
+ AT91PS_MC pMC) // pointer to a MC controller
+{
+ return pMC->MC_FSR;
+ bd0: e3e03000 mvn r3, #0
+
+ return len;
+}
+
+static __dfufunc void handle_getstatus(void)
+{
+ bd4: e92d4007 push {r0, r1, r2, lr}
+ bd8: e5132097 ldr r2, [r3, #-151] ; 0xffffff69
+ struct dfu_status dstat;
+ u_int32_t fsr = AT91F_MC_EFC_GetStatus(AT91C_BASE_MC);
+
+ DEBUGE("getstatus(fsr=0x%08x) ", fsr);
+
+ switch (dfu_state) {
+ bdc: e59f308c ldr r3, [pc, #140] ; c70
+ be0: e5931000 ldr r1, [r3]
+ be4: e3510003 cmp r1, #3
+ be8: 3a000014 bcc c40
+ bec: e3510004 cmp r1, #4
+ bf0: 9a000002 bls c00
+ bf4: e3510006 cmp r1, #6
+ bf8: 1a000010 bne c40
+ bfc: ea00000d b c38
+ case DFU_STATE_dfuDNLOAD_SYNC:
+ case DFU_STATE_dfuDNBUSY:
+ if (fsr & AT91C_MC_PROGE) {
+ c00: e3120008 tst r2, #8
+ DEBUGE("errPROG ");
+ dfu_status = DFU_STATUS_errPROG;
+ c04: 13a02006 movne r2, #6
+ c08: 15c32004 strbne r2, [r3, #4]
+ dfu_state = DFU_STATE_dfuERROR;
+ c0c: 12822004 addne r2, r2, #4
+ DEBUGE("getstatus(fsr=0x%08x) ", fsr);
+
+ switch (dfu_state) {
+ case DFU_STATE_dfuDNLOAD_SYNC:
+ case DFU_STATE_dfuDNBUSY:
+ if (fsr & AT91C_MC_PROGE) {
+ c10: 1a000009 bne c3c
+ DEBUGE("errPROG ");
+ dfu_status = DFU_STATUS_errPROG;
+ dfu_state = DFU_STATE_dfuERROR;
+ } else if (fsr & AT91C_MC_LOCKE) {
+ c14: e3120004 tst r2, #4
+ DEBUGE("errWRITE ");
+ dfu_status = DFU_STATUS_errWRITE;
+ c18: 13a02003 movne r2, #3
+ c1c: 15c32004 strbne r2, [r3, #4]
+ dfu_state = DFU_STATE_dfuERROR;
+ c20: 12822007 addne r2, r2, #7
+ case DFU_STATE_dfuDNBUSY:
+ if (fsr & AT91C_MC_PROGE) {
+ DEBUGE("errPROG ");
+ dfu_status = DFU_STATUS_errPROG;
+ dfu_state = DFU_STATE_dfuERROR;
+ } else if (fsr & AT91C_MC_LOCKE) {
+ c24: 1a000004 bne c3c
+ DEBUGE("errWRITE ");
+ dfu_status = DFU_STATUS_errWRITE;
+ dfu_state = DFU_STATE_dfuERROR;
+ } else if (fsr & AT91C_MC_FRDY) {
+ c28: e3120001 tst r2, #1
+ DEBUGE("DNLOAD_IDLE ");
+ dfu_state = DFU_STATE_dfuDNLOAD_IDLE;
+ c2c: 13a02005 movne r2, #5
+ } else {
+ DEBUGE("DNBUSY ");
+ dfu_state = DFU_STATE_dfuDNBUSY;
+ c30: 03a02004 moveq r2, #4
+ c34: ea000000 b c3c
+ }
+ break;
+ case DFU_STATE_dfuMANIFEST_SYNC:
+ dfu_state = DFU_STATE_dfuMANIFEST;
+ c38: e3a02007 mov r2, #7
+ c3c: e5832000 str r2, [r3]
+ break;
+ }
+
+ /* send status response */
+ dstat.bStatus = dfu_status;
+ c40: e59f3028 ldr r3, [pc, #40] ; c70
+ c44: e5d32004 ldrb r2, [r3, #4]
+ dstat.bState = dfu_state;
+ c48: e5933000 ldr r3, [r3]
+ dstat.iString = 0;
+ /* FIXME: set dstat.bwPollTimeout */
+
+ udp_ep0_send_data((char *)&dstat, sizeof(dstat));
+ c4c: e1a0000d mov r0, sp
+ break;
+ }
+
+ /* send status response */
+ dstat.bStatus = dfu_status;
+ dstat.bState = dfu_state;
+ c50: e5cd3004 strb r3, [sp, #4]
+ dstat.iString = 0;
+ /* FIXME: set dstat.bwPollTimeout */
+
+ udp_ep0_send_data((char *)&dstat, sizeof(dstat));
+ c54: e3a01006 mov r1, #6
+ }
+
+ /* send status response */
+ dstat.bStatus = dfu_status;
+ dstat.bState = dfu_state;
+ dstat.iString = 0;
+ c58: e3a03000 mov r3, #0
+ dfu_state = DFU_STATE_dfuMANIFEST;
+ break;
+ }
+
+ /* send status response */
+ dstat.bStatus = dfu_status;
+ c5c: e5cd2000 strb r2, [sp]
+ dstat.bState = dfu_state;
+ dstat.iString = 0;
+ c60: e5cd3005 strb r3, [sp, #5]
+ /* FIXME: set dstat.bwPollTimeout */
+
+ udp_ep0_send_data((char *)&dstat, sizeof(dstat));
+ c64: ebffff04 bl 87c
+}
+ c68: e8bd400e pop {r1, r2, r3, lr}
+ c6c: e12fff1e bx lr
+ c70: 00200020 .word 0x00200020
+
+00000c74 :
+}
+
+/* callback function for DFU requests */
+int __dfufunc dfu_ep0_handler(u_int8_t req_type, u_int8_t req,
+ u_int16_t val, u_int16_t len)
+{
+ c74: e92d4010 push {r4, lr}
+ c78: e1a04003 mov r4, r3
+ int rc, ret = RET_NOTHING;
+
+ DEBUGE("old_state = %u ", dfu_state);
+
+ switch (dfu_state) {
+ c7c: e59f3204 ldr r3, [pc, #516] ; e88
+ c80: e5932000 ldr r2, [r3]
+ c84: e352000a cmp r2, #10
+ c88: 979ff102 ldrls pc, [pc, r2, lsl #2]
+ c8c: ea00007a b e7c
+ c90: 00000cbc .word 0x00000cbc
+ c94: 00000cdc .word 0x00000cdc
+ c98: 00000cf4 .word 0x00000cf4
+ c9c: 00000d9c .word 0x00000d9c
+ ca0: 00000e2c .word 0x00000e2c
+ ca4: 00000d58 .word 0x00000d58
+ ca8: 00000d9c .word 0x00000d9c
+ cac: 00000da8 .word 0x00000da8
+ cb0: 00000e7c .word 0x00000e7c
+ cb4: 00000dc8 .word 0x00000dc8
+ cb8: 00000e1c .word 0x00000e1c
+ case DFU_STATE_appIDLE:
+ switch (req) {
+ cbc: e3510003 cmp r1, #3
+ cc0: 0a00005b beq e34
+ cc4: e3510005 cmp r1, #5
+ cc8: 0a00005b beq e3c
+ ccc: e3510000 cmp r1, #0
+ break;
+ case USB_REQ_DFU_GETSTATE:
+ handle_getstate();
+ break;
+ case USB_REQ_DFU_DETACH:
+ dfu_state = DFU_STATE_appDETACH;
+ cd0: 03a02001 moveq r2, #1
+
+ DEBUGE("old_state = %u ", dfu_state);
+
+ switch (dfu_state) {
+ case DFU_STATE_appIDLE:
+ switch (req) {
+ cd4: 0a00004e beq e14
+ cd8: ea000066 b e78
+ default:
+ ret = RET_STALL;
+ }
+ break;
+ case DFU_STATE_appDETACH:
+ switch (req) {
+ cdc: e3510003 cmp r1, #3
+ ce0: 0a000053 beq e34
+ ce4: e3510005 cmp r1, #5
+ break;
+ case USB_REQ_DFU_GETSTATE:
+ handle_getstate();
+ break;
+ default:
+ dfu_state = DFU_STATE_appIDLE;
+ ce8: 13a02000 movne r2, #0
+ default:
+ ret = RET_STALL;
+ }
+ break;
+ case DFU_STATE_appDETACH:
+ switch (req) {
+ cec: 1a00005a bne e5c
+ cf0: ea000051 b e3c
+ break;
+ }
+ /* FIXME: implement timer to return to appIDLE */
+ break;
+ case DFU_STATE_dfuIDLE:
+ switch (req) {
+ cf4: e2411001 sub r1, r1, #1
+ cf8: e3510005 cmp r1, #5
+ cfc: 979ff101 ldrls pc, [pc, r1, lsl #2]
+ d00: ea000054 b e58
+ d04: 00000d1c .word 0x00000d1c
+ d08: 00000d38 .word 0x00000d38
+ d0c: 00000e34 .word 0x00000e34
+ d10: 00000e58 .word 0x00000e58
+ d14: 00000e3c .word 0x00000e3c
+ d18: 00000e70 .word 0x00000e70
+ case USB_REQ_DFU_DNLOAD:
+ if (len == 0) {
+ d1c: e3540000 cmp r4, #0
+ d20: 0a00004c beq e58
+ dfu_state = DFU_STATE_dfuERROR;
+ ret = RET_STALL;
+ goto out;
+ }
+ dfu_state = DFU_STATE_dfuDNLOAD_SYNC;
+ d24: e3a02003 mov r2, #3
+ d28: e5832000 str r2, [r3]
+ ptr = (u_int8_t *) AT91C_IFLASH + SAM7DFU_SIZE;
+ d2c: e3a02941 mov r2, #1064960 ; 0x104000
+ d30: e59f3154 ldr r3, [pc, #340] ; e8c
+ d34: ea000012 b d84
+ ret = handle_dnload(val, len);
+ break;
+ case USB_REQ_DFU_UPLOAD:
+ ptr = (u_int8_t *) AT91C_IFLASH + SAM7DFU_SIZE;
+ d38: e59f214c ldr r2, [pc, #332] ; e8c
+ d3c: e3a01941 mov r1, #1064960 ; 0x104000
+ d40: e5821000 str r1, [r2]
+ dfu_state = DFU_STATE_dfuUPLOAD_IDLE;
+ d44: e3a02009 mov r2, #9
+ d48: e5832000 str r2, [r3]
+ handle_upload(val, len);
+ d4c: e1a00004 mov r0, r4
+ d50: ebffff2c bl a08
+ break;
+ d54: ea000048 b e7c
+ ret = RET_STALL;
+ goto out;
+ }
+ break;
+ case DFU_STATE_dfuDNLOAD_IDLE:
+ switch (req) {
+ d58: e2411001 sub r1, r1, #1
+ d5c: e3510005 cmp r1, #5
+ d60: 979ff101 ldrls pc, [pc, r1, lsl #2]
+ d64: ea00003b b e58
+ d68: 00000d80 .word 0x00000d80
+ d6c: 00000e58 .word 0x00000e58
+ d70: 00000e34 .word 0x00000e34
+ d74: 00000e58 .word 0x00000e58
+ d78: 00000e3c .word 0x00000e3c
+ d7c: 00000e10 .word 0x00000e10
+ case USB_REQ_DFU_DNLOAD:
+ dfu_state = DFU_STATE_dfuDNLOAD_SYNC;
+ d80: e3a02003 mov r2, #3
+ d84: e5832000 str r2, [r3]
+ ret = handle_dnload(val, len);
+ d88: e1a00004 mov r0, r4
+ d8c: ebffff3a bl a7c
+ }
+
+out:
+ DEBUGE("new_state = %u\r\n", dfu_state);
+
+ switch (ret) {
+ d90: e3500001 cmp r0, #1
+ d94: 1a000032 bne e64
+ d98: ea000034 b e70
+ ret = RET_STALL;
+ break;
+ }
+ break;
+ case DFU_STATE_dfuMANIFEST_SYNC:
+ switch (req) {
+ d9c: e3510003 cmp r1, #3
+ da0: 1a000002 bne db0
+ da4: ea000022 b e34
+ ret = RET_STALL;
+ break;
+ }
+ break;
+ case DFU_STATE_dfuMANIFEST:
+ switch (req) {
+ da8: e3510003 cmp r1, #3
+ dac: 0a000002 beq dbc
+ db0: e3510005 cmp r1, #5
+ db4: 1a000027 bne e58
+ db8: ea00001f b e3c
+ case USB_REQ_DFU_GETSTATUS:
+ dfu_state = DFU_STATE_dfuIDLE;
+ dbc: e3a02002 mov r2, #2
+ dc0: e5832000 str r2, [r3]
+ dc4: ea00001a b e34
+ break;
+ case DFU_STATE_dfuMANIFEST_WAIT_RST:
+ /* we should never go here */
+ break;
+ case DFU_STATE_dfuUPLOAD_IDLE:
+ switch (req) {
+ dc8: e2411002 sub r1, r1, #2
+ dcc: e3510004 cmp r1, #4
+ dd0: 979ff101 ldrls pc, [pc, r1, lsl #2]
+ dd4: ea00001f b e58
+ dd8: 00000dec .word 0x00000dec
+ ddc: 00000e34 .word 0x00000e34
+ de0: 00000e58 .word 0x00000e58
+ de4: 00000e3c .word 0x00000e3c
+ de8: 00000e10 .word 0x00000e10
+ case USB_REQ_DFU_UPLOAD:
+ /* state transition if less data then requested */
+ rc = handle_upload(val, len);
+ dec: e1a00004 mov r0, r4
+ df0: ebffff04 bl a08
+ if (rc >= 0 && rc < len)
+ df4: e3500000 cmp r0, #0
+ df8: ba00001f blt e7c
+ dfc: e1500004 cmp r0, r4
+ dfu_state = DFU_STATE_dfuIDLE;
+ e00: b59f3080 ldrlt r3, [pc, #128] ; e88