Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit b899b4a09c2258be5e55bee34ccf9a3710550c69 0 parents
@Hak5Jason Hak5Jason authored
Showing with 28,312 additions and 0 deletions.
  1. +6 −0 Encoder/.classpath
  2. +17 −0 Encoder/.project
  3. +12 −0 Encoder/.settings/org.eclipse.jdt.core.prefs
  4. +530 −0 Encoder/src/Encoder.java
  5. +98 −0 Firmware/Framework.config
  6. +563 −0 Firmware/duck.avrgccproj
  7. +20 −0 Firmware/duck.avrsln
  8. BIN  Firmware/duck.avrsuo
  9. +71 −0 Firmware/src/asf.h
  10. +290 −0 Firmware/src/asf/avr32/boards/evk1101/evk1101.h
  11. +126 −0 Firmware/src/asf/avr32/boards/evk1101/init.c
  12. +344 −0 Firmware/src/asf/avr32/boards/evk1101/led.c
  13. +185 −0 Firmware/src/asf/avr32/boards/evk1101/led.h
  14. +1,278 −0 Firmware/src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi/sd_mmc_spi.c
  15. +220 −0 Firmware/src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi/sd_mmc_spi.h
  16. +386 −0 Firmware/src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi/sd_mmc_spi_mem.c
  17. +188 −0 Firmware/src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi/sd_mmc_spi_mem.h
  18. +1,136 −0 Firmware/src/asf/avr32/drivers/flashc/flashc.c
  19. +1,018 −0 Firmware/src/asf/avr32/drivers/flashc/flashc.h
  20. +635 −0 Firmware/src/asf/avr32/drivers/gpio/gpio.c
  21. +680 −0 Firmware/src/asf/avr32/drivers/gpio/gpio.h
  22. +237 −0 Firmware/src/asf/avr32/drivers/intc/exception.S
  23. +214 −0 Firmware/src/asf/avr32/drivers/intc/intc.c
  24. +98 −0 Firmware/src/asf/avr32/drivers/intc/intc.h
  25. +566 −0 Firmware/src/asf/avr32/drivers/pm/pm.c
  26. +515 −0 Firmware/src/asf/avr32/drivers/pm/pm.h
  27. +266 −0 Firmware/src/asf/avr32/drivers/pm/pm_conf_clocks.c
  28. +575 −0 Firmware/src/asf/avr32/drivers/pm/power_clocks_lib.c
  29. +381 −0 Firmware/src/asf/avr32/drivers/pm/power_clocks_lib.h
  30. +149 −0 Firmware/src/asf/avr32/drivers/pm/sleep.h
  31. +423 −0 Firmware/src/asf/avr32/drivers/spi/spi.c
  32. +698 −0 Firmware/src/asf/avr32/drivers/spi/spi.h
  33. +902 −0 Firmware/src/asf/avr32/drivers/usart/usart.c
  34. +887 −0 Firmware/src/asf/avr32/drivers/usart/usart.h
  35. +1,499 −0 Firmware/src/asf/avr32/drivers/usbb/usbb_device.c
  36. +564 −0 Firmware/src/asf/avr32/drivers/usbb/usbb_device.h
  37. +234 −0 Firmware/src/asf/avr32/drivers/usbb/usbb_otg.h
  38. +2,002 −0 Firmware/src/asf/avr32/services/fs/fat/fat.c
  39. +541 −0 Firmware/src/asf/avr32/services/fs/fat/fat.h
  40. +2,499 −0 Firmware/src/asf/avr32/services/fs/fat/fat_unusual.c
  41. +765 −0 Firmware/src/asf/avr32/services/fs/fat/file.c
  42. +225 −0 Firmware/src/asf/avr32/services/fs/fat/file.h
  43. +258 −0 Firmware/src/asf/avr32/services/fs/fat/fs_com.h
  44. +2,409 −0 Firmware/src/asf/avr32/services/fs/fat/navigation.c
  45. +766 −0 Firmware/src/asf/avr32/services/fs/fat/navigation.h
  46. +1,220 −0 Firmware/src/asf/avr32/utils/compiler.h
  47. +213 −0 Firmware/src/asf/avr32/utils/debug/print_funcs.c
  48. +349 −0 Firmware/src/asf/avr32/utils/debug/print_funcs.h
  49. +266 −0 Firmware/src/asf/avr32/utils/linker_scripts/at32uc3b/0256/gcc/link_uc3b0256.lds
  50. +243 −0 Firmware/src/asf/avr32/utils/parts.h
  51. +326 −0 Firmware/src/asf/avr32/utils/preprocessor/mrepeat.h
  52. +53 −0 Firmware/src/asf/avr32/utils/preprocessor/preprocessor.h
  53. +73 −0 Firmware/src/asf/avr32/utils/preprocessor/stringz.h
  54. +93 −0 Firmware/src/asf/avr32/utils/preprocessor/tpaste.h
Sorry, we could not display the entire diff because it was too big.
6 Encoder/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
17 Encoder/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Hak5_Duck_Encoder</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
12 Encoder/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Sun Aug 07 16:02:51 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
530 Encoder/src/Encoder.java
@@ -0,0 +1,530 @@
+// File: Encoder.java
+// Created: 8/10/2011
+// Author: Jason Appelbaum Jason@Hak5.org
+
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.rtf.RTFEditorKit;
+
+public class Encoder {
+
+ public static void main(String[] args) {
+
+ String helpStr = "Hak5 Duck Encoder 1.2\n\n"
+ + "usage: duckencode -i [file ..]\t\t\tencode specified file\n"
+ + " or: duckencode -i [file ..] -o [file ..]\tencode to specified file\n"
+ + "\nArguments:\n"
+ + " -i [file ..] \t\tInput File\n"
+ + " -o [file ..] \t\tOutput File\n"
+ + "\nScript Commands:\n"
+ + " ALT [END | (ESCAPE | ESC) | F1...F12 | Single Char | SPACE | TAB]\n"
+ + " BREAK | PAUSE\n"
+ + " CAPSLOCK\n"
+ + " CONTROL | CTRL [(BREAK | PAUSE) | F1...F12 | (ESCAPE | ESC) | Single Char]\n"
+ + " DEFAULT_DELAY | DEFAULTDELAY [Time in millisecond * 10]\n"
+ + " DELAY [Time in millisecond * 10]\n"
+ + " DELETE\n"
+ + " DOWNARROW | DOWN\n"
+ + " END\n"
+ + " ESCAPE | ESC\n"
+ + " F1...F12\n"
+ + " HOME\n"
+ + " INSERT\n"
+ + " LEFTARROW | LEFT\n"
+ + " MENU | APP\n"
+ + " NUMLOCK\n"
+ + " PAGEDOWN\n"
+ + " PAGEUP\n"
+ + " PRINTSCREEN\n"
+ + " REM\n"
+ + " RIGHTARROW | RIGHT\n"
+ + " SCROLLLOCK\n"
+ + " SHIFT [ DELETE | HOME | INSERT | PAGEUP | PAGEDOWN | (WINDOWS | GUI)\n"
+ + " | (UPARROW | DOWNARROW |LEFTARROW | RIGHTARROW) | TAB]\n"
+ + " SPACE\n"
+ + " STRING [a...z A...Z 0..9 !...) `~ += _- \"\' :; <, >. ?/ \\|]\n"
+ + " TAB\n" + " UPARROW | UP\n" + " WINDOWS | GUI\n";
+
+ String inputFile = null;
+ String outputFile = null;
+
+ if (args.length == 0) {
+ System.out.println(helpStr);
+ System.exit(0);
+ }
+
+ for (int i = 0; i < args.length; i++) {
+ if (args[i].equals("--gui") || args[i].equals("-g")) {
+ System.out.println("Launch GUI");
+ } else if (args[i].equals("--help") || args[i].equals("-h")) {
+ System.out.println(helpStr);
+ } else if (args[i].equals("-i")) {
+ // encode file
+ inputFile = args[++i];
+ } else if (args[i].equals("-o")) {
+ // output file
+ outputFile = args[++i];
+ } else {
+ System.out.println(helpStr);
+ break;
+ }
+ }
+
+ if (inputFile != null) {
+ String scriptStr = null;
+
+ if (inputFile.contains(".rtf")) {
+ try {
+ FileInputStream stream = new FileInputStream(inputFile);
+ RTFEditorKit kit = new RTFEditorKit();
+ Document doc = kit.createDefaultDocument();
+ kit.read(stream, doc, 0);
+
+ scriptStr = doc.getText(0, doc.getLength());
+ } catch (IOException e) {
+ System.out.println("Error with input file!");
+ } catch (BadLocationException e) {
+ System.out.println("Error with input file!");
+ }
+ } else {
+ DataInputStream in = null;
+ try {
+ File f = new File(inputFile);
+ byte[] buffer = new byte[(int) f.length()];
+ in = new DataInputStream(new FileInputStream(f));
+ in.readFully(buffer);
+ scriptStr = new String(buffer);
+
+ } catch (IOException e) {
+ System.out.println("Error with input file!");
+ } finally {
+ try {
+ in.close();
+ } catch (IOException e) { /* ignore it */
+ }
+ }
+ }
+
+ encodeToFile(scriptStr, (outputFile == null) ? "inject.bin"
+ : outputFile);
+ }
+ }
+
+ private static void encodeToFile(String inStr, String fileDest) {
+ inStr = inStr.replaceAll("\\r", ""); // CRLF Fix
+ String[] instructions = inStr.split("\n");
+ List<Byte> file = new ArrayList<Byte>();
+ int defaultDelay = 0;
+
+ for (int i = 0; i < instructions.length; i++) {
+ try {
+ boolean delayOverride = false;
+ String commentCheck = instructions[i].substring(0, 2);
+ if (commentCheck.equals("//"))
+ continue;
+
+ String instruction[] = instructions[i].split(" ", 2);
+
+ instruction[0].trim();
+
+ if (instruction.length == 2) {
+ instruction[1].trim();
+ }
+
+ if (instruction[0].equals("DEFAULT_DELAY")
+ || instruction[0].equals("DEFAULTDELAY")) {
+ defaultDelay = (byte) Integer.parseInt(instruction[1]
+ .trim());
+ } else if (instruction[0].equals("DELAY")) {
+ int delay = Integer.parseInt(instruction[1].trim());
+ while (delay > 0) {
+ file.add((byte) 0x00);
+ if (delay > 255) {
+ file.add((byte) 0xFF);
+ delay = delay - 255;
+ } else {
+ file.add((byte) delay);
+ delay = 0;
+ }
+ }
+ delayOverride = true;
+ } else if (instruction[0].equals("STRING")) {
+ for (int j = 0; j < instruction[1].length(); j++) {
+ char c = instruction[1].charAt(j);
+ file.add(charToByte(c));
+
+ // Auto shift
+ byte shiftByte = 0x00;
+ if ((int) c >= 65 && (int) c <= 90) {
+ // switch capital letters
+ shiftByte = 0x02;
+ } else {
+ switch (c) {
+ case '~':
+ case '!':
+ case '@':
+ case '#':
+ case '$':
+ case '%':
+ case '^':
+ case '&':
+ case '*':
+ case '(':
+ case ')':
+ case '_':
+ case '+':
+ case '}':
+ case '{':
+ case '|':
+ case '"':
+ case ':':
+ case '?':
+ case '>':
+ case '<':
+ // shift
+ shiftByte = 0x02;
+ break;
+ }
+ }
+ file.add(shiftByte);
+ }
+ } else if (instruction[0].equals("CONTROL")
+ || instruction[0].equals("CTRL")) {
+ if (instruction[1].equals("ESCAPE")
+ || instruction[1].equals("ESC"))
+ file.add((byte) 0x29);
+ else if (instruction[1].equals("PAUSE")
+ || instruction[1].equals("BREAK"))
+ file.add((byte) 0x48);
+ else if (instruction.length != 1)
+ if (functionKeyCheck(instruction[1]))
+ file.add(functionKeyToByte(instruction[1]));
+ else
+ file.add(charToByte(instruction[1].charAt(0)));
+ else
+ file.add((byte) 0x00);
+ file.add((byte) 0x01);
+ } else if (instruction[0].equals("ALT")) {
+ if (instruction.length != 1) {
+ if (instruction[1].equals("ESCAPE")
+ || instruction[1].equals("ESC"))
+ file.add((byte) 0x29);
+ else if (instruction[1].equals("SPACE"))
+ file.add((byte) 0x2C);
+ else if (instruction[1].equals("TAB"))
+ file.add((byte) 0x2B);
+ else if (instruction.length != 1)
+ if (functionKeyCheck(instruction[1]))
+ file.add(functionKeyToByte(instruction[1]));
+ else
+ file.add(charToByte(instruction[1].charAt(0)));
+ else
+ file.add((byte) 0x00);
+ } else {
+ file.add((byte) 0x00);
+ }
+ file.add((byte) 0xE2);
+
+ } else if (instruction[0].equals("ENTER")) {
+ file.add((byte) 0x28);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("SHIFT")) {
+ if (instruction.length != 1) {
+ if (instruction[1].equals("HOME")) {
+ file.add((byte) 0x4A);
+ } else if (instruction[1].equals("TAB")) {
+ file.add((byte) 0x2B);
+ } else if (instruction[1].equals("WINDOWS")
+ || instruction[1].equals("GUI")) {
+ file.add((byte) 0xE3);
+ } else if (instruction[1].equals("INSERT")) {
+ file.add((byte) 0x49);
+ } else if (instruction[1].equals("PAGEUP")) {
+ file.add((byte) 0x4B);
+ } else if (instruction[1].equals("PAGEDOWN")) {
+ file.add((byte) 0x4E);
+ } else if (instruction[1].equals("DELETE")) {
+ file.add((byte) 0x4C);
+ } else if (instruction[1].equals("END")) {
+ file.add((byte) 0x4D);
+ } else if (instruction[1].equals("UPARROW")) {
+ file.add((byte) 0x52);
+ } else if (instruction[1].equals("DOWNARROW")) {
+ file.add((byte) 0x51);
+ } else if (instruction[1].equals("LEFTARROW")) {
+ file.add((byte) 0x50);
+ } else if (instruction[1].equals("RIGHTARROW")) {
+ file.add((byte) 0x4F);
+ }
+ file.add((byte) 0xE1);
+ } else {
+ file.add((byte) 0xE1);
+ file.add((byte) 0x00);
+ }
+ } else if (instruction[0].equals("REM")) {
+ continue;
+ } else if (instruction[0].equals("MENU")
+ || instruction[0].equals("APP")) {
+ file.add((byte) 0x65);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("TAB")) {
+ file.add((byte) 0x2B);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("SPACE")) {
+ file.add((byte) 0x2C);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("WINDOWS")
+ || instruction[0].equals("GUI")) {
+ if (instruction.length == 1) {
+ file.add((byte) 0xE3);
+ file.add((byte) 0x00);
+ } else {
+ file.add(charToByte(instruction[1].charAt(0)));
+ file.add((byte) 0x08);
+ }
+ } else if (instruction[0].equals("SYSTEMPOWER")) {
+ file.add((byte) 0x81);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("SYSTEMSLEEP")) {
+ file.add((byte) 0x82);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("SYSTEMWAKE")) {
+ file.add((byte) 0x83);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("ESCAPE")
+ || instruction[0].equals("ESC")) {
+ file.add((byte) 0x29);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("CAPSLOCK")) {
+ file.add((byte) 0x39);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("PRINTSCREEN")) {
+ file.add((byte) 0x46);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("SCROLLLOCK")) {
+ file.add((byte) 0x47);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("BREAK")
+ || instruction[0].equals("PAUSE")) {
+ file.add((byte) 0x48);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("INSERT")) {
+ file.add((byte) 0x49);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("HOME")) {
+ file.add((byte) 0x4A);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("END")) {
+ file.add((byte) 0x4D);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("PAGEUP")) {
+ file.add((byte) 0x4B);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("DELETE")) {
+ file.add((byte) 0x4C);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("PAGEDOWN")) {
+ file.add((byte) 0x4E);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("RIGHTARROW")
+ || instruction[0].equals("RIGHT")) {
+ file.add((byte) 0x4F);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("LEFTARROW")
+ || instruction[0].equals("LEFT")) {
+ file.add((byte) 0x50);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("DOWNARROW")
+ || instruction[0].equals("DOWN")) {
+ file.add((byte) 0x51);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("UPARROW")
+ || instruction[0].equals("UP")) {
+ file.add((byte) 0x52);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("NUMLOCK")) {
+ file.add((byte) 0x53);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("STOP")) {
+ file.add((byte) 0xb5);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("PLAY")
+ || instruction[0].equals("PAUSE")) {
+ file.add((byte) 0xCD);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("MUTE")) {
+ file.add((byte) 0xE2);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("VOLUMEUP")) {
+ file.add((byte) 0xE9);
+ file.add((byte) 0x00);
+ } else if (instruction[0].equals("VOLUMEDOWN")) {
+ file.add((byte) 0xEA);
+ file.add((byte) 0x00);
+ } else if (functionKeyCheck(instruction[0])) {
+ // Function keys
+ file.add(functionKeyToByte(instruction[0]));
+ file.add((byte) 0x00);
+ } else {
+ // System.out.print(instruction[0]);
+ throw new Exception();
+ }
+
+ // Default delay
+ if (!delayOverride & defaultDelay != 0x00) {
+ while (defaultDelay > 0) {
+ file.add((byte) 0x00);
+ if (defaultDelay > 255) {
+ file.add((byte) 0xFF);
+ defaultDelay = defaultDelay - 255;
+ } else {
+ file.add((byte) defaultDelay);
+ defaultDelay = 0;
+ }
+ }
+ }
+ } catch (Exception e) {
+ System.out.println("Error on Line: " + (i + 1));
+ // e.printStackTrace();
+ }
+ }
+
+ // Write byte array to file
+ byte[] data = new byte[file.size()];
+ for (int i = 0; i < file.size(); i++) {
+ data[i] = file.get(i);
+ }
+ try {
+ File someFile = new File(fileDest);
+ FileOutputStream fos = new FileOutputStream(someFile);
+ fos.write(data);
+ fos.flush();
+ fos.close();
+ } catch (Exception e) {
+ System.out.print("Failed to write hex file!");
+ }
+ }
+
+ private static byte charToByte(char c) {
+ // System.out.println(c);
+ if ((int) c >= 97 && (int) c <= 122)
+ // lower case letters
+ return (byte) (c - 0x5D);
+ else if ((int) c >= 65 && (int) c <= 90)
+ // upper case letters
+ return (byte) (c - 0x3D);
+ else if ((int) c >= 49 && (int) c <= 57)
+ // 0 to 9
+ return (byte) (c - 0x13);
+ else
+ switch (c) {
+ case ' ':
+ return 0x2C;
+ case '!':
+ return 0x1e;
+ case '@':
+ return 0x1f;
+ case '#':
+ return 0x20;
+ case '$':
+ return 0x21;
+ case '%':
+ return 0x22;
+ case '^':
+ return 0x23;
+ case '&':
+ return 0x24;
+ case '*':
+ return 0x25;
+ case '(':
+ return 0x26;
+ case ')':
+ case '0':
+ return 0x27;
+ case '-':
+ case '_':
+ return 0x2D;
+ case '=':
+ case '+':
+ return 0x2E;
+ case '[':
+ case '{':
+ return 0x2F;
+ case ']':
+ case '}':
+ return 0x30;
+ case '\\':
+ case '|':
+ return 0x31;
+ case ':':
+ case ';':
+ return 0x33;
+ case '\'':
+ case '"':
+ return 0x34;
+ case '`':
+ case '~':
+ return 0x35;
+ case ',':
+ case '<':
+ return 0x36;
+ case '.':
+ case '>':
+ return 0x37;
+ case '/':
+ case '?':
+ return 0x38;
+ }
+
+ return (byte) 0x99;
+ }
+
+ private static boolean functionKeyCheck(String possibleFKey) {
+ if (possibleFKey.equals("F1") || possibleFKey.equals("F2")
+ || possibleFKey.equals("F3") || possibleFKey.equals("F4")
+ || possibleFKey.equals("F5") || possibleFKey.equals("F6")
+ || possibleFKey.equals("F7") || possibleFKey.equals("F8")
+ || possibleFKey.equals("F9") || possibleFKey.equals("F10")
+ || possibleFKey.equals("F11") || possibleFKey.equals("F12")) {
+ return true;
+ } else
+ return false;
+ }
+
+ private static byte functionKeyToByte(String fKey) {
+ if (fKey.equals("F1"))
+ return (byte) 0x3a;
+ else if (fKey.equals("F2"))
+ return (byte) 0x3b;
+ else if (fKey.equals("F3"))
+ return (byte) 0x3c;
+ else if (fKey.equals("F4"))
+ return (byte) 0x3d;
+ else if (fKey.equals("F5"))
+ return (byte) 0x3e;
+ else if (fKey.equals("F6"))
+ return (byte) 0x3f;
+ else if (fKey.equals("F7"))
+ return (byte) 0x40;
+ else if (fKey.equals("F8"))
+ return (byte) 0x41;
+ else if (fKey.equals("F9"))
+ return (byte) 0x42;
+ else if (fKey.equals("F10"))
+ return (byte) 0x43;
+ else if (fKey.equals("F11"))
+ return (byte) 0x44;
+ else if (fKey.equals("F12"))
+ return (byte) 0x45;
+ else
+ return (byte) 0x99;
+ }
+}
98 Firmware/Framework.config
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<framework-data>
+ <options>
+ <option id="com.atmel.avr32.sf.uc3b.drivers.pm" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.drivers.gpio" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.drivers.spi" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.common.boards" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.services.fs.fat" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.common.services.storage.ctrl_access" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.common.services.usb.class.hid.device.keyboard.single" value="true" />
+ <option id="com.atmel.avr32.sf.uc3b.utils.print_funcs" value="true" />
+ </options>
+ <files>
+ <file path="src/asf/common/utils/interrupt.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="common/utils/interrupt.h" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/file.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/file.c" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/fs_com.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fs_com.h" changed="False" />
+ <file path="src/config/conf_explorer.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fat_example/conf_explorer.h" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/fat_unusual.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fat_unusual.c" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/file.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/file.h" changed="False" />
+ <file path="src/asf/avr32/boards/evk1101/led.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/boards/evk1101/led.h" changed="False" />
+ <file path="src/asf/avr32/drivers/pm/pm_conf_clocks.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/pm/pm_conf_clocks.c" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/navigation.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/navigation.c" changed="False" />
+ <file path="src/asf/avr32/drivers/intc/exception.S" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/intc/exception.S" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/navigation.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/navigation.h" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/fat.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fat.h" changed="False" />
+ <file path="src/asf/avr32/boards/evk1101/led.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/boards/evk1101/led.c" changed="False" />
+ <file path="src/asf/avr32/services/fs/fat/fat.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fat.c" changed="False" />
+ <file path="src/asf/avr32/drivers/spi/spi.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/spi/spi.c" changed="False" />
+ <file path="src/asf/avr32/utils/preprocessor/stringz.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/preprocessor/stringz.h" changed="False" />
+ <file path="src/asf/avr32/utils/status_codes.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/status_codes.h" changed="False" />
+ <file path="src/asf/avr32/drivers/intc/intc.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/intc/intc.c" changed="False" />
+ <file path="src/asf/avr32/drivers/intc/intc.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/intc/intc.h" changed="False" />
+ <file path="src/asf/common/boards/board.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="common/boards/board.h" changed="False" />
+ <file path="src/asf/avr32/drivers/pm/power_clocks_lib.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/pm/power_clocks_lib.h" changed="False" />
+ <file path="src/asf/avr32/drivers/flashc/flashc.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/flashc/flashc.c" changed="False" />
+ <file path="src/asf/avr32/drivers/pm/power_clocks_lib.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/pm/power_clocks_lib.c" changed="False" />
+ <file path="src/asf/common/services/storage/ctrl_access/ctrl_access.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="common/services/storage/ctrl_access/ctrl_access.c" changed="False" />
+ <file path="src/asf/avr32/boards/evk1101/evk1101.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/boards/evk1101/evk1101.h" changed="False" />
+ <file path="src/asf/avr32/drivers/pm/pm.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/pm/pm.h" changed="False" />
+ <file path="src/asf/common/services/storage/ctrl_access/ctrl_access.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="common/services/storage/ctrl_access/ctrl_access.h" changed="False" />
+ <file path="src/asf/avr32/utils/preprocessor/mrepeat.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/preprocessor/mrepeat.h" changed="False" />
+ <file path="src/asf/avr32/drivers/pm/pm.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/pm/pm.c" changed="False" />
+ <file path="src/asf/avr32/drivers/usart/usart.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/usart/usart.c" changed="False" />
+ <file path="src/asf/avr32/utils/preprocessor/preprocessor.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/preprocessor/preprocessor.h" changed="False" />
+ <file path="src/asf/avr32/utils/linker_scripts/at32uc3b/0256/gcc/link_uc3b0256.lds" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/linker_scripts/at32uc3b/0256/gcc/link_uc3b0256.lds" changed="False" />
+ <file path="src/asf/avr32/drivers/gpio/gpio.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/gpio/gpio.h" changed="False" />
+ <file path="src/asf/avr32/drivers/usart/usart.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/usart/usart.h" changed="False" />
+ <file path="src/asf/avr32/utils/startup/startup_uc3.S" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/startup/startup_uc3.S" changed="False" />
+ <file path="src/asf/avr32/utils/startup/trampoline_uc3.S" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/startup/trampoline_uc3.S" changed="False" />
+ <file path="src/asf/avr32/drivers/gpio/gpio.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/gpio/gpio.c" changed="False" />
+ <file path="src/asf/avr32/utils/debug/print_funcs.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/debug/print_funcs.h" changed="False" />
+ <file path="src/asf/avr32/drivers/spi/spi.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/spi/spi.h" changed="False" />
+ <file path="src/config/conf_access.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fat_example/conf_access.h" changed="False" />
+ <file path="src/asf/avr32/utils/startup/trampoline_uc3.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/startup/trampoline_uc3.h" changed="False" />
+ <file path="src/asf.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="./avr32/services/fs/fat/fat_example/at32uc3b0256_evk1101/as5_32/asf.h" changed="False" />
+ <file path="src/asf/common/utils/interrupt/interrupt_avr32.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="common/utils/interrupt/interrupt_avr32.h" changed="False" />
+ <file path="src/asf/avr32/utils/parts.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/parts.h" changed="False" />
+ <file path="src/asf/avr32/utils/debug/print_funcs.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/debug/print_funcs.c" changed="False" />
+ <file path="src/fat_example.c" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/services/fs/fat/fat_example/fat_example.c" changed="False" />
+ <file path="src/asf/avr32/utils/preprocessor/tpaste.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/preprocessor/tpaste.h" changed="False" />
+ <file path="src/asf/avr32/drivers/pm/sleep.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/pm/sleep.h" changed="False" />
+ <file path="src/asf/avr32/utils/compiler.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/utils/compiler.h" changed="False" />
+ <file path="src/asf/avr32/drivers/flashc/flashc.h" framework="com.atmel.avr32.sf.uc3b" version="2.3.0-15278.151" source="avr32/drivers/flashc/flashc.h" changed="False" />
+ <file path="src/asf/avr32/drivers/usbb/usbb_device.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="avr32/drivers/usbb/usbb_device.c" changed="False" />
+ <file path="src/asf/avr32/drivers/usbb/usbb_otg.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="avr32/drivers/usbb/usbb_otg.h" changed="False" />
+ <file path="src/asf/avr32/drivers/usbb/usbb_device.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="avr32/drivers/usbb/usbb_device.h" changed="False" />
+ <file path="src/asf/common/services/sleepmgr/uc3/sleepmgr.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/sleepmgr/uc3/sleepmgr.c" changed="False" />
+ <file path="src/asf/common/services/sleepmgr/uc3/sleepmgr.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/sleepmgr/uc3/sleepmgr.h" changed="False" />
+ <file path="src/asf/common/services/sleepmgr/sleepmgr.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/sleepmgr/sleepmgr.h" changed="False" />
+ <file path="src/config/conf_sleepmgr.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/sleepmgr/uc3/module_config/conf_sleepmgr.h" changed="False" />
+ <file path="src/asf/common/services/clock/uc3b0_b1/sysclk.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/uc3b0_b1/sysclk.c" changed="False" />
+ <file path="src/asf/common/services/clock/sysclk.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/sysclk.h" changed="False" />
+ <file path="src/asf/common/services/clock/genclk.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/genclk.h" changed="False" />
+ <file path="src/asf/common/services/clock/uc3b0_b1/pll.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/uc3b0_b1/pll.h" changed="False" />
+ <file path="src/asf/common/services/clock/uc3b0_b1/genclk.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/uc3b0_b1/genclk.h" changed="False" />
+ <file path="src/asf/common/services/clock/uc3b0_b1/sysclk.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/uc3b0_b1/sysclk.h" changed="False" />
+ <file path="src/asf/common/services/clock/uc3b0_b1/osc.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/uc3b0_b1/osc.h" changed="False" />
+ <file path="src/asf/common/services/clock/pll.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/pll.h" changed="False" />
+ <file path="src/asf/common/services/clock/osc.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/osc.h" changed="False" />
+ <file path="src/config/conf_clock.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/clock/uc3b0_b1/module_config/conf_clock.h" changed="False" />
+ <file path="src/asf/common/services/usb/udc/udc.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/udc/udc.c" changed="False" />
+ <file path="src/asf/common/services/usb/udc/udi.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/udc/udi.h" changed="False" />
+ <file path="src/asf/common/services/usb/usb_protocol.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/usb_protocol.h" changed="False" />
+ <file path="src/asf/common/services/usb/udc/udc_desc.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/udc/udc_desc.h" changed="False" />
+ <file path="src/asf/common/services/usb/udc/udc.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/udc/udc.h" changed="False" />
+ <file path="src/asf/common/services/usb/usb_atmel.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/usb_atmel.h" changed="False" />
+ <file path="src/asf/common/services/usb/udc/udd.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/udc/udd.h" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/usb_protocol_hid.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/usb_protocol_hid.h" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/device/kbd/udi_hid_kbd_desc.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/kbd/udi_hid_kbd_desc.c" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/device/kbd/udi_hid_kbd.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/kbd/udi_hid_kbd.c" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/device/kbd/udi_hid_kbd_conf.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/kbd/udi_hid_kbd_conf.h" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/device/kbd/udi_hid_kbd.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/kbd/udi_hid_kbd.h" changed="False" />
+ <file path="src/config/conf_usb.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/kbd/module_config/conf_usb.h" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/device/udi_hid.c" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/udi_hid.c" changed="False" />
+ <file path="src/asf/common/services/usb/class/hid/device/udi_hid.h" framework="com.atmel.avr32.sf.uc3b" version="2.2.2" source="common/services/usb/class/hid/device/udi_hid.h" changed="False" />
+ </files>
+ <documentation help="http://asf.atmel.com/docs/latest/avr32/services/fs/fat/fat_example/at32uc3b0256_evk1101/doxygen/html/" />
+</framework-data>
563 Firmware/duck.avrgccproj
@@ -0,0 +1,563 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectVersion>1.0</ProjectVersion>
+ <ProjectGuid>fee31e0f-40f4-11e0-93cf-000c29a22d21</ProjectGuid>
+ <avrdevice>AT32UC3B0256</avrdevice>
+ <avrdeviceseries>uc3b</avrdeviceseries>
+ <OutputFile>$(MSBuildProjectName).elf</OutputFile>
+ <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
+ <AvrGccProjectExtensions />
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <Name>$(MSBuildProjectName)</Name>
+ <RootNamespace>$(MSBuildProjectName)</RootNamespace>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+ <ToolchainSettings>
+ <Avr32Gcc>
+ <avr32gcc.compiler.symbols.DefSymbols>
+ <ListValues>
+ <Value>BOARD=EVK1101</Value>
+ </ListValues>
+ </avr32gcc.compiler.symbols.DefSymbols>
+ <avr32gcc.compiler.directories.IncludePaths>
+ <ListValues>
+ <Value>../src</Value>
+ <Value>../src/asf/avr32/boards</Value>
+ <Value>../src/asf/avr32/boards/evk1101</Value>
+ <Value>../src/asf/avr32/drivers/flashc</Value>
+ <Value>../src/asf/avr32/drivers/gpio</Value>
+ <Value>../src/asf/avr32/drivers/intc</Value>
+ <Value>../src/asf/avr32/drivers/pm</Value>
+ <Value>../src/asf/avr32/drivers/spi</Value>
+ <Value>../src/asf/avr32/drivers/usart</Value>
+ <Value>../src/asf/avr32/services/fs/fat</Value>
+ <Value>../src/asf/avr32/services/fs/fat/fat_example</Value>
+ <Value>../src/asf/avr32/utils</Value>
+ <Value>../src/asf/avr32/utils/debug</Value>
+ <Value>../src/asf/avr32/utils/preprocessor</Value>
+ <Value>../src/asf/common/boards</Value>
+ <Value>../src/asf/common/services/storage/ctrl_access</Value>
+ <Value>../src/asf/common/utils</Value>
+ <Value>../src/config</Value>
+ <Value>../src/asf/avr32/drivers/usbb</Value>
+ <Value>../src/asf/common/services/sleepmgr</Value>
+ <Value>../src/asf/common/services/clock</Value>
+ <Value>../src/asf/common/services/usb</Value>
+ <Value>../src/asf/common/services/usb/udc</Value>
+ <Value>../src/asf/common/services/usb/class/hid</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device/kbd</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device</Value>
+ <Value>../src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi</Value>
+ </ListValues>
+ </avr32gcc.compiler.directories.IncludePaths>
+ <avr32gcc.compiler.optimization.level>Optimize for size (-Os)</avr32gcc.compiler.optimization.level>
+ <avr32gcc.compiler.optimization.OtherFlags>-fdata-sections</avr32gcc.compiler.optimization.OtherFlags>
+ <avr32gcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</avr32gcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
+ <avr32gcc.compiler.warnings.AllWarnings>True</avr32gcc.compiler.warnings.AllWarnings>
+ <avr32gcc.compiler.miscellaneous.OtherFlags>-std=gnu99 -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -mrelax</avr32gcc.compiler.miscellaneous.OtherFlags>
+ <avr32gcc.linker.general.DoNotUseStandardStartFiles>True</avr32gcc.linker.general.DoNotUseStandardStartFiles>
+ <avr32gcc.linker.optimization.GarbageCollectUnusedSections>True</avr32gcc.linker.optimization.GarbageCollectUnusedSections>
+ <avr32gcc.linker.miscellaneous.LinkerFlags>-T../src/asf/avr32/utils/linker_scripts/at32uc3b/0256/gcc/link_uc3b0256.lds -Wl,--relax</avr32gcc.linker.miscellaneous.LinkerFlags>
+ <avr32gcc.assembler.general.AssemblerFlags>-mrelax</avr32gcc.assembler.general.AssemblerFlags>
+ <avr32gcc.assembler.general.IncludePaths>
+ <ListValues>
+ <Value>../src</Value>
+ <Value>../src/asf/avr32/boards</Value>
+ <Value>../src/asf/avr32/boards/evk1101</Value>
+ <Value>../src/asf/avr32/drivers/flashc</Value>
+ <Value>../src/asf/avr32/drivers/gpio</Value>
+ <Value>../src/asf/avr32/drivers/intc</Value>
+ <Value>../src/asf/avr32/drivers/pm</Value>
+ <Value>../src/asf/avr32/drivers/spi</Value>
+ <Value>../src/asf/avr32/drivers/usart</Value>
+ <Value>../src/asf/avr32/services/fs/fat</Value>
+ <Value>../src/asf/avr32/services/fs/fat/fat_example</Value>
+ <Value>../src/asf/avr32/utils</Value>
+ <Value>../src/asf/avr32/utils/debug</Value>
+ <Value>../src/asf/avr32/utils/preprocessor</Value>
+ <Value>../src/asf/common/boards</Value>
+ <Value>../src/asf/common/services/storage/ctrl_access</Value>
+ <Value>../src/asf/common/utils</Value>
+ <Value>../src/config</Value>
+ <Value>../src/asf/avr32/drivers/usbb</Value>
+ <Value>../src/asf/common/services/sleepmgr</Value>
+ <Value>../src/asf/common/services/clock</Value>
+ <Value>../src/asf/common/services/usb</Value>
+ <Value>../src/asf/common/services/usb/udc</Value>
+ <Value>../src/asf/common/services/usb/class/hid</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device/kbd</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device</Value>
+ </ListValues>
+ </avr32gcc.assembler.general.IncludePaths>
+ <avr32gcc.preprocessingassembler.general.AssemblerFlags>-mrelax</avr32gcc.preprocessingassembler.general.AssemblerFlags>
+ <avr32gcc.preprocessingassembler.general.IncludePaths>
+ <ListValues>
+ <Value>../src</Value>
+ <Value>../src/asf/avr32/boards</Value>
+ <Value>../src/asf/avr32/boards/evk1101</Value>
+ <Value>../src/asf/avr32/drivers/flashc</Value>
+ <Value>../src/asf/avr32/drivers/gpio</Value>
+ <Value>../src/asf/avr32/drivers/intc</Value>
+ <Value>../src/asf/avr32/drivers/pm</Value>
+ <Value>../src/asf/avr32/drivers/spi</Value>
+ <Value>../src/asf/avr32/drivers/usart</Value>
+ <Value>../src/asf/avr32/services/fs/fat</Value>
+ <Value>../src/asf/avr32/services/fs/fat/fat_example</Value>
+ <Value>../src/asf/avr32/utils</Value>
+ <Value>../src/asf/avr32/utils/debug</Value>
+ <Value>../src/asf/avr32/utils/preprocessor</Value>
+ <Value>../src/asf/common/boards</Value>
+ <Value>../src/asf/common/services/storage/ctrl_access</Value>
+ <Value>../src/asf/common/utils</Value>
+ <Value>../src/config</Value>
+ <Value>../src/asf/avr32/drivers/usbb</Value>
+ <Value>../src/asf/common/services/sleepmgr</Value>
+ <Value>../src/asf/common/services/clock</Value>
+ <Value>../src/asf/common/services/usb</Value>
+ <Value>../src/asf/common/services/usb/udc</Value>
+ <Value>../src/asf/common/services/usb/class/hid</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device/kbd</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device</Value>
+ </ListValues>
+ </avr32gcc.preprocessingassembler.general.IncludePaths>
+ </Avr32Gcc>
+ </ToolchainSettings>
+ <GenerateHexFile>True</GenerateHexFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <ToolchainSettings>
+ <Avr32Gcc>
+ <avr32gcc.compiler.symbols.DefSymbols>
+ <ListValues>
+ <Value>BOARD=EVK1101</Value>
+ </ListValues>
+ </avr32gcc.compiler.symbols.DefSymbols>
+ <avr32gcc.compiler.directories.IncludePaths>
+ <ListValues>
+ <Value>../src</Value>
+ <Value>../src/asf/avr32/boards</Value>
+ <Value>../src/asf/avr32/boards/evk1101</Value>
+ <Value>../src/asf/avr32/drivers/flashc</Value>
+ <Value>../src/asf/avr32/drivers/gpio</Value>
+ <Value>../src/asf/avr32/drivers/intc</Value>
+ <Value>../src/asf/avr32/drivers/pm</Value>
+ <Value>../src/asf/avr32/drivers/spi</Value>
+ <Value>../src/asf/avr32/drivers/usart</Value>
+ <Value>../src/asf/avr32/services/fs/fat</Value>
+ <Value>../src/asf/avr32/services/fs/fat/fat_example</Value>
+ <Value>../src/asf/avr32/utils</Value>
+ <Value>../src/asf/avr32/utils/debug</Value>
+ <Value>../src/asf/avr32/utils/preprocessor</Value>
+ <Value>../src/asf/common/boards</Value>
+ <Value>../src/asf/common/services/storage/ctrl_access</Value>
+ <Value>../src/asf/common/utils</Value>
+ <Value>../src/config</Value>
+ <Value>../src/asf/avr32/drivers/usbb</Value>
+ <Value>../src/asf/common/services/sleepmgr</Value>
+ <Value>../src/asf/common/services/clock</Value>
+ <Value>../src/asf/common/services/usb</Value>
+ <Value>../src/asf/common/services/usb/udc</Value>
+ <Value>../src/asf/common/services/usb/class/hid</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device/kbd</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device</Value>
+ <Value>../src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi</Value>
+ </ListValues>
+ </avr32gcc.compiler.directories.IncludePaths>
+ <avr32gcc.compiler.optimization.level>Optimize (-O1)</avr32gcc.compiler.optimization.level>
+ <avr32gcc.compiler.optimization.OtherFlags>-fdata-sections</avr32gcc.compiler.optimization.OtherFlags>
+ <avr32gcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</avr32gcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
+ <avr32gcc.compiler.optimization.DebugLevel>Maximum (-g3)</avr32gcc.compiler.optimization.DebugLevel>
+ <avr32gcc.compiler.warnings.AllWarnings>True</avr32gcc.compiler.warnings.AllWarnings>
+ <avr32gcc.compiler.miscellaneous.OtherFlags>-std=gnu99 -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -mrelax</avr32gcc.compiler.miscellaneous.OtherFlags>
+ <avr32gcc.linker.general.DoNotUseStandardStartFiles>True</avr32gcc.linker.general.DoNotUseStandardStartFiles>
+ <avr32gcc.linker.optimization.GarbageCollectUnusedSections>True</avr32gcc.linker.optimization.GarbageCollectUnusedSections>
+ <avr32gcc.linker.miscellaneous.LinkerFlags>-T../src/asf/avr32/utils/linker_scripts/at32uc3b/0256/gcc/link_uc3b0256.lds -Wl,--relax</avr32gcc.linker.miscellaneous.LinkerFlags>
+ <avr32gcc.assembler.general.AssemblerFlags>-mrelax</avr32gcc.assembler.general.AssemblerFlags>
+ <avr32gcc.assembler.general.IncludePaths>
+ <ListValues>
+ <Value>../src</Value>
+ <Value>../src/asf/avr32/boards</Value>
+ <Value>../src/asf/avr32/boards/evk1101</Value>
+ <Value>../src/asf/avr32/drivers/flashc</Value>
+ <Value>../src/asf/avr32/drivers/gpio</Value>
+ <Value>../src/asf/avr32/drivers/intc</Value>
+ <Value>../src/asf/avr32/drivers/pm</Value>
+ <Value>../src/asf/avr32/drivers/spi</Value>
+ <Value>../src/asf/avr32/drivers/usart</Value>
+ <Value>../src/asf/avr32/services/fs/fat</Value>
+ <Value>../src/asf/avr32/services/fs/fat/fat_example</Value>
+ <Value>../src/asf/avr32/utils</Value>
+ <Value>../src/asf/avr32/utils/debug</Value>
+ <Value>../src/asf/avr32/utils/preprocessor</Value>
+ <Value>../src/asf/common/boards</Value>
+ <Value>../src/asf/common/services/storage/ctrl_access</Value>
+ <Value>../src/asf/common/utils</Value>
+ <Value>../src/config</Value>
+ <Value>../src/asf/avr32/drivers/usbb</Value>
+ <Value>../src/asf/common/services/sleepmgr</Value>
+ <Value>../src/asf/common/services/clock</Value>
+ <Value>../src/asf/common/services/usb</Value>
+ <Value>../src/asf/common/services/usb/udc</Value>
+ <Value>../src/asf/common/services/usb/class/hid</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device/kbd</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device</Value>
+ </ListValues>
+ </avr32gcc.assembler.general.IncludePaths>
+ <avr32gcc.preprocessingassembler.general.AssemblerFlags>-mrelax</avr32gcc.preprocessingassembler.general.AssemblerFlags>
+ <avr32gcc.preprocessingassembler.general.IncludePaths>
+ <ListValues>
+ <Value>../src</Value>
+ <Value>../src/asf/avr32/boards</Value>
+ <Value>../src/asf/avr32/boards/evk1101</Value>
+ <Value>../src/asf/avr32/drivers/flashc</Value>
+ <Value>../src/asf/avr32/drivers/gpio</Value>
+ <Value>../src/asf/avr32/drivers/intc</Value>
+ <Value>../src/asf/avr32/drivers/pm</Value>
+ <Value>../src/asf/avr32/drivers/spi</Value>
+ <Value>../src/asf/avr32/drivers/usart</Value>
+ <Value>../src/asf/avr32/services/fs/fat</Value>
+ <Value>../src/asf/avr32/services/fs/fat/fat_example</Value>
+ <Value>../src/asf/avr32/utils</Value>
+ <Value>../src/asf/avr32/utils/debug</Value>
+ <Value>../src/asf/avr32/utils/preprocessor</Value>
+ <Value>../src/asf/common/boards</Value>
+ <Value>../src/asf/common/services/storage/ctrl_access</Value>
+ <Value>../src/asf/common/utils</Value>
+ <Value>../src/config</Value>
+ <Value>../src/asf/avr32/drivers/usbb</Value>
+ <Value>../src/asf/common/services/sleepmgr</Value>
+ <Value>../src/asf/common/services/clock</Value>
+ <Value>../src/asf/common/services/usb</Value>
+ <Value>../src/asf/common/services/usb/udc</Value>
+ <Value>../src/asf/common/services/usb/class/hid</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device/kbd</Value>
+ <Value>../src/asf/common/services/usb/class/hid/device</Value>
+ </ListValues>
+ </avr32gcc.preprocessingassembler.general.IncludePaths>
+</Avr32Gcc>
+ </ToolchainSettings>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="src\asf.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\boards\evk1101\evk1101.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\boards\evk1101\init.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\boards\evk1101\led.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\boards\evk1101\led.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\components\memory\sd_mmc\sd_mmc_spi\sd_mmc_spi.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\components\memory\sd_mmc\sd_mmc_spi\sd_mmc_spi.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\components\memory\sd_mmc\sd_mmc_spi\sd_mmc_spi_mem.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\components\memory\sd_mmc\sd_mmc_spi\sd_mmc_spi_mem.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\flashc\flashc.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\flashc\flashc.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\gpio\gpio.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\gpio\gpio.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\intc\exception.S">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\intc\intc.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\intc\intc.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\pm\pm.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\pm\pm.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\pm\pm_conf_clocks.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\pm\power_clocks_lib.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\pm\power_clocks_lib.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\pm\sleep.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\spi\spi.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\spi\spi.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\usart\usart.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\usart\usart.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\usbb\usbb_device.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\usbb\usbb_device.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\drivers\usbb\usbb_otg.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\fat.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\fat.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\fat_unusual.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\file.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\file.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\fs_com.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\navigation.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\services\fs\fat\navigation.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\compiler.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\debug\print_funcs.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\debug\print_funcs.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\linker_scripts\at32uc3b\0256\gcc\link_uc3b0256.lds">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\parts.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\preprocessor\mrepeat.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\preprocessor\preprocessor.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\preprocessor\stringz.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\preprocessor\tpaste.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\startup\startup_uc3.S">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\startup\trampoline_uc3.S">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\startup\trampoline_uc3.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\avr32\utils\status_codes.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\boards\board.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\genclk.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\osc.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\pll.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\sysclk.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\uc3b0_b1\genclk.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\uc3b0_b1\osc.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\uc3b0_b1\pll.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\uc3b0_b1\sysclk.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\clock\uc3b0_b1\sysclk.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\sleepmgr\sleepmgr.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\sleepmgr\uc3\sleepmgr.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\sleepmgr\uc3\sleepmgr.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\storage\ctrl_access\ctrl_access.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\storage\ctrl_access\ctrl_access.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\device\kbd\udi_hid_kbd.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\device\kbd\udi_hid_kbd.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\device\kbd\udi_hid_kbd_conf.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\device\kbd\udi_hid_kbd_desc.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\device\udi_hid.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\device\udi_hid.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\class\hid\usb_protocol_hid.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\udc\udc.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\udc\udc.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\udc\udc_desc.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\udc\udd.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\udc\udi.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\usb_atmel.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\services\usb\usb_protocol.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\utils\interrupt.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\asf\common\utils\interrupt\interrupt_avr32.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_access.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_board.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_clock.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_explorer.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_sd_mmc_spi.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_sleepmgr.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\config\conf_usb.h">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\main.c">
+ <SubType>compile</SubType>
+ </Compile>
+ <Compile Include="src\main.h">
+ <SubType>compile</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="src\" />
+ <Folder Include="src\asf\" />
+ <Folder Include="src\asf\avr32\" />
+ <Folder Include="src\asf\avr32\boards\" />
+ <Folder Include="src\asf\avr32\boards\evk1101\" />
+ <Folder Include="src\asf\avr32\components\" />
+ <Folder Include="src\asf\avr32\components\memory\" />
+ <Folder Include="src\asf\avr32\components\memory\sd_mmc\" />
+ <Folder Include="src\asf\avr32\components\memory\sd_mmc\sd_mmc_spi\" />
+ <Folder Include="src\asf\avr32\drivers\" />
+ <Folder Include="src\asf\avr32\drivers\flashc\" />
+ <Folder Include="src\asf\avr32\drivers\gpio\" />
+ <Folder Include="src\asf\avr32\drivers\intc\" />
+ <Folder Include="src\asf\avr32\drivers\pm\" />
+ <Folder Include="src\asf\avr32\drivers\spi\" />
+ <Folder Include="src\asf\avr32\drivers\usart\" />
+ <Folder Include="src\asf\avr32\drivers\usbb\" />
+ <Folder Include="src\asf\avr32\services\" />
+ <Folder Include="src\asf\avr32\services\fs\" />
+ <Folder Include="src\asf\avr32\services\fs\fat\" />
+ <Folder Include="src\asf\avr32\utils\" />
+ <Folder Include="src\asf\avr32\utils\debug\" />
+ <Folder Include="src\asf\avr32\utils\linker_scripts\" />
+ <Folder Include="src\asf\avr32\utils\linker_scripts\at32uc3b\" />
+ <Folder Include="src\asf\avr32\utils\linker_scripts\at32uc3b\0256\" />
+ <Folder Include="src\asf\avr32\utils\linker_scripts\at32uc3b\0256\gcc\" />
+ <Folder Include="src\asf\avr32\utils\preprocessor\" />
+ <Folder Include="src\asf\avr32\utils\startup\" />
+ <Folder Include="src\asf\common\" />
+ <Folder Include="src\asf\common\boards\" />
+ <Folder Include="src\asf\common\services\" />
+ <Folder Include="src\asf\common\services\clock\" />
+ <Folder Include="src\asf\common\services\clock\uc3b0_b1\" />
+ <Folder Include="src\asf\common\services\sleepmgr\" />
+ <Folder Include="src\asf\common\services\sleepmgr\uc3\" />
+ <Folder Include="src\asf\common\services\storage\" />
+ <Folder Include="src\asf\common\services\storage\ctrl_access\" />
+ <Folder Include="src\asf\common\services\usb\" />
+ <Folder Include="src\asf\common\services\usb\class\" />
+ <Folder Include="src\asf\common\services\usb\class\hid\" />
+ <Folder Include="src\asf\common\services\usb\class\hid\device\" />
+ <Folder Include="src\asf\common\services\usb\class\hid\device\kbd\" />
+ <Folder Include="src\asf\common\services\usb\udc\" />
+ <Folder Include="src\asf\common\utils\" />
+ <Folder Include="src\asf\common\utils\interrupt\" />
+ <Folder Include="src\config\" />
+ </ItemGroup>
+ <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\AvrGCC32.targets" />
+</Project>
20 Firmware/duck.avrsln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# AvrStudio Solution File, Format Version 11.00
+Project("{D1100916-62DA-4D80-A9B4-55A1E7CCEEB3}") = "duck", "duck.avrgccproj", "{FEE31E0F-40F4-11E0-93CF-000C29A22D21}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|AVR = Debug|AVR
+ Release|AVR = Release|AVR
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FEE31E0F-40F4-11E0-93CF-000C29A22D21}.Debug|AVR.ActiveCfg = Debug|AVR
+ {FEE31E0F-40F4-11E0-93CF-000C29A22D21}.Debug|AVR.Build.0 = Debug|AVR
+ {FEE31E0F-40F4-11E0-93CF-000C29A22D21}.Release|AVR.ActiveCfg = Release|AVR
+ {FEE31E0F-40F4-11E0-93CF-000C29A22D21}.Release|AVR.Build.0 = Release|AVR
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
BIN  Firmware/duck.avrsuo
Binary file not shown
71 Firmware/src/asf.h
@@ -0,0 +1,71 @@
+/**
+ * \file
+ *
+ * \brief Autogenerated API include file for the AVR Software Framework (ASF)
+ *
+ * Copyright (C) 2011 Atmel Corporation. All rights reserved.
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifndef ASF_H
+#define ASF_H
+
+/*
+ * This file includes all API header files for the selected drivers from ASF.
+ *
+ * The file is automatically generated and will be re-written when
+ * running the ASF driver selector tool. Any changes will be discarded.
+ */
+#include <fat.h>
+#include <interrupt.h>
+#include <print_funcs.h>
+#include <spi.h>
+#include <ctrl_access.h>
+#include <power_clocks_lib.h>
+#include <sleep.h>
+#include <file.h>
+#include <status_codes.h>
+#include <gpio.h>
+#include <fs_com.h>
+#include <board.h>
+#include <navigation.h>
+#include <compiler.h>
+#include <usart.h>
+#include <flashc.h>
+
+
+#include <sleepmgr.h>
+#include <sysclk.h>
+#include <usb_protocol_hid.h>
+#include <udi_hid_kbd.h>
+#include <udi_hid.h>
+#endif // ASF_H
290 Firmware/src/asf/avr32/boards/evk1101/evk1101.h
@@ -0,0 +1,290 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT32UC3B EVK1101 board header file.
+ *
+ * This file contains definitions and services related to the features of the
+ * EVK1101 board rev. A and B.
+ *
+ * To use this board, define BOARD=EVK1101.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 AT32UC3B devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _EVK1101_H_
+#define _EVK1101_H_
+
+#include "compiler.h"
+
+#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
+# include "led.h"
+#endif // __AVR32_ABI_COMPILER__
+
+
+/*! \name Oscillator Definitions
+ */
+//! @{
+
+#if UC3B
+#define FOSC32 32768 //!< Osc32 frequency: Hz.
+#define OSC32_STARTUP AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.
+
+#define FOSC0 12000000 //!< Osc0 frequency: Hz.
+#define OSC0_STARTUP AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC //!< Osc0 startup time: RCOsc periods.
+#elif UC3D
+#define FOSC32 32768 //!< Osc32 frequency: Hz.
+#define OSC32_STARTUP AVR32_SCIF_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.
+
+#define FOSC0 12000000 //!< Osc0 frequency: Hz.
+#define OSC0_STARTUP AVR32_SCIF_OSCCTRL0_STARTUP_2048_RCOSC //!< Osc0 startup time: RCOsc periods.
+
+#endif
+
+// Osc1 crystal is not mounted by default. Set the following definitions to the
+// appropriate values if a custom Osc1 crystal is mounted on your board.
+//#define FOSC1 12000000 //!< Osc1 frequency: Hz.
+//#define OSC1_STARTUP AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC //!< Osc1 startup time: RCOsc periods.
+
+//! @}
+
+/* These are documented in services/basic/clock/uc3b0_b1/osc.h */
+#define BOARD_OSC0_HZ 12000000
+#define BOARD_OSC0_STARTUP_US 17000
+#define BOARD_OSC0_IS_XTAL true
+#define BOARD_OSC32_HZ 32768
+#define BOARD_OSC32_STARTUP_US 71000
+#define BOARD_OSC32_IS_XTAL true
+
+/*! \name USB Definitions
+ */
+//! @{
+
+//! Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.
+//! To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and
+//! AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3bxxxx.h>.
+#define USB_ID AVR32_USBB_USB_ID_0_0
+
+//! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.
+//! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and
+//! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3bxxxx.h>.
+#define USB_VBOF AVR32_USBB_USB_VBOF_0_0
+
+//! Active level of the USB_VBOF output pin.
+#define USB_VBOF_ACTIVE_LEVEL LOW
+
+//! USB overcurrent detection pin.
+#define USB_OVERCURRENT_DETECT_PIN AVR32_PIN_PA20
+
+//! @}
+
+
+//! Number of LEDs.
+#define LED_COUNT 4
+
+/*! \name GPIO Connections of LEDs
+ */
+//! @{
+#define LED0_GPIO AVR32_PIN_PA07
+#define LED1_GPIO AVR32_PIN_PA08
+#define LED2_GPIO AVR32_PIN_PA21
+#define LED3_GPIO AVR32_PIN_PA22
+//! @}
+
+/*! \name PWM Channels of LEDs
+ */
+//! @{
+#define LED0_PWM 0
+#define LED1_PWM 1
+#define LED2_PWM 2
+#define LED3_PWM 6
+//! @}
+
+/*! \name PWM Functions of LEDs
+ */
+//! @{
+#define LED0_PWM_FUNCTION AVR32_PWM_0_0_FUNCTION
+#define LED1_PWM_FUNCTION AVR32_PWM_1_0_FUNCTION
+#define LED2_PWM_FUNCTION AVR32_PWM_2_0_FUNCTION
+#define LED3_PWM_FUNCTION AVR32_PWM_6_0_FUNCTION
+//! @}
+
+/*! \name Color Identifiers of LEDs to Use with LED Functions
+ */
+//! @{
+#define LED_MONO0_GREEN LED0
+#define LED_MONO1_GREEN LED1
+#define LED_MONO2_GREEN LED2
+#define LED_MONO3_GREEN LED3
+//! @}
+
+
+/*! \name GPIO Connections of Push Buttons
+ */
+//! @{
+#define GPIO_PUSH_BUTTON_0 AVR32_PIN_PB02
+#define GPIO_PUSH_BUTTON_0_PRESSED 0
+#define GPIO_PUSH_BUTTON_1 AVR32_PIN_PB03
+#define GPIO_PUSH_BUTTON_1_PRESSED 0
+//! @}
+
+
+/*! \name GPIO Connections of the Joystick
+ */
+//! @{
+#define GPIO_JOYSTICK_PUSH AVR32_PIN_PA13
+#define GPIO_JOYSTICK_PUSH_PRESSED 0
+#define GPIO_JOYSTICK_LEFT AVR32_PIN_PB06
+#define GPIO_JOYSTICK_LEFT_PRESSED 0
+#define GPIO_JOYSTICK_RIGHT AVR32_PIN_PB09
+#define GPIO_JOYSTICK_RIGHT_PRESSED 0
+#define GPIO_JOYSTICK_UP AVR32_PIN_PB07
+#define GPIO_JOYSTICK_UP_PRESSED 0
+#define GPIO_JOYSTICK_DOWN AVR32_PIN_PB08
+#define GPIO_JOYSTICK_DOWN_PRESSED 0
+//! @}
+
+
+/*! \name ADC Connection of the Temperature Sensor
+ */
+//! @{
+#define ADC_TEMPERATURE_CHANNEL 7
+#define ADC_TEMPERATURE_PIN AVR32_ADC_AD_7_PIN
+#define ADC_TEMPERATURE_FUNCTION AVR32_ADC_AD_7_FUNCTION
+//! @}
+
+
+/*! \name ADC Connection of the Light Sensor
+ */
+//! @{
+#define ADC_LIGHT_CHANNEL 6
+#define ADC_LIGHT_PIN AVR32_ADC_AD_6_PIN
+#define ADC_LIGHT_FUNCTION AVR32_ADC_AD_6_FUNCTION
+//! @}
+
+
+/*! \name ADC Connections of the Accelerometer
+ */
+//! @{
+#define ADC_ACC_X_CHANNEL 1
+#define ADC_ACC_X_PIN AVR32_ADC_AD_1_PIN
+#define ADC_ACC_X_FUNCTION AVR32_ADC_AD_1_FUNCTION
+#define ADC_ACC_Y_CHANNEL 2
+#define ADC_ACC_Y_PIN AVR32_ADC_AD_2_PIN
+#define ADC_ACC_Y_FUNCTION AVR32_ADC_AD_2_FUNCTION
+#define ADC_ACC_Z_CHANNEL 3
+#define ADC_ACC_Z_PIN AVR32_ADC_AD_3_PIN
+#define ADC_ACC_Z_FUNCTION AVR32_ADC_AD_3_FUNCTION
+//! @}
+
+
+/*! \name PWM Connections of Audio
+ */
+//! @{
+#define AUDIO_LOW_PWM_CHANNEL 5
+#define AUDIO_LOW_PWM_PIN AVR32_PWM_5_0_PIN
+#define AUDIO_LOW_PWM_FUNCTION AVR32_PWM_5_0_FUNCTION
+#define AUDIO_HIGH_PWM_CHANNEL 6
+#define AUDIO_HIGH_PWM_PIN AVR32_PWM_6_1_PIN
+#define AUDIO_HIGH_PWM_FUNCTION AVR32_PWM_6_1_FUNCTION
+//! @}
+
+
+/*! \name SPI Connections of the AT45DBX Data Flash Memory
+ */
+//! @{
+#define AT45DBX_SPI (&AVR32_SPI)
+#define AT45DBX_SPI_NPCS 0
+#define AT45DBX_SPI_SCK_PIN AVR32_SPI_SCK_0_0_PIN
+#define AT45DBX_SPI_SCK_FUNCTION AVR32_SPI_SCK_0_0_FUNCTION
+#define AT45DBX_SPI_MISO_PIN AVR32_SPI_MISO_0_0_PIN
+#define AT45DBX_SPI_MISO_FUNCTION AVR32_SPI_MISO_0_0_FUNCTION
+#define AT45DBX_SPI_MOSI_PIN AVR32_SPI_MOSI_0_0_PIN
+#define AT45DBX_SPI_MOSI_FUNCTION AVR32_SPI_MOSI_0_0_FUNCTION
+#define AT45DBX_SPI_NPCS0_PIN AVR32_SPI_NPCS_0_0_PIN
+#define AT45DBX_SPI_NPCS0_FUNCTION AVR32_SPI_NPCS_0_0_FUNCTION
+//! @}
+
+
+/*! \name GPIO and SPI Connections of the SD/MMC Connector
+ */
+//! @{
+#define SD_MMC_CARD_DETECT_PIN AVR32_PIN_PB00
+#define SD_MMC_WRITE_PROTECT_PIN AVR32_PIN_PB01
+#define SD_MMC_SPI (&AVR32_SPI)
+#define SD_MMC_SPI_NPCS 1
+#define SD_MMC_SPI_SCK_PIN AVR32_SPI_SCK_0_0_PIN
+#define SD_MMC_SPI_SCK_FUNCTION AVR32_SPI_SCK_0_0_FUNCTION
+#define SD_MMC_SPI_MISO_PIN AVR32_SPI_MISO_0_0_PIN
+#define SD_MMC_SPI_MISO_FUNCTION AVR32_SPI_MISO_0_0_FUNCTION
+#define SD_MMC_SPI_MOSI_PIN AVR32_SPI_MOSI_0_0_PIN
+#define SD_MMC_SPI_MOSI_FUNCTION AVR32_SPI_MOSI_0_0_FUNCTION
+#define SD_MMC_SPI_NPCS_PIN AVR32_SPI_NPCS_1_0_PIN
+#define SD_MMC_SPI_NPCS_FUNCTION AVR32_SPI_NPCS_1_0_FUNCTION
+//! @}
+
+
+/*! \name TWI Connections of the Spare TWI Connector
+ */
+//! @{
+#define SPARE_TWI (&AVR32_TWI)
+#define SPARE_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN
+#define SPARE_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION
+#define SPARE_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN
+#define SPARE_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION
+//! @}
+
+
+/*! \name SPI Connections of the Spare SPI Connector
+ */
+//! @{
+#define SPARE_SPI (&AVR32_SPI)
+#define SPARE_SPI_NPCS 2
+#define SPARE_SPI_SCK_PIN AVR32_SPI_SCK_0_0_PIN
+#define SPARE_SPI_SCK_FUNCTION AVR32_SPI_SCK_0_0_FUNCTION
+#define SPARE_SPI_MISO_PIN AVR32_SPI_MISO_0_0_PIN
+#define SPARE_SPI_MISO_FUNCTION AVR32_SPI_MISO_0_0_FUNCTION
+#define SPARE_SPI_MOSI_PIN AVR32_SPI_MOSI_0_0_PIN
+#define SPARE_SPI_MOSI_FUNCTION AVR32_SPI_MOSI_0_0_FUNCTION
+#define SPARE_SPI_NPCS_PIN AVR32_SPI_NPCS_2_0_PIN
+#define SPARE_SPI_NPCS_FUNCTION AVR32_SPI_NPCS_2_0_FUNCTION
+//! @}
+
+
+#endif // _EVK1101_H_
126 Firmware/src/asf/avr32/boards/evk1101/init.c
@@ -0,0 +1,126 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief EVK1101 board init.
+ *
+ * This file contains board initialization function.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR
+ * - Supported devices: All AVR UC3 devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+
+#include "compiler.h"
+#include "evk1101.h"
+#include "conf_board.h"
+#include "gpio.h"
+#include "board.h"
+
+#if defined (CONF_BOARD_AT45DBX)
+#define AT45DBX_MEM_CNT 1
+#endif
+
+void board_init(void)
+{
+ gpio_configure_pin(LED0_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED1_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED2_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+ gpio_configure_pin(LED3_GPIO,GPIO_DIR_OUTPUT | GPIO_INIT_HIGH);
+
+ gpio_configure_pin(GPIO_PUSH_BUTTON_0,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_PUSH_BUTTON_1,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_PUSH,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_LEFT,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_UP,GPIO_DIR_INPUT);
+ gpio_configure_pin(GPIO_JOYSTICK_DOWN,GPIO_DIR_INPUT);
+
+#if defined (CONF_BOARD_AT45DBX)
+ static const gpio_map_t AT45DBX_SPI_GPIO_MAP =
+ {
+ {AT45DBX_SPI_SCK_PIN, AT45DBX_SPI_SCK_FUNCTION }, // SPI Clock.
+ {AT45DBX_SPI_MISO_PIN, AT45DBX_SPI_MISO_FUNCTION }, // MISO.
+ {AT45DBX_SPI_MOSI_PIN, AT45DBX_SPI_MOSI_FUNCTION }, // MOSI.
+ #define AT45DBX_ENABLE_NPCS_PIN(NPCS, unused) \
+ {AT45DBX_SPI_NPCS##NPCS##_PIN, AT45DBX_SPI_NPCS##NPCS##_FUNCTION}, // Chip Select NPCS.
+ MREPEAT(AT45DBX_MEM_CNT, AT45DBX_ENABLE_NPCS_PIN, ~)
+ #undef AT45DBX_ENABLE_NPCS_PIN
+ };
+
+ // Assign I/Os to SPI.
+ gpio_enable_module(AT45DBX_SPI_GPIO_MAP,
+ sizeof(AT45DBX_SPI_GPIO_MAP) / sizeof(AT45DBX_SPI_GPIO_MAP[0]));
+#endif
+
+#if defined (CONF_BOARD_TWI)
+ static const gpio_map_t TWI_GPIO_MAP =
+ {
+ {AVR32_TWI_SDA_0_0_PIN, AVR32_TWI_SDA_0_0_FUNCTION},
+ {AVR32_TWI_SCL_0_0_PIN, AVR32_TWI_SCL_0_0_FUNCTION}
+ };
+
+ // TWI gpio pins configuration
+ gpio_enable_module(TWI_GPIO_MAP, sizeof(TWI_GPIO_MAP) / sizeof(TWI_GPIO_MAP[0]));
+#endif
+
+#if defined (CONF_BOARD_COM_PORT)
+ static const gpio_map_t COMPORT_GPIO_MAP =
+ {
+ {AVR32_USART1_RXD_0_0_PIN, AVR32_USART1_RXD_0_0_FUNCTION },
+ {AVR32_USART1_TXD_0_0_PIN, AVR32_USART1_TXD_0_0_FUNCTION }
+ };
+
+ // Assign I/Os to USART.
+ gpio_enable_module(COMPORT_GPIO_MAP,
+ sizeof(COMPORT_GPIO_MAP) / sizeof(COMPORT_GPIO_MAP[0]));
+#endif
+
+#if UC3D
+ static const gpio_map_t USB_GPIO_MAP =
+ {
+ {AVR32_USBC_DP_PIN, AVR32_USBC_DP_FUNCTION},
+ {AVR32_USBC_DM_PIN, AVR32_USBC_DM_FUNCTION},
+ {AVR32_USBC_VBUS_PIN, AVR32_USBC_VBUS_FUNCTION}
+ };
+
+ // Assign GPIO pins to USB.
+ gpio_enable_module(USB_GPIO_MAP,
+ sizeof(USB_GPIO_MAP) / sizeof(USB_GPIO_MAP[0]));
+#endif
+
+}
344 Firmware/src/asf/avr32/boards/evk1101/led.c
@@ -0,0 +1,344 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT32UC3B EVK1101 board LEDs support package.
+ *
+ * This file contains definitions and services related to the LED features of
+ * the EVK1101 board.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 AT32UC3B devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#include <avr32/io.h>
+#include "preprocessor.h"
+#include "compiler.h"
+#include "evk1101.h"
+#include "led.h"
+
+
+//! Structure describing LED hardware connections.
+typedef const struct
+{
+ struct
+ {
+ U32 PORT; //!< LED GPIO port.
+ U32 PIN_MASK; //!< Bit-mask of LED pin in GPIO port.
+ } GPIO; //!< LED GPIO descriptor.
+ struct
+ {
+ S32 CHANNEL; //!< LED PWM channel (< 0 if N/A).
+ S32 FUNCTION; //!< LED pin PWM function (< 0 if N/A).
+ } PWM; //!< LED PWM descriptor.
+} tLED_DESCRIPTOR;
+
+
+//! Hardware descriptors of all LEDs.
+static tLED_DESCRIPTOR LED_DESCRIPTOR[LED_COUNT] =
+{
+#define INSERT_LED_DESCRIPTOR(LED_NO, unused) \
+ { \
+ {LED##LED_NO##_GPIO / 32, 1 << (LED##LED_NO##_GPIO % 32)},\
+ {LED##LED_NO##_PWM, LED##LED_NO##_PWM_FUNCTION } \
+ },
+ MREPEAT(LED_COUNT, INSERT_LED_DESCRIPTOR, ~)
+#undef INSERT_LED_DESCRIPTOR
+};
+
+
+//! Saved state of all LEDs.
+static volatile U32 LED_State = (1 << LED_COUNT) - 1;
+
+
+U32 LED_Read_Display(void)
+{
+ return LED_State;
+}
+
+
+void LED_Display(U32 leds)
+{
+ // Use the LED descriptors to get the connections of a given LED to the MCU.
+ tLED_DESCRIPTOR *led_descriptor;
+ volatile avr32_gpio_port_t *led_gpio_port;
+
+ // Make sure only existing LEDs are specified.
+ leds &= (1 << LED_COUNT) - 1;
+
+ // Update the saved state of all LEDs with the requested changes.
+ LED_State = leds;
+
+ // For all LEDs...
+ for (led_descriptor = &LED_DESCRIPTOR[0];
+ led_descriptor < LED_DESCRIPTOR + LED_COUNT;
+ led_descriptor++)
+ {
+ // Set the LED to the requested state.
+ led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
+ if (leds & 1)
+ {
+ led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
+ }
+ else
+ {
+ led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
+ }
+ led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
+ leds >>= 1;
+ }
+}
+
+
+U32 LED_Read_Display_Mask(U32 mask)
+{
+ return Rd_bits(LED_State, mask);
+}
+
+
+void LED_Display_Mask(U32 mask, U32 leds)
+{
+ // Use the LED descriptors to get the connections of a given LED to the MCU.
+ tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
+ volatile avr32_gpio_port_t *led_gpio_port;
+ U8 led_shift;
+
+ // Make sure only existing LEDs are specified.
+ mask &= (1 << LED_COUNT) - 1;
+
+ // Update the saved state of all LEDs with the requested changes.
+ Wr_bits(LED_State, mask, leds);
+
+ // While there are specified LEDs left to manage...
+ while (mask)
+ {
+ // Select the next specified LED and set it to the requested state.
+ led_shift = 1 + ctz(mask);
+ led_descriptor += led_shift;
+ led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
+ leds >>= led_shift - 1;
+ if (leds & 1)
+ {
+ led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
+ }
+ else
+ {
+ led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
+ }
+ led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
+ leds >>= 1;
+ mask >>= led_shift;
+ }
+}
+
+
+Bool LED_Test(U32 leds)
+{
+ return Tst_bits(LED_State, leds);
+}
+
+
+void LED_Off(U32 leds)
+{
+ // Use the LED descriptors to get the connections of a given LED to the MCU.
+ tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
+ volatile avr32_gpio_port_t *led_gpio_port;
+ U8 led_shift;
+
+ // Make sure only existing LEDs are specified.
+ leds &= (1 << LED_COUNT) - 1;
+
+ // Update the saved state of all LEDs with the requested changes.
+ Clr_bits(LED_State, leds);
+
+ // While there are specified LEDs left to manage...
+ while (leds)
+ {
+ // Select the next specified LED and turn it off.
+ led_shift = 1 + ctz(leds);
+ led_descriptor += led_shift;
+ led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
+ led_gpio_port->ovrs = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
+ leds >>= led_shift;
+ }
+}
+
+
+void LED_On(U32 leds)
+{
+ // Use the LED descriptors to get the connections of a given LED to the MCU.
+ tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
+ volatile avr32_gpio_port_t *led_gpio_port;
+ U8 led_shift;
+
+ // Make sure only existing LEDs are specified.
+ leds &= (1 << LED_COUNT) - 1;
+
+ // Update the saved state of all LEDs with the requested changes.
+ Set_bits(LED_State, leds);
+
+ // While there are specified LEDs left to manage...
+ while (leds)
+ {
+ // Select the next specified LED and turn it on.
+ led_shift = 1 + ctz(leds);
+ led_descriptor += led_shift;
+ led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
+ led_gpio_port->ovrc = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
+ leds >>= led_shift;
+ }
+}
+
+
+void LED_Toggle(U32 leds)
+{
+ // Use the LED descriptors to get the connections of a given LED to the MCU.
+ tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
+ volatile avr32_gpio_port_t *led_gpio_port;
+ U8 led_shift;
+
+ // Make sure only existing LEDs are specified.
+ leds &= (1 << LED_COUNT) - 1;
+
+ // Update the saved state of all LEDs with the requested changes.
+ Tgl_bits(LED_State, leds);
+
+ // While there are specified LEDs left to manage...
+ while (leds)
+ {
+ // Select the next specified LED and toggle it.
+ led_shift = 1 + ctz(leds);
+ led_descriptor += led_shift;
+ led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
+ led_gpio_port->ovrt = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->oders = led_descriptor->GPIO.PIN_MASK;
+ led_gpio_port->gpers = led_descriptor->GPIO.PIN_MASK;
+ leds >>= led_shift;
+ }
+}
+
+
+U32 LED_Read_Display_Field(U32 field)
+{
+ return Rd_bitfield(LED_State, field);
+}
+
+
+void LED_Display_Field(U32 field, U32 leds)
+{
+ // Move the bit-field to the appropriate position for the bit-mask.
+ LED_Display_Mask(field, leds << ctz(field));
+}
+
+
+U8 LED_Get_Intensity(U32 led)
+{
+ tLED_DESCRIPTOR *led_descriptor;
+
+ // Check that the argument value is valid.
+ led = ctz(led);
+ led_descriptor = &LED_DESCRIPTOR[led];
+ if (led >= LED_COUNT || led_descriptor->PWM.CHANNEL < 0) return 0;
+
+ // Return the duty cycle value if the LED PWM channel is enabled, else 0.
+ return (AVR32_PWM.sr & (1 << led_descriptor->PWM.CHANNEL)) ?
+ AVR32_PWM.channel[led_descriptor->PWM.CHANNEL].cdty : 0;
+}
+
+
+void LED_Set_Intensity(U32 leds, U8 intensity)
+{
+ tLED_DESCRIPTOR *led_descriptor = &LED_DESCRIPTOR[0] - 1;
+ volatile avr32_pwm_channel_t *led_pwm_channel;
+ volatile avr32_gpio_port_t *led_gpio_port;
+ U8 led_shift;
+
+ // For each specified LED...
+ for (leds &= (1 << LED_COUNT) - 1; leds; leds >>= led_shift)
+ {
+ // Select the next specified LED and check that it has a PWM channel.
+ led_shift = 1 + ctz(leds);
+ led_descriptor += led_shift;
+ if (led_descriptor->PWM.CHANNEL < 0) continue;
+
+ // Initialize or update the LED PWM channel.
+ led_pwm_channel = &AVR32_PWM.channel[led_descriptor->PWM.CHANNEL];
+ if (!(AVR32_PWM.sr & (1 << led_descriptor->PWM.CHANNEL)))
+ {
+ led_pwm_channel->cmr = (AVR32_PWM_CPRE_MCK << AVR32_PWM_CPRE_OFFSET) &
+ ~(AVR32_PWM_CALG_MASK |
+ AVR32_PWM_CPOL_MASK |
+ AVR32_PWM_CPD_MASK);
+ led_pwm_channel->cprd = 0x000000FF;
+ led_pwm_channel->cdty = intensity;
+ AVR32_PWM.ena = 1 << led_descriptor->PWM.CHANNEL;
+ }
+ else
+ {
+ AVR32_PWM.isr;
+ while (!(AVR32_PWM.isr & (1 << led_descriptor->PWM.CHANNEL)));
+ led_pwm_channel->cupd = intensity;
+ }
+
+ // Switch the LED pin to its PWM function.
+ led_gpio_port = &AVR32_GPIO.port[led_descriptor->GPIO.PORT];
+ if (led_descriptor->PWM.FUNCTION & 0x1)
+ {
+ led_gpio_port->pmr0s = led_descriptor->GPIO.PIN_MASK;
+ }
+ else
+ {
+ led_gpio_port->pmr0c = led_descriptor->GPIO.PIN_MASK;
+ }
+ if (led_descriptor->PWM.FUNCTION & 0x2)
+ {
+ led_gpio_port->pmr1s = led_descriptor->GPIO.PIN_MASK;
+ }
+ else
+ {
+ led_gpio_port->pmr1c = led_descriptor->GPIO.PIN_MASK;
+ }
+ led_gpio_port->gperc = led_descriptor->GPIO.PIN_MASK;
+ }
+}
185 Firmware/src/asf/avr32/boards/evk1101/led.h
@@ -0,0 +1,185 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief AT32UC3B EVK1101 board LEDs support package.
+ *
+ * This file contains definitions and services related to the LED features of
+ * the EVK1101 board.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 AT32UC3B devices can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+#ifndef _LED_H_
+#define _LED_H_
+
+#include "compiler.h"
+
+
+/*! \name Identifiers of LEDs to Use with LED Functions
+ */
+//! @{
+#define LED0 0x01
+#define LED1 0x02
+#define LED2 0x04
+#define LED3 0x08
+//! @}
+
+
+/*! \brief Gets the last state of all LEDs set through the LED API.
+ *
+ * \return State of all LEDs (1 bit per LED).
+ *
+ * \note The GPIO pin configuration of all LEDs is left unchanged.
+ */
+extern U32 LED_Read_Display(void);
+
+/*! \brief Sets the state of all LEDs.
+ *
+ * \param leds New state of all LEDs (1 bit per LED).
+ *
+ * \note The pins of all LEDs are set to GPIO output mode.
+ */
+extern void LED_Display(U32 leds);
+
+/*! \brief Gets the last state of the specified LEDs set through the LED API.
+ *
+ * \param mask LEDs of which to get the state (1 bit per LED).
+ *
+ * \return State of the specified LEDs (1 bit per LED).
+ *
+ * \note The GPIO pin configuration of all LEDs is left unchanged.
+ */
+extern U32 LED_Read_Display_Mask(U32 mask);
+
+/*! \brief Sets the state of the specified LEDs.
+ *
+ * \param mask LEDs of which to set the state (1 bit per LED).
+ *
+ * \param leds New state of the specified LEDs (1 bit per LED).
+ *
+ * \note The pins of the specified LEDs are set to GPIO output mode.
+ */
+extern void LED_Display_Mask(U32 mask, U32 leds);
+
+/*! \brief Tests the last state of the specified LEDs set through the LED API.
+ *
+ * \param leds LEDs of which to test the state (1 bit per LED).
+ *
+ * \return \c TRUE if at least one of the specified LEDs has a state on, else
+ * \c FALSE.
+ *
+ * \note The GPIO pin configuration of all LEDs is left unchanged.
+ */
+extern Bool LED_Test(U32 leds);
+
+/*! \brief Turns off the specified LEDs.
+ *
+ * \param leds LEDs to turn off (1 bit per LED).
+ *
+ * \note The pins of the specified LEDs are set to GPIO output mode.
+ */
+extern void LED_Off(U32 leds);
+
+/*! \brief Turns on the specified LEDs.
+ *
+ * \param leds LEDs to turn on (1 bit per LED).
+ *
+ * \note The pins of the specified LEDs are set to GPIO output mode.
+ */
+extern void LED_On(U32 leds);
+
+/*! \brief Toggles the specified LEDs.
+ *
+ * \param leds LEDs to toggle (1 bit per LED).
+ *
+ * \note The pins of the specified LEDs are set to GPIO output mode.
+ */
+extern void LED_Toggle(U32 leds);
+
+/*! \brief Gets as a bit-field the last state of the specified LEDs set through
+ * the LED API.
+ *
+ * \param field LEDs of which to get the state (1 bit per LED).
+ *
+ * \return State of the specified LEDs (1 bit per LED, beginning with the first
+ * specified LED).
+ *
+ * \note The GPIO pin configuration of all LEDs is left unchanged.
+ */
+extern U32 LED_Read_Display_Field(U32 field);
+
+/*! \brief Sets as a bit-field the state of the specified LEDs.
+ *
+ * \param field LEDs of which to set the state (1 bit per LED).
+ * \param leds New state of the specified LEDs (1 bit per LED, beginning with
+ * the first specified LED).
+ *
+ * \note The pins of the specified LEDs are set to GPIO output mode.
+ */
+extern void LED_Display_Field(U32 field, U32 leds);
+
+/*! \brief Gets the intensity of the specified LED.
+ *
+ * \param led LED of which to get the intensity (1 bit per LED; only the least
+ * significant set bit is used).
+ *
+ * \return Intensity of the specified LED (0x00 to 0xFF).
+ *
+ * \warning The PWM channel of the specified LED is supposed to be used only by
+ * this module.
+ *
+ * \note The GPIO pin configuration of all LEDs is left unchanged.
+ */
+extern U8 LED_Get_Intensity(U32 led);
+
+/*! \brief Sets the intensity of the specified LEDs.
+ *
+ * \param leds LEDs of which to set the intensity (1 bit per LED).
+ * \param intensity New intensity of the specified LEDs (0x00 to 0xFF).
+ *
+ * \warning The PWM channels of the specified LEDs are supposed to be used only
+ * by this module.
+ *
+ * \note The pins of the specified LEDs are set to PWM output mode.
+ */
+extern void LED_Set_Intensity(U32 leds, U8 intensity);
+
+
+#endif // _LED_H_
1,278 Firmware/src/asf/avr32/components/memory/sd_mmc/sd_mmc_spi/sd_mmc_spi.c
@@ -0,0 +1,1278 @@
+/*This file is prepared for Doxygen automatic documentation generation.*/
+/*! \file *********************************************************************
+ *
+ * \brief SD/MMC card driver using SPI interface.
+ *
+ * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
+ * - Supported devices: All AVR32 devices with an SPI module can be used.
+ * - AppNote:
+ *
+ * \author Atmel Corporation: http://www.atmel.com \n
+ * Support and FAQ: http://support.atmel.no/
+ *
+ ******************************************************************************/
+
+/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an Atmel
+ * AVR product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ *
+ */
+
+/*_____ I N C L U D E S ____________________________________________________*/
+
+#include "conf_access.h"
+
+
+#if SD_MMC_SPI_MEM == ENABLE
+
+#include "compiler.h"
+#include "board.h"
+#include "gpio.h"
+#include "spi.h"
+#include "conf_sd_mmc_spi.h"
+#include "sd_mmc_spi.h"
+#include <string.h>
+
+
+/*_____ M A C R O S ________________________________________________________*/
+
+#define NO_SUPPORT_USB_PING_PONG // defines if USB endpoints do not support ping pong mode
+
+
+/*_____ D E F I N I T I O N ________________________________________________*/
+
+static uint32_t gl_ptr_mem; // Memory data pointer
+static uint8_t sector_buf[MMC_SECTOR_SIZE]; // Sector buffer
<