Procházet zdrojové kódy

Normalize line endings

Fred Sundvik před 9 roky
rodič
revize
a5b1af4999
39 změnil soubory, kde provedl 6322 přidání a 6322 odebrání
  1. 49 49
      keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c
  2. 166 166
      keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h
  3. 5 5
      keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk
  4. 105 105
      keyboards/chibios_test/ld/MKL26Z64.ld
  5. 88 88
      keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld
  6. 171 171
      keyboards/chibios_test/stm32_f072_onekey/mcuconf.h
  7. 209 209
      keyboards/chibios_test/stm32_f103_onekey/mcuconf.h
  8. 524 524
      keyboards/chibios_test/teensy_lc_onekey/chconf.h
  9. 187 187
      keyboards/chibios_test/teensy_lc_onekey/halconf.h
  10. 55 55
      keyboards/chibios_test/teensy_lc_onekey/mcuconf.h
  11. 74 74
      keyboards/gh60/Makefile
  12. 161 161
      keyboards/gh60/config.h
  13. 25 25
      keyboards/gh60/gh60.c
  14. 74 74
      keyboards/gh60/gh60.h
  15. 112 112
      keyboards/gh60/keymaps/robotmaxtron/Makefile
  16. 190 190
      keyboards/gh60/keymaps/robotmaxtron/config.h
  17. 17 17
      keyboards/gh60/pinout.txt
  18. 60 60
      keyboards/gh60/readme.md
  19. 524 524
      keyboards/infinity_chibios/chconf.h
  20. 353 353
      keyboards/infinity_chibios/halconf.h
  21. 55 55
      keyboards/infinity_chibios/mcuconf.h
  22. 500 500
      tmk_core/common/avr/xprintf.S
  23. 111 111
      tmk_core/common/avr/xprintf.h
  24. 156 156
      tmk_core/protocol/iwrap/suart.S
  25. 8 8
      tmk_core/protocol/iwrap/suart.h
  26. 159 159
      tmk_core/protocol/iwrap/wd.h
  27. 161 161
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml
  28. 156 156
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml
  29. 123 123
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml
  30. 102 102
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S
  31. 156 156
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml
  32. 68 68
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile
  33. 91 91
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S
  34. 159 159
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml
  35. 55 55
      tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile
  36. 42 42
      tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile
  37. 55 55
      tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/asf.xml
  38. 41 41
      tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml
  39. 975 975
      tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildSystem.txt

+ 49 - 49
keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c

@@ -1,49 +1,49 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-#include "hal.h"
-
-/**
- * @brief   PAL setup.
- * @details Digital I/O ports static configuration as defined in @p board.h.
- *          This variable is used by the HAL when initializing the PAL driver.
- */
-#if HAL_USE_PAL || defined(__DOXYGEN__)
-const PALConfig pal_default_config =
-{
-  {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH},
-  {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH},
-  {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH},
-  {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH},
-  {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},
-};
-#endif
-
-/*
- * Early initialization code.
- * This initialization must be performed just after stack setup and before
- * any other initialization.
- */
-void __early_init(void) {
-
-  stm32_clock_init();
-}
-
-/*
- * Board-specific initialization code.
- */
-void boardInit(void) {
-}
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#include "hal.h"
+
+/**
+ * @brief   PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ *          This variable is used by the HAL when initializing the PAL driver.
+ */
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+const PALConfig pal_default_config =
+{
+  {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH},
+  {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH},
+  {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH},
+  {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH},
+  {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},
+};
+#endif
+
+/*
+ * Early initialization code.
+ * This initialization must be performed just after stack setup and before
+ * any other initialization.
+ */
+void __early_init(void) {
+
+  stm32_clock_init();
+}
+
+/*
+ * Board-specific initialization code.
+ */
+void boardInit(void) {
+}

+ 166 - 166
keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h

@@ -1,166 +1,166 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-#ifndef _BOARD_H_
-#define _BOARD_H_
-
-/*
- * Setup for a Generic STM32F103 board.
- */
-
-/*
- * Board identifier.
- */
-#define BOARD_GENERIC_STM32_F103
-#define BOARD_NAME              "Generic STM32F103x board"
-
-/*
- * Board frequencies.
- */
-#define STM32_LSECLK            32768
-#define STM32_HSECLK            8000000
-
-/*
- * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
- */
-#define STM32F103xB
-
-/*
- * IO pins assignments
- */
-
-/* on-board */
-
-#define GPIOC_LED               13
-#define GPIOD_OSC_IN            0
-#define GPIOD_OSC_OUT           1
-
-/* In case your board has a "USB enable" hardware
-   controlled by a pin, define it here. (It could be just
-   a 1.5k resistor connected to D+ line.)
-*/
-/*
-#define GPIOB_USB_DISC          10
-*/
-
-/*
- * I/O ports initial setup, this configuration is established soon after reset
- * in the initialization code.
- *
- * The digits have the following meaning:
- *   0 - Analog input.
- *   1 - Push Pull output 10MHz.
- *   2 - Push Pull output 2MHz.
- *   3 - Push Pull output 50MHz.
- *   4 - Digital input.
- *   5 - Open Drain output 10MHz.
- *   6 - Open Drain output 2MHz.
- *   7 - Open Drain output 50MHz.
- *   8 - Digital input with PullUp or PullDown resistor depending on ODR.
- *   9 - Alternate Push Pull output 10MHz.
- *   A - Alternate Push Pull output 2MHz.
- *   B - Alternate Push Pull output 50MHz.
- *   C - Reserved.
- *   D - Alternate Open Drain output 10MHz.
- *   E - Alternate Open Drain output 2MHz.
- *   F - Alternate Open Drain output 50MHz.
- * Please refer to the STM32 Reference Manual for details.
- */
-
-/*
- * Port A setup.
- * Everything input with pull-up except:
- * PA2  - Alternate output  (USART2 TX).
- * PA3  - Normal input      (USART2 RX).
- * PA9  - Alternate output  (USART1 TX).
- * PA10 - Normal input      (USART1 RX).
- */
-#define VAL_GPIOACRL            0x88884B88      /*  PA7...PA0 */
-#define VAL_GPIOACRH            0x888884B8      /* PA15...PA8 */
-#define VAL_GPIOAODR            0xFFFFFFFF
-
-/*
- * Port B setup.
- * Everything input with pull-up except:
- * PB10    - Push Pull output  (USB switch).
- */
-#define VAL_GPIOBCRL            0x88888888      /*  PB7...PB0 */
-#define VAL_GPIOBCRH            0x88888388      /* PB15...PB8 */
-#define VAL_GPIOBODR            0xFFFFFFFF
-
-/*
- * Port C setup.
- * Everything input with pull-up except:
- * PC13    - Push Pull output  (LED).
- */
-#define VAL_GPIOCCRL            0x88888888      /*  PC7...PC0 */
-#define VAL_GPIOCCRH            0x88388888      /* PC15...PC8 */
-#define VAL_GPIOCODR            0xFFFFFFFF
-
-/*
- * Port D setup.
- * Everything input with pull-up except:
- * PD0  - Normal input (XTAL).
- * PD1  - Normal input (XTAL).
- */
-#define VAL_GPIODCRL            0x88888844      /*  PD7...PD0 */
-#define VAL_GPIODCRH            0x88888888      /* PD15...PD8 */
-#define VAL_GPIODODR            0xFFFFFFFF
-
-/*
- * Port E setup.
- * Everything input with pull-up except:
- */
-#define VAL_GPIOECRL            0x88888888      /*  PE7...PE0 */
-#define VAL_GPIOECRH            0x88888888      /* PE15...PE8 */
-#define VAL_GPIOEODR            0xFFFFFFFF
-
-/*
- * USB bus activation macro, required by the USB driver.
- */
-/* The point is that most of the generic STM32F103* boards
-   have a 1.5k resistor connected on one end to the D+ line
-   and on the other end to some pin. Or even a slightly more
-   complicated "USB enable" circuit, controlled by a pin.
-   That should go here.
-
-   However on some boards (e.g. one that I have), there's no
-   such hardware. In which case it's better to not do anything.
-*/
-/*
-#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)
-*/
-#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT);
-
-/*
- * USB bus de-activation macro, required by the USB driver.
- */
-/*
-#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC)
-*/
-#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12);
-
-#if !defined(_FROM_ASM_)
-#ifdef __cplusplus
-extern "C" {
-#endif
-  void boardInit(void);
-#ifdef __cplusplus
-}
-#endif
-#endif /* _FROM_ASM_ */
-
-#endif /* _BOARD_H_ */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for a Generic STM32F103 board.
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_STM32_F103
+#define BOARD_NAME              "Generic STM32F103x board"
+
+/*
+ * Board frequencies.
+ */
+#define STM32_LSECLK            32768
+#define STM32_HSECLK            8000000
+
+/*
+ * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
+ */
+#define STM32F103xB
+
+/*
+ * IO pins assignments
+ */
+
+/* on-board */
+
+#define GPIOC_LED               13
+#define GPIOD_OSC_IN            0
+#define GPIOD_OSC_OUT           1
+
+/* In case your board has a "USB enable" hardware
+   controlled by a pin, define it here. (It could be just
+   a 1.5k resistor connected to D+ line.)
+*/
+/*
+#define GPIOB_USB_DISC          10
+*/
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ *
+ * The digits have the following meaning:
+ *   0 - Analog input.
+ *   1 - Push Pull output 10MHz.
+ *   2 - Push Pull output 2MHz.
+ *   3 - Push Pull output 50MHz.
+ *   4 - Digital input.
+ *   5 - Open Drain output 10MHz.
+ *   6 - Open Drain output 2MHz.
+ *   7 - Open Drain output 50MHz.
+ *   8 - Digital input with PullUp or PullDown resistor depending on ODR.
+ *   9 - Alternate Push Pull output 10MHz.
+ *   A - Alternate Push Pull output 2MHz.
+ *   B - Alternate Push Pull output 50MHz.
+ *   C - Reserved.
+ *   D - Alternate Open Drain output 10MHz.
+ *   E - Alternate Open Drain output 2MHz.
+ *   F - Alternate Open Drain output 50MHz.
+ * Please refer to the STM32 Reference Manual for details.
+ */
+
+/*
+ * Port A setup.
+ * Everything input with pull-up except:
+ * PA2  - Alternate output  (USART2 TX).
+ * PA3  - Normal input      (USART2 RX).
+ * PA9  - Alternate output  (USART1 TX).
+ * PA10 - Normal input      (USART1 RX).
+ */
+#define VAL_GPIOACRL            0x88884B88      /*  PA7...PA0 */
+#define VAL_GPIOACRH            0x888884B8      /* PA15...PA8 */
+#define VAL_GPIOAODR            0xFFFFFFFF
+
+/*
+ * Port B setup.
+ * Everything input with pull-up except:
+ * PB10    - Push Pull output  (USB switch).
+ */
+#define VAL_GPIOBCRL            0x88888888      /*  PB7...PB0 */
+#define VAL_GPIOBCRH            0x88888388      /* PB15...PB8 */
+#define VAL_GPIOBODR            0xFFFFFFFF
+
+/*
+ * Port C setup.
+ * Everything input with pull-up except:
+ * PC13    - Push Pull output  (LED).
+ */
+#define VAL_GPIOCCRL            0x88888888      /*  PC7...PC0 */
+#define VAL_GPIOCCRH            0x88388888      /* PC15...PC8 */
+#define VAL_GPIOCODR            0xFFFFFFFF
+
+/*
+ * Port D setup.
+ * Everything input with pull-up except:
+ * PD0  - Normal input (XTAL).
+ * PD1  - Normal input (XTAL).
+ */
+#define VAL_GPIODCRL            0x88888844      /*  PD7...PD0 */
+#define VAL_GPIODCRH            0x88888888      /* PD15...PD8 */
+#define VAL_GPIODODR            0xFFFFFFFF
+
+/*
+ * Port E setup.
+ * Everything input with pull-up except:
+ */
+#define VAL_GPIOECRL            0x88888888      /*  PE7...PE0 */
+#define VAL_GPIOECRH            0x88888888      /* PE15...PE8 */
+#define VAL_GPIOEODR            0xFFFFFFFF
+
+/*
+ * USB bus activation macro, required by the USB driver.
+ */
+/* The point is that most of the generic STM32F103* boards
+   have a 1.5k resistor connected on one end to the D+ line
+   and on the other end to some pin. Or even a slightly more
+   complicated "USB enable" circuit, controlled by a pin.
+   That should go here.
+
+   However on some boards (e.g. one that I have), there's no
+   such hardware. In which case it's better to not do anything.
+*/
+/*
+#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)
+*/
+#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT);
+
+/*
+ * USB bus de-activation macro, required by the USB driver.
+ */
+/*
+#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC)
+*/
+#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12);
+
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+  void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */

+ 5 - 5
keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk

@@ -1,5 +1,5 @@
-# List of all the board related files.
-BOARDSRC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103/board.c
-
-# Required include directories
-BOARDINC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103
+# List of all the board related files.
+BOARDSRC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103/board.c
+
+# Required include directories
+BOARDINC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103

+ 105 - 105
keyboards/chibios_test/ld/MKL26Z64.ld

@@ -1,105 +1,105 @@
-/*
- * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
- *           (C) 2016 flabbergast <s3+flabbergast@sdfeu.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * KL26Z64 memory setup.
- */
-MEMORY
-{
-  flash0   : org = 0x00000000, len = 0x100
-  flash1   : org = 0x00000400, len = 0x10
-  flash2   : org = 0x00000410, len = 62k - 0x410
-  flash3   : org = 0x0000F800, len = 2k
-  flash4   : org = 0x00000000, len = 0
-  flash5   : org = 0x00000000, len = 0
-  flash6   : org = 0x00000000, len = 0
-  flash7   : org = 0x00000000, len = 0
-  ram0     : org = 0x1FFFF800, len = 8k
-  ram1     : org = 0x00000000, len = 0
-  ram2     : org = 0x00000000, len = 0
-  ram3     : org = 0x00000000, len = 0
-  ram4     : org = 0x00000000, len = 0
-  ram5     : org = 0x00000000, len = 0
-  ram6     : org = 0x00000000, len = 0
-  ram7     : org = 0x00000000, len = 0
-}
-
-/* Flash region for the configuration bytes.*/
-SECTIONS
-{
-  .cfmprotect : ALIGN(4) SUBALIGN(4)
-  {
-    KEEP(*(.cfmconfig))
-  } > flash1
-}
-
-/* For each data/text section two region are defined, a virtual region
-   and a load region (_LMA suffix).*/
-
-/* Flash region to be used for exception vectors.*/
-REGION_ALIAS("VECTORS_FLASH", flash0);
-REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
-
-/* Flash region to be used for constructors and destructors.*/
-REGION_ALIAS("XTORS_FLASH", flash2);
-REGION_ALIAS("XTORS_FLASH_LMA", flash2);
-
-/* Flash region to be used for code text.*/
-REGION_ALIAS("TEXT_FLASH", flash2);
-REGION_ALIAS("TEXT_FLASH_LMA", flash2);
-
-/* Flash region to be used for read only data.*/
-REGION_ALIAS("RODATA_FLASH", flash2);
-REGION_ALIAS("RODATA_FLASH_LMA", flash2);
-
-/* Flash region to be used for various.*/
-REGION_ALIAS("VARIOUS_FLASH", flash2);
-REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
-
-/* Flash region to be used for RAM(n) initialization data.*/
-REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
-
-/* RAM region to be used for Main stack. This stack accommodates the processing
-   of all exceptions and interrupts.*/
-REGION_ALIAS("MAIN_STACK_RAM", ram0);
-
-/* RAM region to be used for the process stack. This is the stack used by
-   the main() function.*/
-REGION_ALIAS("PROCESS_STACK_RAM", ram0);
-
-/* RAM region to be used for data segment.*/
-REGION_ALIAS("DATA_RAM", ram0);
-REGION_ALIAS("DATA_RAM_LMA", flash2);
-
-/* RAM region to be used for BSS segment.*/
-REGION_ALIAS("BSS_RAM", ram0);
-
-/* RAM region to be used for the default heap.*/
-REGION_ALIAS("HEAP_RAM", ram0);
-
-__eeprom_workarea_start__ = ORIGIN(flash3);
-__eeprom_workarea_size__  = LENGTH(flash3);
-__eeprom_workarea_end__   = __eeprom_workarea_start__ + __eeprom_workarea_size__;
-
-/* Generic rules inclusion.*/
-INCLUDE rules.ld
+/*
+ * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
+ *           (C) 2016 flabbergast <s3+flabbergast@sdfeu.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * KL26Z64 memory setup.
+ */
+MEMORY
+{
+  flash0   : org = 0x00000000, len = 0x100
+  flash1   : org = 0x00000400, len = 0x10
+  flash2   : org = 0x00000410, len = 62k - 0x410
+  flash3   : org = 0x0000F800, len = 2k
+  flash4   : org = 0x00000000, len = 0
+  flash5   : org = 0x00000000, len = 0
+  flash6   : org = 0x00000000, len = 0
+  flash7   : org = 0x00000000, len = 0
+  ram0     : org = 0x1FFFF800, len = 8k
+  ram1     : org = 0x00000000, len = 0
+  ram2     : org = 0x00000000, len = 0
+  ram3     : org = 0x00000000, len = 0
+  ram4     : org = 0x00000000, len = 0
+  ram5     : org = 0x00000000, len = 0
+  ram6     : org = 0x00000000, len = 0
+  ram7     : org = 0x00000000, len = 0
+}
+
+/* Flash region for the configuration bytes.*/
+SECTIONS
+{
+  .cfmprotect : ALIGN(4) SUBALIGN(4)
+  {
+    KEEP(*(.cfmconfig))
+  } > flash1
+}
+
+/* For each data/text section two region are defined, a virtual region
+   and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash2);
+REGION_ALIAS("XTORS_FLASH_LMA", flash2);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash2);
+REGION_ALIAS("TEXT_FLASH_LMA", flash2);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash2);
+REGION_ALIAS("RODATA_FLASH_LMA", flash2);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash2);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+   of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+   the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash2);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+__eeprom_workarea_start__ = ORIGIN(flash3);
+__eeprom_workarea_size__  = LENGTH(flash3);
+__eeprom_workarea_end__   = __eeprom_workarea_start__ + __eeprom_workarea_size__;
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld

+ 88 - 88
keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld

@@ -1,88 +1,88 @@
-/*
-    ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-/*
- * ST32F103xB memory setup for use with the maplemini bootloader.
- * You will have to
- * 	#define CORTEX_VTOR_INIT 0x5000
- * in your projects chconf.h
- */
-MEMORY
-{
-    flash0  : org = 0x08002000, len = 128k - 0x2000
-    flash1  : org = 0x00000000, len = 0
-    flash2  : org = 0x00000000, len = 0
-    flash3  : org = 0x00000000, len = 0
-    flash4  : org = 0x00000000, len = 0
-    flash5  : org = 0x00000000, len = 0
-    flash6  : org = 0x00000000, len = 0
-    flash7  : org = 0x00000000, len = 0
-    ram0    : org = 0x20000000, len = 20k
-    ram1    : org = 0x00000000, len = 0
-    ram2    : org = 0x00000000, len = 0
-    ram3    : org = 0x00000000, len = 0
-    ram4    : org = 0x00000000, len = 0
-    ram5    : org = 0x00000000, len = 0
-    ram6    : org = 0x00000000, len = 0
-    ram7    : org = 0x00000000, len = 0
-}
-
-/* For each data/text section two region are defined, a virtual region
-   and a load region (_LMA suffix).*/
-
-/* Flash region to be used for exception vectors.*/
-REGION_ALIAS("VECTORS_FLASH", flash0);
-REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
-
-/* Flash region to be used for constructors and destructors.*/
-REGION_ALIAS("XTORS_FLASH", flash0);
-REGION_ALIAS("XTORS_FLASH_LMA", flash0);
-
-/* Flash region to be used for code text.*/
-REGION_ALIAS("TEXT_FLASH", flash0);
-REGION_ALIAS("TEXT_FLASH_LMA", flash0);
-
-/* Flash region to be used for read only data.*/
-REGION_ALIAS("RODATA_FLASH", flash0);
-REGION_ALIAS("RODATA_FLASH_LMA", flash0);
-
-/* Flash region to be used for various.*/
-REGION_ALIAS("VARIOUS_FLASH", flash0);
-REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
-
-/* Flash region to be used for RAM(n) initialization data.*/
-REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
-
-/* RAM region to be used for Main stack. This stack accommodates the processing
-   of all exceptions and interrupts.*/
-REGION_ALIAS("MAIN_STACK_RAM", ram0);
-
-/* RAM region to be used for the process stack. This is the stack used by
-   the main() function.*/
-REGION_ALIAS("PROCESS_STACK_RAM", ram0);
-
-/* RAM region to be used for data segment.*/
-REGION_ALIAS("DATA_RAM", ram0);
-REGION_ALIAS("DATA_RAM_LMA", flash0);
-
-/* RAM region to be used for BSS segment.*/
-REGION_ALIAS("BSS_RAM", ram0);
-
-/* RAM region to be used for the default heap.*/
-REGION_ALIAS("HEAP_RAM", ram0);
-
-/* Generic rules inclusion.*/
-INCLUDE rules.ld
+/*
+    ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+/*
+ * ST32F103xB memory setup for use with the maplemini bootloader.
+ * You will have to
+ * 	#define CORTEX_VTOR_INIT 0x5000
+ * in your projects chconf.h
+ */
+MEMORY
+{
+    flash0  : org = 0x08002000, len = 128k - 0x2000
+    flash1  : org = 0x00000000, len = 0
+    flash2  : org = 0x00000000, len = 0
+    flash3  : org = 0x00000000, len = 0
+    flash4  : org = 0x00000000, len = 0
+    flash5  : org = 0x00000000, len = 0
+    flash6  : org = 0x00000000, len = 0
+    flash7  : org = 0x00000000, len = 0
+    ram0    : org = 0x20000000, len = 20k
+    ram1    : org = 0x00000000, len = 0
+    ram2    : org = 0x00000000, len = 0
+    ram3    : org = 0x00000000, len = 0
+    ram4    : org = 0x00000000, len = 0
+    ram5    : org = 0x00000000, len = 0
+    ram6    : org = 0x00000000, len = 0
+    ram7    : org = 0x00000000, len = 0
+}
+
+/* For each data/text section two region are defined, a virtual region
+   and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash0);
+REGION_ALIAS("XTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash0);
+REGION_ALIAS("TEXT_FLASH_LMA", flash0);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash0);
+REGION_ALIAS("RODATA_FLASH_LMA", flash0);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash0);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+   of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+   the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld

+ 171 - 171
keyboards/chibios_test/stm32_f072_onekey/mcuconf.h

@@ -1,171 +1,171 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-#ifndef _MCUCONF_H_
-#define _MCUCONF_H_
-
-/*
- * STM32F0xx drivers configuration.
- * The following settings override the default settings present in
- * the various device driver implementation headers.
- * Note that the settings for each driver only have effect if the whole
- * driver is enabled in halconf.h.
- *
- * IRQ priorities:
- * 3...0       Lowest...Highest.
- *
- * DMA priorities:
- * 0...3        Lowest...Highest.
- */
-
-#define STM32F0xx_MCUCONF
-
-/*
- * HAL driver system settings.
- */
-#define STM32_NO_INIT                       FALSE
-#define STM32_PVD_ENABLE                    FALSE
-#define STM32_PLS                           STM32_PLS_LEV0
-#define STM32_HSI_ENABLED                   TRUE
-#define STM32_HSI14_ENABLED                 TRUE
-#define STM32_HSI48_ENABLED                 FALSE
-#define STM32_LSI_ENABLED                   TRUE
-#define STM32_HSE_ENABLED                   FALSE
-#define STM32_LSE_ENABLED                   FALSE
-#define STM32_SW                            STM32_SW_PLL
-#define STM32_PLLSRC                        STM32_PLLSRC_HSI_DIV2
-#define STM32_PREDIV_VALUE                  1
-#define STM32_PLLMUL_VALUE                  12
-#define STM32_HPRE                          STM32_HPRE_DIV1
-#define STM32_PPRE                          STM32_PPRE_DIV1
-#define STM32_ADCSW                         STM32_ADCSW_HSI14
-#define STM32_ADCPRE                        STM32_ADCPRE_DIV4
-#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
-#define STM32_ADCPRE                        STM32_ADCPRE_DIV4
-#define STM32_ADCSW                         STM32_ADCSW_HSI14
-#define STM32_USBSW                         STM32_USBSW_HSI48
-#define STM32_CECSW                         STM32_CECSW_HSI
-#define STM32_I2C1SW                        STM32_I2C1SW_HSI
-#define STM32_USART1SW                      STM32_USART1SW_PCLK
-#define STM32_RTCSEL                        STM32_RTCSEL_LSI
-
-/*
- * ADC driver system settings.
- */
-#define STM32_ADC_USE_ADC1                  FALSE
-#define STM32_ADC_ADC1_DMA_PRIORITY         2
-#define STM32_ADC_IRQ_PRIORITY              2
-#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     2
-
-/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_1_IRQ_PRIORITY      3
-#define STM32_EXT_EXTI2_3_IRQ_PRIORITY      3
-#define STM32_EXT_EXTI4_15_IRQ_PRIORITY     3
-#define STM32_EXT_EXTI16_IRQ_PRIORITY       3
-#define STM32_EXT_EXTI17_IRQ_PRIORITY       3
-
-/*
- * GPT driver system settings.
- */
-#define STM32_GPT_USE_TIM1                  FALSE
-#define STM32_GPT_USE_TIM2                  FALSE
-#define STM32_GPT_USE_TIM3                  FALSE
-#define STM32_GPT_USE_TIM14                 FALSE
-#define STM32_GPT_TIM1_IRQ_PRIORITY         2
-#define STM32_GPT_TIM2_IRQ_PRIORITY         2
-#define STM32_GPT_TIM3_IRQ_PRIORITY         2
-#define STM32_GPT_TIM14_IRQ_PRIORITY        2
-
-/*
- * I2C driver system settings.
- */
-#define STM32_I2C_USE_I2C1                  FALSE
-#define STM32_I2C_USE_I2C2                  FALSE
-#define STM32_I2C_BUSY_TIMEOUT              50
-#define STM32_I2C_I2C1_IRQ_PRIORITY         3
-#define STM32_I2C_I2C2_IRQ_PRIORITY         3
-#define STM32_I2C_USE_DMA                   TRUE
-#define STM32_I2C_I2C1_DMA_PRIORITY         1
-#define STM32_I2C_I2C2_DMA_PRIORITY         1
-#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
-
-/*
- * ICU driver system settings.
- */
-#define STM32_ICU_USE_TIM1                  FALSE
-#define STM32_ICU_USE_TIM2                  FALSE
-#define STM32_ICU_USE_TIM3                  FALSE
-#define STM32_ICU_TIM1_IRQ_PRIORITY         3
-#define STM32_ICU_TIM2_IRQ_PRIORITY         3
-#define STM32_ICU_TIM3_IRQ_PRIORITY         3
-
-/*
- * PWM driver system settings.
- */
-#define STM32_PWM_USE_ADVANCED              FALSE
-#define STM32_PWM_USE_TIM1                  FALSE
-#define STM32_PWM_USE_TIM2                  FALSE
-#define STM32_PWM_USE_TIM3                  FALSE
-#define STM32_PWM_TIM1_IRQ_PRIORITY         3
-#define STM32_PWM_TIM2_IRQ_PRIORITY         3
-#define STM32_PWM_TIM3_IRQ_PRIORITY         3
-
-/*
- * SERIAL driver system settings.
- */
-#define STM32_SERIAL_USE_USART1             FALSE
-#define STM32_SERIAL_USE_USART2             FALSE
-#define STM32_SERIAL_USART1_PRIORITY        3
-#define STM32_SERIAL_USART2_PRIORITY        3
-
-/*
- * SPI driver system settings.
- */
-#define STM32_SPI_USE_SPI1                  FALSE
-#define STM32_SPI_USE_SPI2                  FALSE
-#define STM32_SPI_SPI1_DMA_PRIORITY         1
-#define STM32_SPI_SPI2_DMA_PRIORITY         1
-#define STM32_SPI_SPI1_IRQ_PRIORITY         2
-#define STM32_SPI_SPI2_IRQ_PRIORITY         2
-#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
-
-/*
- * ST driver system settings.
- */
-#define STM32_ST_IRQ_PRIORITY               2
-#define STM32_ST_USE_TIMER                  2
-
-/*
- * UART driver system settings.
- */
-#define STM32_UART_USE_USART1               FALSE
-#define STM32_UART_USE_USART2               FALSE
-#define STM32_UART_USART1_IRQ_PRIORITY      3
-#define STM32_UART_USART2_IRQ_PRIORITY      3
-#define STM32_UART_USART1_DMA_PRIORITY      0
-#define STM32_UART_USART2_DMA_PRIORITY      0
-#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
-
-/*
- * USB driver system settings.
- */
-#define STM32_USB_USE_USB1                  TRUE
-#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
-#define STM32_USB_USB1_LP_IRQ_PRIORITY      3
-
-#endif /* _MCUCONF_H_ */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#ifndef _MCUCONF_H_
+#define _MCUCONF_H_
+
+/*
+ * STM32F0xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0       Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3        Lowest...Highest.
+ */
+
+#define STM32F0xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT                       FALSE
+#define STM32_PVD_ENABLE                    FALSE
+#define STM32_PLS                           STM32_PLS_LEV0
+#define STM32_HSI_ENABLED                   TRUE
+#define STM32_HSI14_ENABLED                 TRUE
+#define STM32_HSI48_ENABLED                 FALSE
+#define STM32_LSI_ENABLED                   TRUE
+#define STM32_HSE_ENABLED                   FALSE
+#define STM32_LSE_ENABLED                   FALSE
+#define STM32_SW                            STM32_SW_PLL
+#define STM32_PLLSRC                        STM32_PLLSRC_HSI_DIV2
+#define STM32_PREDIV_VALUE                  1
+#define STM32_PLLMUL_VALUE                  12
+#define STM32_HPRE                          STM32_HPRE_DIV1
+#define STM32_PPRE                          STM32_PPRE_DIV1
+#define STM32_ADCSW                         STM32_ADCSW_HSI14
+#define STM32_ADCPRE                        STM32_ADCPRE_DIV4
+#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
+#define STM32_ADCPRE                        STM32_ADCPRE_DIV4
+#define STM32_ADCSW                         STM32_ADCSW_HSI14
+#define STM32_USBSW                         STM32_USBSW_HSI48
+#define STM32_CECSW                         STM32_CECSW_HSI
+#define STM32_I2C1SW                        STM32_I2C1SW_HSI
+#define STM32_USART1SW                      STM32_USART1SW_PCLK
+#define STM32_RTCSEL                        STM32_RTCSEL_LSI
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_USE_ADC1                  FALSE
+#define STM32_ADC_ADC1_DMA_PRIORITY         2
+#define STM32_ADC_IRQ_PRIORITY              2
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY     2
+
+/*
+ * EXT driver system settings.
+ */
+#define STM32_EXT_EXTI0_1_IRQ_PRIORITY      3
+#define STM32_EXT_EXTI2_3_IRQ_PRIORITY      3
+#define STM32_EXT_EXTI4_15_IRQ_PRIORITY     3
+#define STM32_EXT_EXTI16_IRQ_PRIORITY       3
+#define STM32_EXT_EXTI17_IRQ_PRIORITY       3
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1                  FALSE
+#define STM32_GPT_USE_TIM2                  FALSE
+#define STM32_GPT_USE_TIM3                  FALSE
+#define STM32_GPT_USE_TIM14                 FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY         2
+#define STM32_GPT_TIM2_IRQ_PRIORITY         2
+#define STM32_GPT_TIM3_IRQ_PRIORITY         2
+#define STM32_GPT_TIM14_IRQ_PRIORITY        2
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1                  FALSE
+#define STM32_I2C_USE_I2C2                  FALSE
+#define STM32_I2C_BUSY_TIMEOUT              50
+#define STM32_I2C_I2C1_IRQ_PRIORITY         3
+#define STM32_I2C_I2C2_IRQ_PRIORITY         3
+#define STM32_I2C_USE_DMA                   TRUE
+#define STM32_I2C_I2C1_DMA_PRIORITY         1
+#define STM32_I2C_I2C2_DMA_PRIORITY         1
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1                  FALSE
+#define STM32_ICU_USE_TIM2                  FALSE
+#define STM32_ICU_USE_TIM3                  FALSE
+#define STM32_ICU_TIM1_IRQ_PRIORITY         3
+#define STM32_ICU_TIM2_IRQ_PRIORITY         3
+#define STM32_ICU_TIM3_IRQ_PRIORITY         3
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED              FALSE
+#define STM32_PWM_USE_TIM1                  FALSE
+#define STM32_PWM_USE_TIM2                  FALSE
+#define STM32_PWM_USE_TIM3                  FALSE
+#define STM32_PWM_TIM1_IRQ_PRIORITY         3
+#define STM32_PWM_TIM2_IRQ_PRIORITY         3
+#define STM32_PWM_TIM3_IRQ_PRIORITY         3
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1             FALSE
+#define STM32_SERIAL_USE_USART2             FALSE
+#define STM32_SERIAL_USART1_PRIORITY        3
+#define STM32_SERIAL_USART2_PRIORITY        3
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1                  FALSE
+#define STM32_SPI_USE_SPI2                  FALSE
+#define STM32_SPI_SPI1_DMA_PRIORITY         1
+#define STM32_SPI_SPI2_DMA_PRIORITY         1
+#define STM32_SPI_SPI1_IRQ_PRIORITY         2
+#define STM32_SPI_SPI2_IRQ_PRIORITY         2
+#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY               2
+#define STM32_ST_USE_TIMER                  2
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1               FALSE
+#define STM32_UART_USE_USART2               FALSE
+#define STM32_UART_USART1_IRQ_PRIORITY      3
+#define STM32_UART_USART2_IRQ_PRIORITY      3
+#define STM32_UART_USART1_DMA_PRIORITY      0
+#define STM32_UART_USART2_DMA_PRIORITY      0
+#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1                  TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
+#define STM32_USB_USB1_LP_IRQ_PRIORITY      3
+
+#endif /* _MCUCONF_H_ */

+ 209 - 209
keyboards/chibios_test/stm32_f103_onekey/mcuconf.h

@@ -1,209 +1,209 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-#ifndef _MCUCONF_H_
-#define _MCUCONF_H_
-
-#define STM32F103_MCUCONF
-
-/*
- * STM32F103 drivers configuration.
- * The following settings override the default settings present in
- * the various device driver implementation headers.
- * Note that the settings for each driver only have effect if the whole
- * driver is enabled in halconf.h.
- *
- * IRQ priorities:
- * 15...0       Lowest...Highest.
- *
- * DMA priorities:
- * 0...3        Lowest...Highest.
- */
-
-/*
- * HAL driver system settings.
- */
-#define STM32_NO_INIT                       FALSE
-#define STM32_HSI_ENABLED                   TRUE
-#define STM32_LSI_ENABLED                   FALSE
-#define STM32_HSE_ENABLED                   TRUE
-#define STM32_LSE_ENABLED                   FALSE
-#define STM32_SW                            STM32_SW_PLL
-#define STM32_PLLSRC                        STM32_PLLSRC_HSE
-#define STM32_PLLXTPRE                      STM32_PLLXTPRE_DIV1
-#define STM32_PLLMUL_VALUE                  9
-#define STM32_HPRE                          STM32_HPRE_DIV1
-#define STM32_PPRE1                         STM32_PPRE1_DIV2
-#define STM32_PPRE2                         STM32_PPRE2_DIV2
-#define STM32_ADCPRE                        STM32_ADCPRE_DIV4
-#define STM32_USB_CLOCK_REQUIRED            TRUE
-#define STM32_USBPRE                        STM32_USBPRE_DIV1P5
-#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
-#define STM32_RTCSEL                        STM32_RTCSEL_HSEDIV
-#define STM32_PVD_ENABLE                    FALSE
-#define STM32_PLS                           STM32_PLS_LEV0
-
-/*
- * ADC driver system settings.
- */
-#define STM32_ADC_USE_ADC1                  FALSE
-#define STM32_ADC_ADC1_DMA_PRIORITY         2
-#define STM32_ADC_ADC1_IRQ_PRIORITY         6
-
-/*
- * CAN driver system settings.
- */
-#define STM32_CAN_USE_CAN1                  FALSE
-#define STM32_CAN_CAN1_IRQ_PRIORITY         11
-
-/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
-
-/*
- * GPT driver system settings.
- */
-#define STM32_GPT_USE_TIM1                  FALSE
-#define STM32_GPT_USE_TIM2                  FALSE
-#define STM32_GPT_USE_TIM3                  FALSE
-#define STM32_GPT_USE_TIM4                  FALSE
-#define STM32_GPT_USE_TIM5                  FALSE
-#define STM32_GPT_USE_TIM8                  FALSE
-#define STM32_GPT_TIM1_IRQ_PRIORITY         7
-#define STM32_GPT_TIM2_IRQ_PRIORITY         7
-#define STM32_GPT_TIM3_IRQ_PRIORITY         7
-#define STM32_GPT_TIM4_IRQ_PRIORITY         7
-#define STM32_GPT_TIM5_IRQ_PRIORITY         7
-#define STM32_GPT_TIM8_IRQ_PRIORITY         7
-
-/*
- * I2C driver system settings.
- */
-#define STM32_I2C_USE_I2C1                  FALSE
-#define STM32_I2C_USE_I2C2                  FALSE
-#define STM32_I2C_BUSY_TIMEOUT              50
-#define STM32_I2C_I2C1_IRQ_PRIORITY         5
-#define STM32_I2C_I2C2_IRQ_PRIORITY         5
-#define STM32_I2C_I2C1_DMA_PRIORITY         3
-#define STM32_I2C_I2C2_DMA_PRIORITY         3
-#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
-
-/*
- * ICU driver system settings.
- */
-#define STM32_ICU_USE_TIM1                  FALSE
-#define STM32_ICU_USE_TIM2                  FALSE
-#define STM32_ICU_USE_TIM3                  FALSE
-#define STM32_ICU_USE_TIM4                  FALSE
-#define STM32_ICU_USE_TIM5                  FALSE
-#define STM32_ICU_USE_TIM8                  FALSE
-#define STM32_ICU_TIM1_IRQ_PRIORITY         7
-#define STM32_ICU_TIM2_IRQ_PRIORITY         7
-#define STM32_ICU_TIM3_IRQ_PRIORITY         7
-#define STM32_ICU_TIM4_IRQ_PRIORITY         7
-#define STM32_ICU_TIM5_IRQ_PRIORITY         7
-#define STM32_ICU_TIM8_IRQ_PRIORITY         7
-
-/*
- * PWM driver system settings.
- */
-#define STM32_PWM_USE_ADVANCED              FALSE
-#define STM32_PWM_USE_TIM1                  FALSE
-#define STM32_PWM_USE_TIM2                  FALSE
-#define STM32_PWM_USE_TIM3                  FALSE
-#define STM32_PWM_USE_TIM4                  FALSE
-#define STM32_PWM_USE_TIM5                  FALSE
-#define STM32_PWM_USE_TIM8                  FALSE
-#define STM32_PWM_TIM1_IRQ_PRIORITY         7
-#define STM32_PWM_TIM2_IRQ_PRIORITY         7
-#define STM32_PWM_TIM3_IRQ_PRIORITY         7
-#define STM32_PWM_TIM4_IRQ_PRIORITY         7
-#define STM32_PWM_TIM5_IRQ_PRIORITY         7
-#define STM32_PWM_TIM8_IRQ_PRIORITY         7
-
-/*
- * RTC driver system settings.
- */
-#define STM32_RTC_IRQ_PRIORITY              15
-
-/*
- * SERIAL driver system settings.
- */
-#define STM32_SERIAL_USE_USART1             FALSE
-#define STM32_SERIAL_USE_USART2             FALSE
-#define STM32_SERIAL_USE_USART3             FALSE
-#define STM32_SERIAL_USE_UART4              FALSE
-#define STM32_SERIAL_USE_UART5              FALSE
-#define STM32_SERIAL_USART1_PRIORITY        12
-#define STM32_SERIAL_USART2_PRIORITY        12
-#define STM32_SERIAL_USART3_PRIORITY        12
-#define STM32_SERIAL_UART4_PRIORITY         12
-#define STM32_SERIAL_UART5_PRIORITY         12
-
-/*
- * SPI driver system settings.
- */
-#define STM32_SPI_USE_SPI1                  FALSE
-#define STM32_SPI_USE_SPI2                  FALSE
-#define STM32_SPI_USE_SPI3                  FALSE
-#define STM32_SPI_SPI1_DMA_PRIORITY         1
-#define STM32_SPI_SPI2_DMA_PRIORITY         1
-#define STM32_SPI_SPI3_DMA_PRIORITY         1
-#define STM32_SPI_SPI1_IRQ_PRIORITY         10
-#define STM32_SPI_SPI2_IRQ_PRIORITY         10
-#define STM32_SPI_SPI3_IRQ_PRIORITY         10
-#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
-
-/*
- * ST driver system settings.
- */
-#define STM32_ST_IRQ_PRIORITY               8
-#define STM32_ST_USE_TIMER                  2
-
-/*
- * UART driver system settings.
- */
-#define STM32_UART_USE_USART1               FALSE
-#define STM32_UART_USE_USART2               FALSE
-#define STM32_UART_USE_USART3               FALSE
-#define STM32_UART_USART1_IRQ_PRIORITY      12
-#define STM32_UART_USART2_IRQ_PRIORITY      12
-#define STM32_UART_USART3_IRQ_PRIORITY      12
-#define STM32_UART_USART1_DMA_PRIORITY      0
-#define STM32_UART_USART2_DMA_PRIORITY      0
-#define STM32_UART_USART3_DMA_PRIORITY      0
-#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
-
-/*
- * USB driver system settings.
- */
-#define STM32_USB_USE_USB1                  TRUE
-#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
-#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
-#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
-
-#endif /* _MCUCONF_H_ */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#ifndef _MCUCONF_H_
+#define _MCUCONF_H_
+
+#define STM32F103_MCUCONF
+
+/*
+ * STM32F103 drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 15...0       Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3        Lowest...Highest.
+ */
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT                       FALSE
+#define STM32_HSI_ENABLED                   TRUE
+#define STM32_LSI_ENABLED                   FALSE
+#define STM32_HSE_ENABLED                   TRUE
+#define STM32_LSE_ENABLED                   FALSE
+#define STM32_SW                            STM32_SW_PLL
+#define STM32_PLLSRC                        STM32_PLLSRC_HSE
+#define STM32_PLLXTPRE                      STM32_PLLXTPRE_DIV1
+#define STM32_PLLMUL_VALUE                  9
+#define STM32_HPRE                          STM32_HPRE_DIV1
+#define STM32_PPRE1                         STM32_PPRE1_DIV2
+#define STM32_PPRE2                         STM32_PPRE2_DIV2
+#define STM32_ADCPRE                        STM32_ADCPRE_DIV4
+#define STM32_USB_CLOCK_REQUIRED            TRUE
+#define STM32_USBPRE                        STM32_USBPRE_DIV1P5
+#define STM32_MCOSEL                        STM32_MCOSEL_NOCLOCK
+#define STM32_RTCSEL                        STM32_RTCSEL_HSEDIV
+#define STM32_PVD_ENABLE                    FALSE
+#define STM32_PLS                           STM32_PLS_LEV0
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_USE_ADC1                  FALSE
+#define STM32_ADC_ADC1_DMA_PRIORITY         2
+#define STM32_ADC_ADC1_IRQ_PRIORITY         6
+
+/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1                  FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY         11
+
+/*
+ * EXT driver system settings.
+ */
+#define STM32_EXT_EXTI0_IRQ_PRIORITY        6
+#define STM32_EXT_EXTI1_IRQ_PRIORITY        6
+#define STM32_EXT_EXTI2_IRQ_PRIORITY        6
+#define STM32_EXT_EXTI3_IRQ_PRIORITY        6
+#define STM32_EXT_EXTI4_IRQ_PRIORITY        6
+#define STM32_EXT_EXTI5_9_IRQ_PRIORITY      6
+#define STM32_EXT_EXTI10_15_IRQ_PRIORITY    6
+#define STM32_EXT_EXTI16_IRQ_PRIORITY       6
+#define STM32_EXT_EXTI17_IRQ_PRIORITY       6
+#define STM32_EXT_EXTI18_IRQ_PRIORITY       6
+#define STM32_EXT_EXTI19_IRQ_PRIORITY       6
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1                  FALSE
+#define STM32_GPT_USE_TIM2                  FALSE
+#define STM32_GPT_USE_TIM3                  FALSE
+#define STM32_GPT_USE_TIM4                  FALSE
+#define STM32_GPT_USE_TIM5                  FALSE
+#define STM32_GPT_USE_TIM8                  FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY         7
+#define STM32_GPT_TIM2_IRQ_PRIORITY         7
+#define STM32_GPT_TIM3_IRQ_PRIORITY         7
+#define STM32_GPT_TIM4_IRQ_PRIORITY         7
+#define STM32_GPT_TIM5_IRQ_PRIORITY         7
+#define STM32_GPT_TIM8_IRQ_PRIORITY         7
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1                  FALSE
+#define STM32_I2C_USE_I2C2                  FALSE
+#define STM32_I2C_BUSY_TIMEOUT              50
+#define STM32_I2C_I2C1_IRQ_PRIORITY         5
+#define STM32_I2C_I2C2_IRQ_PRIORITY         5
+#define STM32_I2C_I2C1_DMA_PRIORITY         3
+#define STM32_I2C_I2C2_DMA_PRIORITY         3
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1                  FALSE
+#define STM32_ICU_USE_TIM2                  FALSE
+#define STM32_ICU_USE_TIM3                  FALSE
+#define STM32_ICU_USE_TIM4                  FALSE
+#define STM32_ICU_USE_TIM5                  FALSE
+#define STM32_ICU_USE_TIM8                  FALSE
+#define STM32_ICU_TIM1_IRQ_PRIORITY         7
+#define STM32_ICU_TIM2_IRQ_PRIORITY         7
+#define STM32_ICU_TIM3_IRQ_PRIORITY         7
+#define STM32_ICU_TIM4_IRQ_PRIORITY         7
+#define STM32_ICU_TIM5_IRQ_PRIORITY         7
+#define STM32_ICU_TIM8_IRQ_PRIORITY         7
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED              FALSE
+#define STM32_PWM_USE_TIM1                  FALSE
+#define STM32_PWM_USE_TIM2                  FALSE
+#define STM32_PWM_USE_TIM3                  FALSE
+#define STM32_PWM_USE_TIM4                  FALSE
+#define STM32_PWM_USE_TIM5                  FALSE
+#define STM32_PWM_USE_TIM8                  FALSE
+#define STM32_PWM_TIM1_IRQ_PRIORITY         7
+#define STM32_PWM_TIM2_IRQ_PRIORITY         7
+#define STM32_PWM_TIM3_IRQ_PRIORITY         7
+#define STM32_PWM_TIM4_IRQ_PRIORITY         7
+#define STM32_PWM_TIM5_IRQ_PRIORITY         7
+#define STM32_PWM_TIM8_IRQ_PRIORITY         7
+
+/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_IRQ_PRIORITY              15
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1             FALSE
+#define STM32_SERIAL_USE_USART2             FALSE
+#define STM32_SERIAL_USE_USART3             FALSE
+#define STM32_SERIAL_USE_UART4              FALSE
+#define STM32_SERIAL_USE_UART5              FALSE
+#define STM32_SERIAL_USART1_PRIORITY        12
+#define STM32_SERIAL_USART2_PRIORITY        12
+#define STM32_SERIAL_USART3_PRIORITY        12
+#define STM32_SERIAL_UART4_PRIORITY         12
+#define STM32_SERIAL_UART5_PRIORITY         12
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1                  FALSE
+#define STM32_SPI_USE_SPI2                  FALSE
+#define STM32_SPI_USE_SPI3                  FALSE
+#define STM32_SPI_SPI1_DMA_PRIORITY         1
+#define STM32_SPI_SPI2_DMA_PRIORITY         1
+#define STM32_SPI_SPI3_DMA_PRIORITY         1
+#define STM32_SPI_SPI1_IRQ_PRIORITY         10
+#define STM32_SPI_SPI2_IRQ_PRIORITY         10
+#define STM32_SPI_SPI3_IRQ_PRIORITY         10
+#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY               8
+#define STM32_ST_USE_TIMER                  2
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1               FALSE
+#define STM32_UART_USE_USART2               FALSE
+#define STM32_UART_USE_USART3               FALSE
+#define STM32_UART_USART1_IRQ_PRIORITY      12
+#define STM32_UART_USART2_IRQ_PRIORITY      12
+#define STM32_UART_USART3_IRQ_PRIORITY      12
+#define STM32_UART_USART1_DMA_PRIORITY      0
+#define STM32_UART_USART2_DMA_PRIORITY      0
+#define STM32_UART_USART3_DMA_PRIORITY      0
+#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1                  TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
+
+#endif /* _MCUCONF_H_ */

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 524 - 524
keyboards/chibios_test/teensy_lc_onekey/chconf.h


+ 187 - 187
keyboards/chibios_test/teensy_lc_onekey/halconf.h

@@ -1,187 +1,187 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-/**
- * @file    templates/halconf.h
- * @brief   HAL configuration header.
- * @details HAL configuration file, this file allows to enable or disable the
- *          various device drivers from your application. You may also use
- *          this file in order to override the device drivers default settings.
- *
- * @addtogroup HAL_CONF
- * @{
- */
-
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
-
-#include "mcuconf.h"
-
-/**
- * @brief   Enables the PAL subsystem.
- */
-#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL                 TRUE
-#endif
-
-/**
- * @brief   Enables the ADC subsystem.
- */
-#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC                 FALSE
-#endif
-
-/**
- * @brief   Enables the CAN subsystem.
- */
-#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN                 FALSE
-#endif
-
-/**
- * @brief   Enables the DAC subsystem.
- */
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC                 FALSE
-#endif
-
-/**
- * @brief   Enables the EXT subsystem.
- */
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT                 FALSE
-#endif
-
-/**
- * @brief   Enables the GPT subsystem.
- */
-#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT                 FALSE
-#endif
-
-/**
- * @brief   Enables the I2C subsystem.
- */
-#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C                 FALSE
-#endif
-
-/**
- * @brief   Enables the I2S subsystem.
- */
-#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S                 FALSE
-#endif
-
-/**
- * @brief   Enables the ICU subsystem.
- */
-#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU                 FALSE
-#endif
-
-/**
- * @brief   Enables the MAC subsystem.
- */
-#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC                 FALSE
-#endif
-
-/**
- * @brief   Enables the MMC_SPI subsystem.
- */
-#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_MMC_SPI             FALSE
-#endif
-
-/**
- * @brief   Enables the PWM subsystem.
- */
-#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM                 FALSE
-#endif
-
-/**
- * @brief   Enables the RTC subsystem.
- */
-#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC                 FALSE
-#endif
-
-/**
- * @brief   Enables the SDC subsystem.
- */
-#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC                 FALSE
-#endif
-
-/**
- * @brief   Enables the SERIAL subsystem.
- */
-#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL              FALSE
-#endif
-
-/**
- * @brief   Enables the SERIAL over USB subsystem.
- */
-#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL_USB          FALSE
-#endif
-
-/**
- * @brief   Enables the SPI subsystem.
- */
-#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI                 FALSE
-#endif
-
-/**
- * @brief   Enables the UART subsystem.
- */
-#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART                FALSE
-#endif
-
-/**
- * @brief   Enables the USB subsystem.
- */
-#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB                 TRUE
-#endif
-
-/**
- * @brief   Enables the WDG subsystem.
- */
-#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG                 FALSE
-#endif
-
-/*===========================================================================*/
-/* USB driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Enables synchronous APIs.
- * @note    Disabling this option saves both code and data space.
- */
-#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT                TRUE
-#endif
-
-#endif /* _HALCONF_H_ */
-
-/** @} */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+/**
+ * @file    templates/halconf.h
+ * @brief   HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ *          various device drivers from your application. You may also use
+ *          this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef _HALCONF_H_
+#define _HALCONF_H_
+
+#include "mcuconf.h"
+
+/**
+ * @brief   Enables the PAL subsystem.
+ */
+#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+#define HAL_USE_PAL                 TRUE
+#endif
+
+/**
+ * @brief   Enables the ADC subsystem.
+ */
+#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+#define HAL_USE_ADC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the CAN subsystem.
+ */
+#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+#define HAL_USE_CAN                 FALSE
+#endif
+
+/**
+ * @brief   Enables the DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the EXT subsystem.
+ */
+#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
+#define HAL_USE_EXT                 FALSE
+#endif
+
+/**
+ * @brief   Enables the GPT subsystem.
+ */
+#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+#define HAL_USE_GPT                 FALSE
+#endif
+
+/**
+ * @brief   Enables the I2C subsystem.
+ */
+#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+#define HAL_USE_I2C                 FALSE
+#endif
+
+/**
+ * @brief   Enables the I2S subsystem.
+ */
+#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+#define HAL_USE_I2S                 FALSE
+#endif
+
+/**
+ * @brief   Enables the ICU subsystem.
+ */
+#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+#define HAL_USE_ICU                 FALSE
+#endif
+
+/**
+ * @brief   Enables the MAC subsystem.
+ */
+#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+#define HAL_USE_MAC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the MMC_SPI subsystem.
+ */
+#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_MMC_SPI             FALSE
+#endif
+
+/**
+ * @brief   Enables the PWM subsystem.
+ */
+#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+#define HAL_USE_PWM                 FALSE
+#endif
+
+/**
+ * @brief   Enables the RTC subsystem.
+ */
+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+#define HAL_USE_RTC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the SDC subsystem.
+ */
+#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+#define HAL_USE_SDC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the SERIAL subsystem.
+ */
+#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL              FALSE
+#endif
+
+/**
+ * @brief   Enables the SERIAL over USB subsystem.
+ */
+#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL_USB          FALSE
+#endif
+
+/**
+ * @brief   Enables the SPI subsystem.
+ */
+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_SPI                 FALSE
+#endif
+
+/**
+ * @brief   Enables the UART subsystem.
+ */
+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+#define HAL_USE_UART                FALSE
+#endif
+
+/**
+ * @brief   Enables the USB subsystem.
+ */
+#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+#define HAL_USE_USB                 TRUE
+#endif
+
+/**
+ * @brief   Enables the WDG subsystem.
+ */
+#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+#define HAL_USE_WDG                 FALSE
+#endif
+
+/*===========================================================================*/
+/* USB driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Enables synchronous APIs.
+ * @note    Disabling this option saves both code and data space.
+ */
+#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+#define USB_USE_WAIT                TRUE
+#endif
+
+#endif /* _HALCONF_H_ */
+
+/** @} */

+ 55 - 55
keyboards/chibios_test/teensy_lc_onekey/mcuconf.h

@@ -1,55 +1,55 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-#ifndef _MCUCONF_H_
-#define _MCUCONF_H_
-
-#define KL2x_MCUCONF
-
-/*
- * HAL driver system settings.
- */
-#if 1
-/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */
-#define KINETIS_MCG_MODE            KINETIS_MCG_MODE_PEE
-#define KINETIS_PLLCLK_FREQUENCY    96000000UL
-#define KINETIS_SYSCLK_FREQUENCY    48000000UL
-#endif
-
-#if 0
-/* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */
-#define KINETIS_MCG_MODE            KINETIS_MCG_MODE_FEI
-#define KINETIS_MCG_FLL_DMX32       1           /* Fine-tune for 32.768 kHz */
-#define KINETIS_MCG_FLL_DRS         1           /* 1464x FLL factor */
-#define KINETIS_SYSCLK_FREQUENCY    47972352UL  /* 32.768 kHz * 1464 (~48 MHz) */
-#define KINETIS_CLKDIV1_OUTDIV1     1           /* do not divide system clock */
-#endif
-
-/*
- * SERIAL driver system settings.
- */
-#define KINETIS_SERIAL_USE_UART0              TRUE
-
-/*
- * USB driver settings
- */
-#define KINETIS_USB_USE_USB0                  TRUE
-/* Need to redefine this, since the default is for K20x */
-/* This is for Teensy LC; you should comment it out (or change to 5)
- * for Teensy 3.x */
-#define KINETIS_USB_USB0_IRQ_PRIORITY         2
-
-#endif /* _MCUCONF_H_ */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#ifndef _MCUCONF_H_
+#define _MCUCONF_H_
+
+#define KL2x_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#if 1
+/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */
+#define KINETIS_MCG_MODE            KINETIS_MCG_MODE_PEE
+#define KINETIS_PLLCLK_FREQUENCY    96000000UL
+#define KINETIS_SYSCLK_FREQUENCY    48000000UL
+#endif
+
+#if 0
+/* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */
+#define KINETIS_MCG_MODE            KINETIS_MCG_MODE_FEI
+#define KINETIS_MCG_FLL_DMX32       1           /* Fine-tune for 32.768 kHz */
+#define KINETIS_MCG_FLL_DRS         1           /* 1464x FLL factor */
+#define KINETIS_SYSCLK_FREQUENCY    47972352UL  /* 32.768 kHz * 1464 (~48 MHz) */
+#define KINETIS_CLKDIV1_OUTDIV1     1           /* do not divide system clock */
+#endif
+
+/*
+ * SERIAL driver system settings.
+ */
+#define KINETIS_SERIAL_USE_UART0              TRUE
+
+/*
+ * USB driver settings
+ */
+#define KINETIS_USB_USE_USB0                  TRUE
+/* Need to redefine this, since the default is for K20x */
+/* This is for Teensy LC; you should comment it out (or change to 5)
+ * for Teensy 3.x */
+#define KINETIS_USB_USB0_IRQ_PRIORITY         2
+
+#endif /* _MCUCONF_H_ */

+ 74 - 74
keyboards/gh60/Makefile

@@ -1,74 +1,74 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes		# Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes		# Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes		# Audio control and System control(+450)
-# CONSOLE_ENABLE ?= yes		# Console for debug(+400)
-# COMMAND_ENABLE ?= yes		# Commands for debug and configuration
-KEYBOARD_LOCK_ENABLE ?= yes	# Allow locking of keyboard via magic key
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes	# Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes			# USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-# BACKLIGHT_ENABLE ?= yes	# Enable keyboard backlight functionality
-# MIDI_ENABLE ?= YES			# MIDI controls
-# UNICODE_ENABLE ?= YES		# Unicode
-# BLUETOOTH_ENABLE ?= yes	# Enable Bluetooth with the Adafruit EZ-Key HID
-
-
-ifndef QUANTUM_DIR
-	include ../../Makefile
-endif
-
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes		# Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes		# Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes		# Audio control and System control(+450)
+# CONSOLE_ENABLE ?= yes		# Console for debug(+400)
+# COMMAND_ENABLE ?= yes		# Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE ?= yes	# Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes	# Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes			# USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+# BACKLIGHT_ENABLE ?= yes	# Enable keyboard backlight functionality
+# MIDI_ENABLE ?= YES			# MIDI controls
+# UNICODE_ENABLE ?= YES		# Unicode
+# BLUETOOTH_ENABLE ?= yes	# Enable Bluetooth with the Adafruit EZ-Key HID
+
+
+ifndef QUANTUM_DIR
+	include ../../Makefile
+endif
+

+ 161 - 161
keyboards/gh60/config.h

@@ -1,161 +1,161 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID    0xFEED
-#define PRODUCT_ID   0x6060
-#define DEVICE_VER   0x0001
-#define MANUFACTURER    geekhack
-#define PRODUCT         GH60
-#define DESCRIPTION     t.m.k. keyboard firmware for GH60
-
-/* key matrix size */
-#define MATRIX_ROWS 5
-#define MATRIX_COLS 14
-
-/*
- * Keyboard Matrix Assignments
- *
- * Change this to how you wired your keyboard
- * COLS: AVR pins used for columns, left to right
- * ROWS: AVR pins used for rows, top to bottom
- * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
- *         ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
- *
-*/
- #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
-// Rev A
-// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 }
-// Rev B/C
-   #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
-#define UNUSED_PINS
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 5
-
-/* define if matrix has ghost (lacks anti-ghosting diodes) */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/*
- * Force NKRO
- *
- * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
- * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
- * makefile for this to work.)
- *
- * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
- * until the next keyboard reset.
- *
- * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
- * fully operational during normal computer usage.
- *
- * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
- * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
- * bootmagic, NKRO mode will always be enabled until it is toggled again during a
- * power-up.
- *
- */
-//#define FORCE_NKRO
-
-/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* key combination for magic key command */
-#define IS_COMMAND() ( \
-  keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1     H
-//#define MAGIC_KEY_HELP2     SLASH
-//#define MAGIC_KEY_DEBUG     D
-//#define MAGIC_KEY_DEBUG_MATRIX  X
-//#define MAGIC_KEY_DEBUG_KBD   K
-//#define MAGIC_KEY_DEBUG_MOUSE  M
-//#define MAGIC_KEY_VERSION    V
-//#define MAGIC_KEY_STATUS     S
-//#define MAGIC_KEY_CONSOLE    C
-//#define MAGIC_KEY_LAYER0_ALT1  ESC
-//#define MAGIC_KEY_LAYER0_ALT2  GRAVE
-//#define MAGIC_KEY_LAYER0     0
-//#define MAGIC_KEY_LAYER1     1
-//#define MAGIC_KEY_LAYER2     2
-//#define MAGIC_KEY_LAYER3     3
-//#define MAGIC_KEY_LAYER4     4
-//#define MAGIC_KEY_LAYER5     5
-//#define MAGIC_KEY_LAYER6     6
-//#define MAGIC_KEY_LAYER7     7
-//#define MAGIC_KEY_LAYER8     8
-//#define MAGIC_KEY_LAYER9     9
-//#define MAGIC_KEY_BOOTLOADER   PAUSE
-//#define MAGIC_KEY_LOCK      CAPS
-//#define MAGIC_KEY_EEPROM     E
-//#define MAGIC_KEY_NKRO      N
-//#define MAGIC_KEY_SLEEP_LED   Z
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-#endif
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID    0xFEED
+#define PRODUCT_ID   0x6060
+#define DEVICE_VER   0x0001
+#define MANUFACTURER    geekhack
+#define PRODUCT         GH60
+#define DESCRIPTION     t.m.k. keyboard firmware for GH60
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *         ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+// Rev A
+// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 }
+// Rev B/C
+   #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+  keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1     H
+//#define MAGIC_KEY_HELP2     SLASH
+//#define MAGIC_KEY_DEBUG     D
+//#define MAGIC_KEY_DEBUG_MATRIX  X
+//#define MAGIC_KEY_DEBUG_KBD   K
+//#define MAGIC_KEY_DEBUG_MOUSE  M
+//#define MAGIC_KEY_VERSION    V
+//#define MAGIC_KEY_STATUS     S
+//#define MAGIC_KEY_CONSOLE    C
+//#define MAGIC_KEY_LAYER0_ALT1  ESC
+//#define MAGIC_KEY_LAYER0_ALT2  GRAVE
+//#define MAGIC_KEY_LAYER0     0
+//#define MAGIC_KEY_LAYER1     1
+//#define MAGIC_KEY_LAYER2     2
+//#define MAGIC_KEY_LAYER3     3
+//#define MAGIC_KEY_LAYER4     4
+//#define MAGIC_KEY_LAYER5     5
+//#define MAGIC_KEY_LAYER6     6
+//#define MAGIC_KEY_LAYER7     7
+//#define MAGIC_KEY_LAYER8     8
+//#define MAGIC_KEY_LAYER9     9
+//#define MAGIC_KEY_BOOTLOADER   PAUSE
+//#define MAGIC_KEY_LOCK      CAPS
+//#define MAGIC_KEY_EEPROM     E
+//#define MAGIC_KEY_NKRO      N
+//#define MAGIC_KEY_SLEEP_LED   Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif

+ 25 - 25
keyboards/gh60/gh60.c

@@ -1,25 +1,25 @@
-#include "gh60.h"
-
-void led_set_kb(uint8_t usb_led) {
-	// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
-	
-    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
-		gh60_caps_led_on();
-		} else {
-		gh60_caps_led_off(); 
-    }
-	
-    // if (usb_led & (1<<USB_LED_NUM_LOCK)) {
-		// gh60_esc_led_on();
-		// } else {
-		// gh60_esc_led_off(); 
-    // }
-	
-    // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
-		// gh60_fn_led_on();
-		// } else {
-		// gh60_fn_led_off(); 	
-    // }
-
-	led_set_user(usb_led);	
-}
+#include "gh60.h"
+
+void led_set_kb(uint8_t usb_led) {
+	// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+	
+    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+		gh60_caps_led_on();
+		} else {
+		gh60_caps_led_off(); 
+    }
+	
+    // if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+		// gh60_esc_led_on();
+		// } else {
+		// gh60_esc_led_off(); 
+    // }
+	
+    // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
+		// gh60_fn_led_on();
+		// } else {
+		// gh60_fn_led_off(); 	
+    // }
+
+	led_set_user(usb_led);	
+}

+ 74 - 74
keyboards/gh60/gh60.h

@@ -1,74 +1,74 @@
-#ifndef GH60_H
-#define GH60_H
-
-#include "quantum.h"
-#include "led.h"
-
-/* GH60 LEDs 
- *   GPIO pads
- *   0 F7 WASD LEDs
- *   1 F6 ESC LED
- *   2 F5 FN LED
- *   3 F4 POKER Arrow LEDs
- *   B2 Capslock LED
- *   B0 not connected
- */
-inline void gh60_caps_led_on(void)      { DDRB |=  (1<<2); PORTB &= ~(1<<2); }
-inline void gh60_poker_leds_on(void)    { DDRF |=  (1<<4); PORTF &= ~(1<<4); }
-inline void gh60_fn_led_on(void)    	{ DDRF |=  (1<<5); PORTF &= ~(1<<5); }
-inline void gh60_esc_led_on(void)    	{ DDRF |=  (1<<6); PORTF &= ~(1<<6); }
-inline void gh60_wasd_leds_on(void)    	{ DDRF |=  (1<<7); PORTF &= ~(1<<7); }
-
-inline void gh60_caps_led_off(void)     { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
-inline void gh60_poker_leds_off(void)   { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
-inline void gh60_fn_led_off(void)   	{ DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
-inline void gh60_esc_led_off(void)   	{ DDRF &= ~(1<<6); PORTF &= ~(1<<6); }
-inline void gh60_wasd_leds_off(void)   	{ DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
-
-/* GH60 keymap definition macro
- * K2C, K31 and  K3C are extra keys for ISO
- */
-#define KEYMAP( \
-    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
-    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
-    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
-    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_NO,    KC_##K45, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D }  \
-}
-
-/* ANSI valiant. No extra keys for ISO */
-#define KEYMAP_ANSI( \
-    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
-    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
-    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
-    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
-) KEYMAP( \
-    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
-    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
-    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
-    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
-)
-
-#define KEYMAP_HHKB( \
-    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
-    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
-    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3C, \
-    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
-) KEYMAP( \
-    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
-    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
-    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
-    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
-)
-
-#endif
+#ifndef GH60_H
+#define GH60_H
+
+#include "quantum.h"
+#include "led.h"
+
+/* GH60 LEDs 
+ *   GPIO pads
+ *   0 F7 WASD LEDs
+ *   1 F6 ESC LED
+ *   2 F5 FN LED
+ *   3 F4 POKER Arrow LEDs
+ *   B2 Capslock LED
+ *   B0 not connected
+ */
+inline void gh60_caps_led_on(void)      { DDRB |=  (1<<2); PORTB &= ~(1<<2); }
+inline void gh60_poker_leds_on(void)    { DDRF |=  (1<<4); PORTF &= ~(1<<4); }
+inline void gh60_fn_led_on(void)    	{ DDRF |=  (1<<5); PORTF &= ~(1<<5); }
+inline void gh60_esc_led_on(void)    	{ DDRF |=  (1<<6); PORTF &= ~(1<<6); }
+inline void gh60_wasd_leds_on(void)    	{ DDRF |=  (1<<7); PORTF &= ~(1<<7); }
+
+inline void gh60_caps_led_off(void)     { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
+inline void gh60_poker_leds_off(void)   { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
+inline void gh60_fn_led_off(void)   	{ DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
+inline void gh60_esc_led_off(void)   	{ DDRF &= ~(1<<6); PORTF &= ~(1<<6); }
+inline void gh60_wasd_leds_off(void)   	{ DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
+
+/* GH60 keymap definition macro
+ * K2C, K31 and  K3C are extra keys for ISO
+ */
+#define KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
+) { \
+    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
+    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
+    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \
+    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
+    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_NO,    KC_##K45, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D }  \
+}
+
+/* ANSI valiant. No extra keys for ISO */
+#define KEYMAP_ANSI( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
+    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
+    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
+) KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
+    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
+    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
+)
+
+#define KEYMAP_HHKB( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
+    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3C, \
+    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
+) KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
+    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
+)
+
+#endif

+ 112 - 112
keyboards/gh60/keymaps/robotmaxtron/Makefile

@@ -1,112 +1,112 @@
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make coff = Convert ELF to AVR COFF.
-#
-# make extcoff = Convert ELF to AVR Extended COFF.
-#
-# make program = Download the hex file to the device.
-#                Please customize your programmer settings(PROGRAM_CMD)
-#
-# make teensy = Download the hex file to the device, using teensy_loader_cli.
-#               (must have teensy_loader_cli installed).
-#
-# make dfu = Download the hex file to the device, using dfu-programmer (must
-#            have dfu-programmer installed).
-#
-# make flip = Download the hex file to the device, using Atmel FLIP (must
-#             have Atmel FLIP installed).
-#
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
-#               (must have dfu-programmer installed).
-#
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
-#                (must have Atmel FLIP installed).
-#
-# make debug = Start either simulavr or avarice as specified for debugging, 
-#              with avr-gdb or avr-insight as the front end for debugging.
-#
-# make filename.s = Just compile filename.c into the assembler code only.
-#
-# make filename.i = Create a preprocessed source file for use in submitting
-#                   bug reports to the GCC project.
-#
-# To rebuild project do "make clean" then "make all".
-#----------------------------------------------------------------------------
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes		# Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes		# Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes		# Audio control and System control(+450)
-# CONSOLE_ENABLE ?= yes		# Console for debug(+400)
-# COMMAND_ENABLE ?= yes		# Commands for debug and configuration
-KEYBOARD_LOCK_ENABLE ?= yes	# Allow locking of keyboard via magic key
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes	# Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes		# USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-# BACKLIGHT_ENABLE ?= yes	# Enable keyboard backlight functionality
-# MIDI_ENABLE ?= YES		# MIDI controls
-# UNICODE_ENABLE ?= YES		# Unicode
-# BLUETOOTH_ENABLE ?= yes	# Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE ?= yes          # Enable RGB Underglow
-
-ifndef QUANTUM_DIR
-	include ../../../../Makefile
-endif
-
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device.
+#                Please customize your programmer settings(PROGRAM_CMD)
+#
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+# make dfu = Download the hex file to the device, using dfu-programmer (must
+#            have dfu-programmer installed).
+#
+# make flip = Download the hex file to the device, using Atmel FLIP (must
+#             have Atmel FLIP installed).
+#
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
+#               (must have dfu-programmer installed).
+#
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
+#                (must have Atmel FLIP installed).
+#
+# make debug = Start either simulavr or avarice as specified for debugging, 
+#              with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+#                   bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes		# Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes		# Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes		# Audio control and System control(+450)
+# CONSOLE_ENABLE ?= yes		# Console for debug(+400)
+# COMMAND_ENABLE ?= yes		# Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE ?= yes	# Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes	# Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes		# USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+# BACKLIGHT_ENABLE ?= yes	# Enable keyboard backlight functionality
+# MIDI_ENABLE ?= YES		# MIDI controls
+# UNICODE_ENABLE ?= YES		# Unicode
+# BLUETOOTH_ENABLE ?= yes	# Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE ?= yes          # Enable RGB Underglow
+
+ifndef QUANTUM_DIR
+	include ../../../../Makefile
+endif
+

+ 190 - 190
keyboards/gh60/keymaps/robotmaxtron/config.h

@@ -1,190 +1,190 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID    0xFEED
-#define PRODUCT_ID   0x6060
-#define DEVICE_VER   0x0001
-#define MANUFACTURER    geekhack
-#define PRODUCT         GH60
-#define DESCRIPTION     t.m.k. keyboard firmware for GH60
-
-/* key matrix size */
-#define MATRIX_ROWS 5
-#define MATRIX_COLS 14
-
-/*
- * Keyboard Matrix Assignments
- *
- * Change this to how you wired your keyboard
- * COLS: AVR pins used for columns, left to right
- * ROWS: AVR pins used for rows, top to bottom
- * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
- *         ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
- *
-*/
- #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
-// Rev A
-// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 }
-// Rev B/C
-   #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
-#define UNUSED_PINS
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 5
-
-/* define if matrix has ghost (lacks anti-ghosting diodes) */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/*
- * Force NKRO
- *
- * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
- * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
- * makefile for this to work.)
- *
- * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
- * until the next keyboard reset.
- *
- * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
- * fully operational during normal computer usage.
- *
- * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
- * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
- * bootmagic, NKRO mode will always be enabled until it is toggled again during a
- * power-up.
- *
- */
-//#define FORCE_NKRO
-
-/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* key combination for magic key command */
-#define IS_COMMAND() ( \
-  keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1     H
-//#define MAGIC_KEY_HELP2     SLASH
-//#define MAGIC_KEY_DEBUG     D
-//#define MAGIC_KEY_DEBUG_MATRIX  X
-//#define MAGIC_KEY_DEBUG_KBD   K
-//#define MAGIC_KEY_DEBUG_MOUSE  M
-//#define MAGIC_KEY_VERSION    V
-//#define MAGIC_KEY_STATUS     S
-//#define MAGIC_KEY_CONSOLE    C
-//#define MAGIC_KEY_LAYER0_ALT1  ESC
-//#define MAGIC_KEY_LAYER0_ALT2  GRAVE
-//#define MAGIC_KEY_LAYER0     0
-//#define MAGIC_KEY_LAYER1     1
-//#define MAGIC_KEY_LAYER2     2
-//#define MAGIC_KEY_LAYER3     3
-//#define MAGIC_KEY_LAYER4     4
-//#define MAGIC_KEY_LAYER5     5
-//#define MAGIC_KEY_LAYER6     6
-//#define MAGIC_KEY_LAYER7     7
-//#define MAGIC_KEY_LAYER8     8
-//#define MAGIC_KEY_LAYER9     9
-//#define MAGIC_KEY_BOOTLOADER   PAUSE
-//#define MAGIC_KEY_LOCK      CAPS
-//#define MAGIC_KEY_EEPROM     E
-//#define MAGIC_KEY_NKRO      N
-//#define MAGIC_KEY_SLEEP_LED   Z
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-/*
- * RGB Underglow
- * These settings are for the F4 by default:
- * 
- *
- * #define ws2812_PORTREG  PORTF
- * #define ws2812_DDRREG   DDRF
- * #define ws2812_pin PF4
- * #define RGBLED_NUM 14     // Number of LEDs
- * #define RGBLIGHT_HUE_STEP 10
- * #define RGBLIGHT_SAT_STEP 17
- * #define RGBLIGHT_VAL_STEP 17
- *
- * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. 
- * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. 
- * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c
-*/
-
-/* Deprecated code below
-#define ws2812_PORTREG  PORTF 
-#define ws2812_DDRREG   DDRF
-#define ws2812_pin PF4
-*/ 
-#define RGB_DI_PIN F4
-#define RGBLIGHT_TIMER
-#define RGBLED_NUM 8         // Number of LEDs
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#endif
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID    0xFEED
+#define PRODUCT_ID   0x6060
+#define DEVICE_VER   0x0001
+#define MANUFACTURER    geekhack
+#define PRODUCT         GH60
+#define DESCRIPTION     t.m.k. keyboard firmware for GH60
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *         ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+// Rev A
+// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 }
+// Rev B/C
+   #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+  keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1     H
+//#define MAGIC_KEY_HELP2     SLASH
+//#define MAGIC_KEY_DEBUG     D
+//#define MAGIC_KEY_DEBUG_MATRIX  X
+//#define MAGIC_KEY_DEBUG_KBD   K
+//#define MAGIC_KEY_DEBUG_MOUSE  M
+//#define MAGIC_KEY_VERSION    V
+//#define MAGIC_KEY_STATUS     S
+//#define MAGIC_KEY_CONSOLE    C
+//#define MAGIC_KEY_LAYER0_ALT1  ESC
+//#define MAGIC_KEY_LAYER0_ALT2  GRAVE
+//#define MAGIC_KEY_LAYER0     0
+//#define MAGIC_KEY_LAYER1     1
+//#define MAGIC_KEY_LAYER2     2
+//#define MAGIC_KEY_LAYER3     3
+//#define MAGIC_KEY_LAYER4     4
+//#define MAGIC_KEY_LAYER5     5
+//#define MAGIC_KEY_LAYER6     6
+//#define MAGIC_KEY_LAYER7     7
+//#define MAGIC_KEY_LAYER8     8
+//#define MAGIC_KEY_LAYER9     9
+//#define MAGIC_KEY_BOOTLOADER   PAUSE
+//#define MAGIC_KEY_LOCK      CAPS
+//#define MAGIC_KEY_EEPROM     E
+//#define MAGIC_KEY_NKRO      N
+//#define MAGIC_KEY_SLEEP_LED   Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * RGB Underglow
+ * These settings are for the F4 by default:
+ * 
+ *
+ * #define ws2812_PORTREG  PORTF
+ * #define ws2812_DDRREG   DDRF
+ * #define ws2812_pin PF4
+ * #define RGBLED_NUM 14     // Number of LEDs
+ * #define RGBLIGHT_HUE_STEP 10
+ * #define RGBLIGHT_SAT_STEP 17
+ * #define RGBLIGHT_VAL_STEP 17
+ *
+ * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. 
+ * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. 
+ * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c
+*/
+
+/* Deprecated code below
+#define ws2812_PORTREG  PORTF 
+#define ws2812_DDRREG   DDRF
+#define ws2812_pin PF4
+*/ 
+#define RGB_DI_PIN F4
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 8         // Number of LEDs
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#endif

+ 17 - 17
keyboards/gh60/pinout.txt

@@ -1,18 +1,18 @@
-    /* Column pin configuration
-    * col: 0   1   2   3   4   5   6   7   8   9   10  11  12  13
-    * pin: F0  F1  E6  C7  C6  B6  D4  B1  B7  B5  B4  D7  D6  B3  (Rev.C)
-    */
-     
-    /* Row pin configuration
-    * row: 0   1   2   3   4
-    * pin: D0  D1  D2  D3  D5
-    */
-     
-    GPIO pads
-    0 F7 WASD LEDs
-    1 F6 ESC LED
-    2 F5 FN LED
-    3 F4 POKER Arrow LEDs
-     
-    B2 Capslock LED
+    /* Column pin configuration
+    * col: 0   1   2   3   4   5   6   7   8   9   10  11  12  13
+    * pin: F0  F1  E6  C7  C6  B6  D4  B1  B7  B5  B4  D7  D6  B3  (Rev.C)
+    */
+     
+    /* Row pin configuration
+    * row: 0   1   2   3   4
+    * pin: D0  D1  D2  D3  D5
+    */
+     
+    GPIO pads
+    0 F7 WASD LEDs
+    1 F6 ESC LED
+    2 F5 FN LED
+    3 F4 POKER Arrow LEDs
+     
+    B2 Capslock LED
     B0 not connected

+ 60 - 60
keyboards/gh60/readme.md

@@ -1,60 +1,60 @@
-## gh60 Rev C keyboard firmware
-
-![gh60 Rev C PCB](gh60revc.jpg)
-
-    /* Column pin configuration
-    * col: 0   1   2   3   4   5   6   7   8   9   10  11  12  13
-    * pin: F0  F1  E6  C7  C6  B6  D4  B1  B7  B5  B4  D7  D6  B3  (Rev.C)
-    */
-     
-    /* Row pin configuration
-    * row: 0   1   2   3   4
-    * pin: D0  D1  D2  D3  D5
-    */
-     
-    GPIO pads
-    0 F7 WASD LEDs
-    1 F6 ESC LED
-    2 F5 FN LED
-    3 F4 POKER Arrow LEDs
-     
-    B2 Capslock LED
-    B0 not connected
-	
-Functions to controls LED clusters
-	
-    gh60_caps_led_on()
-    gh60_poker_leds_on()
-    gh60_fn_led_on()
-    gh60_esc_led_on()
-    gh60_wasd_leds_on()
-    
-    gh60_caps_led_off()
-    gh60_poker_leds_off()
-    gh60_fn_led_off()
-    gh60_esc_led_off()
-    gh60_wasd_leds_off()
-	
-======================
-
-## Quantum MK Firmware
-
-For the full Quantum feature list, see [the parent readme.md](/readme.md).
-
-## Building
-
-Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 
-
-Depending on which keymap you would like to use, you will have to compile slightly differently.
-
-### Default
-To build with the default keymap, simply run `make`.
-
-### Other Keymaps
-Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
-
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
-```
-$ make KEYMAP=[default|jack|<name>]
-```
-Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
+## gh60 Rev C keyboard firmware
+
+![gh60 Rev C PCB](gh60revc.jpg)
+
+    /* Column pin configuration
+    * col: 0   1   2   3   4   5   6   7   8   9   10  11  12  13
+    * pin: F0  F1  E6  C7  C6  B6  D4  B1  B7  B5  B4  D7  D6  B3  (Rev.C)
+    */
+     
+    /* Row pin configuration
+    * row: 0   1   2   3   4
+    * pin: D0  D1  D2  D3  D5
+    */
+     
+    GPIO pads
+    0 F7 WASD LEDs
+    1 F6 ESC LED
+    2 F5 FN LED
+    3 F4 POKER Arrow LEDs
+     
+    B2 Capslock LED
+    B0 not connected
+	
+Functions to controls LED clusters
+	
+    gh60_caps_led_on()
+    gh60_poker_leds_on()
+    gh60_fn_led_on()
+    gh60_esc_led_on()
+    gh60_wasd_leds_on()
+    
+    gh60_caps_led_off()
+    gh60_poker_leds_off()
+    gh60_fn_led_off()
+    gh60_esc_led_off()
+    gh60_wasd_leds_off()
+	
+======================
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+```
+$ make KEYMAP=[default|jack|<name>]
+```
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 524 - 524
keyboards/infinity_chibios/chconf.h


+ 353 - 353
keyboards/infinity_chibios/halconf.h

@@ -1,353 +1,353 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-/**
- * @file    templates/halconf.h
- * @brief   HAL configuration header.
- * @details HAL configuration file, this file allows to enable or disable the
- *          various device drivers from your application. You may also use
- *          this file in order to override the device drivers default settings.
- *
- * @addtogroup HAL_CONF
- * @{
- */
-
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
-
-#include "mcuconf.h"
-
-/**
- * @brief   Enables the PAL subsystem.
- */
-#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL                 TRUE
-#endif
-
-/**
- * @brief   Enables the ADC subsystem.
- */
-#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC                 FALSE
-#endif
-
-/**
- * @brief   Enables the CAN subsystem.
- */
-#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN                 FALSE
-#endif
-
-/**
- * @brief   Enables the DAC subsystem.
- */
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC                 FALSE
-#endif
-
-/**
- * @brief   Enables the EXT subsystem.
- */
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT                 FALSE
-#endif
-
-/**
- * @brief   Enables the GPT subsystem.
- */
-#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT                 FALSE
-#endif
-
-/**
- * @brief   Enables the I2C subsystem.
- */
-#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C                 FALSE
-#endif
-
-/**
- * @brief   Enables the I2S subsystem.
- */
-#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S                 FALSE
-#endif
-
-/**
- * @brief   Enables the ICU subsystem.
- */
-#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU                 FALSE
-#endif
-
-/**
- * @brief   Enables the MAC subsystem.
- */
-#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC                 FALSE
-#endif
-
-/**
- * @brief   Enables the MMC_SPI subsystem.
- */
-#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_MMC_SPI             FALSE
-#endif
-
-/**
- * @brief   Enables the PWM subsystem.
- */
-#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM                 FALSE
-#endif
-
-/**
- * @brief   Enables the RTC subsystem.
- */
-#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC                 FALSE
-#endif
-
-/**
- * @brief   Enables the SDC subsystem.
- */
-#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC                 FALSE
-#endif
-
-/**
- * @brief   Enables the SERIAL subsystem.
- */
-#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL              FALSE
-#endif
-
-/**
- * @brief   Enables the SERIAL over USB subsystem.
- */
-#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL_USB          TRUE
-#endif
-
-/**
- * @brief   Enables the SPI subsystem.
- */
-#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI                 FALSE
-#endif
-
-/**
- * @brief   Enables the UART subsystem.
- */
-#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART                FALSE
-#endif
-
-/**
- * @brief   Enables the USB subsystem.
- */
-#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB                 TRUE
-#endif
-
-/**
- * @brief   Enables the WDG subsystem.
- */
-#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG                 FALSE
-#endif
-
-/*===========================================================================*/
-/* ADC driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Enables synchronous APIs.
- * @note    Disabling this option saves both code and data space.
- */
-#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT                TRUE
-#endif
-
-/**
- * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
- * @note    Disabling this option saves both code and data space.
- */
-#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION    TRUE
-#endif
-
-/*===========================================================================*/
-/* CAN driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Sleep mode related APIs inclusion switch.
- */
-#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE          TRUE
-#endif
-
-/*===========================================================================*/
-/* I2C driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Enables the mutual exclusion APIs on the I2C bus.
- */
-#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION    TRUE
-#endif
-
-/*===========================================================================*/
-/* MAC driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Enables an event sources for incoming packets.
- */
-#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY           FALSE
-#endif
-
-/**
- * @brief   Enables an event sources for incoming packets.
- */
-#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
-#define MAC_USE_EVENTS              TRUE
-#endif
-
-/*===========================================================================*/
-/* MMC_SPI driver related settings.                                          */
-/*===========================================================================*/
-
-/**
- * @brief   Delays insertions.
- * @details If enabled this options inserts delays into the MMC waiting
- *          routines releasing some extra CPU time for the threads with
- *          lower priority, this may slow down the driver a bit however.
- *          This option is recommended also if the SPI driver does not
- *          use a DMA channel and heavily loads the CPU.
- */
-#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING            TRUE
-#endif
-
-/*===========================================================================*/
-/* SDC driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Number of initialization attempts before rejecting the card.
- * @note    Attempts are performed at 10mS intervals.
- */
-#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY              100
-#endif
-
-/**
- * @brief   Include support for MMC cards.
- * @note    MMC support is not yet implemented so this option must be kept
- *          at @p FALSE.
- */
-#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT             FALSE
-#endif
-
-/**
- * @brief   Delays insertions.
- * @details If enabled this options inserts delays into the MMC waiting
- *          routines releasing some extra CPU time for the threads with
- *          lower priority, this may slow down the driver a bit however.
- */
-#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING            TRUE
-#endif
-
-/*===========================================================================*/
-/* SERIAL driver related settings.                                           */
-/*===========================================================================*/
-
-/**
- * @brief   Default bit rate.
- * @details Configuration parameter, this is the baud rate selected for the
- *          default configuration.
- */
-#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE      38400
-#endif
-
-/**
- * @brief   Serial buffers size.
- * @details Configuration parameter, you can change the depth of the queue
- *          buffers depending on the requirements of your application.
- * @note    The default is 64 bytes for both the transmission and receive
- *          buffers.
- */
-#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE         16
-#endif
-
-/*===========================================================================*/
-/* SERIAL_USB driver related setting.                                        */
-/*===========================================================================*/
-
-/**
- * @brief   Serial over USB buffers size.
- * @details Configuration parameter, the buffer size must be a multiple of
- *          the USB data endpoint maximum packet size.
- * @note    The default is 64 bytes for both the transmission and receive
- *          buffers.
- */
-#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE     256
-#endif
-
-/*===========================================================================*/
-/* SPI driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Enables synchronous APIs.
- * @note    Disabling this option saves both code and data space.
- */
-#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT                TRUE
-#endif
-
-/**
- * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
- * @note    Disabling this option saves both code and data space.
- */
-#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define SPI_USE_MUTUAL_EXCLUSION    TRUE
-#endif
-
-/*===========================================================================*/
-/* USB driver related settings.                                              */
-/*===========================================================================*/
-
-/**
- * @brief   Enables synchronous APIs.
- * @note    Disabling this option saves both code and data space.
- */
-#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT                TRUE
-#endif
-
-#endif /* _HALCONF_H_ */
-
-/** @} */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+/**
+ * @file    templates/halconf.h
+ * @brief   HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ *          various device drivers from your application. You may also use
+ *          this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef _HALCONF_H_
+#define _HALCONF_H_
+
+#include "mcuconf.h"
+
+/**
+ * @brief   Enables the PAL subsystem.
+ */
+#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+#define HAL_USE_PAL                 TRUE
+#endif
+
+/**
+ * @brief   Enables the ADC subsystem.
+ */
+#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+#define HAL_USE_ADC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the CAN subsystem.
+ */
+#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+#define HAL_USE_CAN                 FALSE
+#endif
+
+/**
+ * @brief   Enables the DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the EXT subsystem.
+ */
+#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
+#define HAL_USE_EXT                 FALSE
+#endif
+
+/**
+ * @brief   Enables the GPT subsystem.
+ */
+#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+#define HAL_USE_GPT                 FALSE
+#endif
+
+/**
+ * @brief   Enables the I2C subsystem.
+ */
+#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+#define HAL_USE_I2C                 FALSE
+#endif
+
+/**
+ * @brief   Enables the I2S subsystem.
+ */
+#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+#define HAL_USE_I2S                 FALSE
+#endif
+
+/**
+ * @brief   Enables the ICU subsystem.
+ */
+#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+#define HAL_USE_ICU                 FALSE
+#endif
+
+/**
+ * @brief   Enables the MAC subsystem.
+ */
+#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+#define HAL_USE_MAC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the MMC_SPI subsystem.
+ */
+#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_MMC_SPI             FALSE
+#endif
+
+/**
+ * @brief   Enables the PWM subsystem.
+ */
+#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+#define HAL_USE_PWM                 FALSE
+#endif
+
+/**
+ * @brief   Enables the RTC subsystem.
+ */
+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+#define HAL_USE_RTC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the SDC subsystem.
+ */
+#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+#define HAL_USE_SDC                 FALSE
+#endif
+
+/**
+ * @brief   Enables the SERIAL subsystem.
+ */
+#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL              FALSE
+#endif
+
+/**
+ * @brief   Enables the SERIAL over USB subsystem.
+ */
+#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL_USB          TRUE
+#endif
+
+/**
+ * @brief   Enables the SPI subsystem.
+ */
+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_SPI                 FALSE
+#endif
+
+/**
+ * @brief   Enables the UART subsystem.
+ */
+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+#define HAL_USE_UART                FALSE
+#endif
+
+/**
+ * @brief   Enables the USB subsystem.
+ */
+#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+#define HAL_USE_USB                 TRUE
+#endif
+
+/**
+ * @brief   Enables the WDG subsystem.
+ */
+#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+#define HAL_USE_WDG                 FALSE
+#endif
+
+/*===========================================================================*/
+/* ADC driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Enables synchronous APIs.
+ * @note    Disabling this option saves both code and data space.
+ */
+#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+#define ADC_USE_WAIT                TRUE
+#endif
+
+/**
+ * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note    Disabling this option saves both code and data space.
+ */
+#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define ADC_USE_MUTUAL_EXCLUSION    TRUE
+#endif
+
+/*===========================================================================*/
+/* CAN driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Sleep mode related APIs inclusion switch.
+ */
+#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+#define CAN_USE_SLEEP_MODE          TRUE
+#endif
+
+/*===========================================================================*/
+/* I2C driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Enables the mutual exclusion APIs on the I2C bus.
+ */
+#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define I2C_USE_MUTUAL_EXCLUSION    TRUE
+#endif
+
+/*===========================================================================*/
+/* MAC driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Enables an event sources for incoming packets.
+ */
+#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+#define MAC_USE_ZERO_COPY           FALSE
+#endif
+
+/**
+ * @brief   Enables an event sources for incoming packets.
+ */
+#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+#define MAC_USE_EVENTS              TRUE
+#endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings.                                          */
+/*===========================================================================*/
+
+/**
+ * @brief   Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ *          routines releasing some extra CPU time for the threads with
+ *          lower priority, this may slow down the driver a bit however.
+ *          This option is recommended also if the SPI driver does not
+ *          use a DMA channel and heavily loads the CPU.
+ */
+#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+#define MMC_NICE_WAITING            TRUE
+#endif
+
+/*===========================================================================*/
+/* SDC driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Number of initialization attempts before rejecting the card.
+ * @note    Attempts are performed at 10mS intervals.
+ */
+#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+#define SDC_INIT_RETRY              100
+#endif
+
+/**
+ * @brief   Include support for MMC cards.
+ * @note    MMC support is not yet implemented so this option must be kept
+ *          at @p FALSE.
+ */
+#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+#define SDC_MMC_SUPPORT             FALSE
+#endif
+
+/**
+ * @brief   Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ *          routines releasing some extra CPU time for the threads with
+ *          lower priority, this may slow down the driver a bit however.
+ */
+#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+#define SDC_NICE_WAITING            TRUE
+#endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings.                                           */
+/*===========================================================================*/
+
+/**
+ * @brief   Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ *          default configuration.
+ */
+#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+#define SERIAL_DEFAULT_BITRATE      38400
+#endif
+
+/**
+ * @brief   Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ *          buffers depending on the requirements of your application.
+ * @note    The default is 64 bytes for both the transmission and receive
+ *          buffers.
+ */
+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_BUFFERS_SIZE         16
+#endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting.                                        */
+/*===========================================================================*/
+
+/**
+ * @brief   Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ *          the USB data endpoint maximum packet size.
+ * @note    The default is 64 bytes for both the transmission and receive
+ *          buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_SIZE     256
+#endif
+
+/*===========================================================================*/
+/* SPI driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Enables synchronous APIs.
+ * @note    Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+#define SPI_USE_WAIT                TRUE
+#endif
+
+/**
+ * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note    Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define SPI_USE_MUTUAL_EXCLUSION    TRUE
+#endif
+
+/*===========================================================================*/
+/* USB driver related settings.                                              */
+/*===========================================================================*/
+
+/**
+ * @brief   Enables synchronous APIs.
+ * @note    Disabling this option saves both code and data space.
+ */
+#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+#define USB_USE_WAIT                TRUE
+#endif
+
+#endif /* _HALCONF_H_ */
+
+/** @} */

+ 55 - 55
keyboards/infinity_chibios/mcuconf.h

@@ -1,55 +1,55 @@
-/*
-    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-*/
-
-#ifndef _MCUCONF_H_
-#define _MCUCONF_H_
-
-#define K20x_MCUCONF
-
-/*
- * HAL driver system settings.
- */
-
-/* Select the MCU clocking mode below by enabling the appropriate block. */
-
-#define KINETIS_NO_INIT             FALSE
-
-/* FEI mode - 48 MHz with internal 32.768 kHz crystal */
-#define KINETIS_MCG_MODE            KINETIS_MCG_MODE_FEI
-#define KINETIS_MCG_FLL_DMX32       1           /* Fine-tune for 32.768 kHz */
-#define KINETIS_MCG_FLL_DRS         1           /* 1464x FLL factor */
-#define KINETIS_SYSCLK_FREQUENCY    47972352UL  /* 32.768 kHz * 1464 (~48 MHz) */
-#define KINETIS_CLKDIV1_OUTDIV1     1
-#define KINETIS_CLKDIV1_OUTDIV2     1
-#define KINETIS_CLKDIV1_OUTDIV4     2
-#define KINETIS_BUSCLK_FREQUENCY    KINETIS_SYSCLK_FREQUENCY
-#define KINETIS_FLASHCLK_FREQUENCY  KINETIS_SYSCLK_FREQUENCY/2
-
-/*
- * SERIAL driver system settings.
- */
-#define KINETIS_SERIAL_USE_UART0            TRUE
-
-/*
- * USB driver settings
- */
-#define KINETIS_USB_USE_USB0                TRUE
-/* Need to redefine this, since the default is for K20x */
-/* This is for Teensy LC; you should comment it out (or change to 5)
- * for Teensy 3.x */
-#define KINETIS_USB_USB0_IRQ_PRIORITY       2
-
-#endif /* _MCUCONF_H_ */
+/*
+    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+#ifndef _MCUCONF_H_
+#define _MCUCONF_H_
+
+#define K20x_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/* Select the MCU clocking mode below by enabling the appropriate block. */
+
+#define KINETIS_NO_INIT             FALSE
+
+/* FEI mode - 48 MHz with internal 32.768 kHz crystal */
+#define KINETIS_MCG_MODE            KINETIS_MCG_MODE_FEI
+#define KINETIS_MCG_FLL_DMX32       1           /* Fine-tune for 32.768 kHz */
+#define KINETIS_MCG_FLL_DRS         1           /* 1464x FLL factor */
+#define KINETIS_SYSCLK_FREQUENCY    47972352UL  /* 32.768 kHz * 1464 (~48 MHz) */
+#define KINETIS_CLKDIV1_OUTDIV1     1
+#define KINETIS_CLKDIV1_OUTDIV2     1
+#define KINETIS_CLKDIV1_OUTDIV4     2
+#define KINETIS_BUSCLK_FREQUENCY    KINETIS_SYSCLK_FREQUENCY
+#define KINETIS_FLASHCLK_FREQUENCY  KINETIS_SYSCLK_FREQUENCY/2
+
+/*
+ * SERIAL driver system settings.
+ */
+#define KINETIS_SERIAL_USE_UART0            TRUE
+
+/*
+ * USB driver settings
+ */
+#define KINETIS_USB_USE_USB0                TRUE
+/* Need to redefine this, since the default is for K20x */
+/* This is for Teensy LC; you should comment it out (or change to 5)
+ * for Teensy 3.x */
+#define KINETIS_USB_USB0_IRQ_PRIORITY       2
+
+#endif /* _MCUCONF_H_ */

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 500 - 500
tmk_core/common/avr/xprintf.S


+ 111 - 111
tmk_core/common/avr/xprintf.h

@@ -1,111 +1,111 @@
-/*---------------------------------------------------------------------------
-   Extended itoa, puts and printf                    (C)ChaN, 2011
------------------------------------------------------------------------------*/
-
-#ifndef XPRINTF_H
-#define XPRINTF_H
-
-#include <inttypes.h>
-#include <avr/pgmspace.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void (*xfunc_out)(uint8_t);
-#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)
-
-/* This is a pointer to user defined output function. It must be initialized
-   before using this modle.
-*/
-
-void xputc(char chr);
-
-/* This is a stub function to forward outputs to user defined output function.
-   All outputs from this module are output via this function.
-*/
-
-
-/*-----------------------------------------------------------------------------*/
-void xputs(const char *string_p);
-
-/*  The string placed in the ROM is forwarded to xputc() directly.
-*/
-
-
-/*-----------------------------------------------------------------------------*/
-void xitoa(long value, char radix, char width);
-
-/* Extended itoa().
-
-      value  radix  width   output
-        100     10      6   "   100"
-        100     10     -6   "000100"
-        100     10      0   "100"
- 4294967295     10      0   "4294967295"
- 4294967295    -10      0   "-1"
-     655360     16     -8   "000A0000"
-       1024     16      0   "400"
-       0x55      2     -8   "01010101"
-*/
-
-
-/*-----------------------------------------------------------------------------*/
-#define xprintf(format, ...)            __xprintf(PSTR(format), ##__VA_ARGS__)
-#define xsprintf(str, format, ...)      __xsprintf(str, PSTR(format), ##__VA_ARGS__)
-#define xfprintf(func, format, ...)     __xfprintf(func, PSTR(format), ##__VA_ARGS__)
-
-void __xprintf(const char *format_p, ...);	/* Send formatted string to the registered device */
-void __xsprintf(char*, const char *format_p, ...);	/* Put formatted string to the memory */
-void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */
-
-/* Format string is placed in the ROM. The format flags is similar to printf().
-
-   %[flag][width][size]type
-
-   flag
-     A '0' means filled with '0' when output is shorter than width.
-     ' ' is used in default. This is effective only numeral type.
-   width
-     Minimum width in decimal number. This is effective only numeral type.
-     Default width is zero.
-   size
-     A 'l' means the argument is long(32bit). Default is short(16bit).
-     This is effective only numeral type.
-   type
-     'c' : Character, argument is the value
-     's' : String placed on the RAM, argument is the pointer
-     'S' : String placed on the ROM, argument is the pointer
-     'd' : Signed decimal, argument is the value
-     'u' : Unsigned decimal, argument is the value
-     'X' : Hexdecimal, argument is the value
-     'b' : Binary, argument is the value
-     '%' : '%'
-
-*/
-
-
-/*-----------------------------------------------------------------------------*/
-char xatoi(char **str, long *ret);
-
-/* Get value of the numeral string. 
-
-  str
-    Pointer to pointer to source string
-
-    "0b11001010" binary
-    "0377" octal
-    "0xff800" hexdecimal
-    "1250000" decimal
-    "-25000" decimal
-
-  ret
-    Pointer to return value
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*---------------------------------------------------------------------------
+   Extended itoa, puts and printf                    (C)ChaN, 2011
+-----------------------------------------------------------------------------*/
+
+#ifndef XPRINTF_H
+#define XPRINTF_H
+
+#include <inttypes.h>
+#include <avr/pgmspace.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void (*xfunc_out)(uint8_t);
+#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)
+
+/* This is a pointer to user defined output function. It must be initialized
+   before using this modle.
+*/
+
+void xputc(char chr);
+
+/* This is a stub function to forward outputs to user defined output function.
+   All outputs from this module are output via this function.
+*/
+
+
+/*-----------------------------------------------------------------------------*/
+void xputs(const char *string_p);
+
+/*  The string placed in the ROM is forwarded to xputc() directly.
+*/
+
+
+/*-----------------------------------------------------------------------------*/
+void xitoa(long value, char radix, char width);
+
+/* Extended itoa().
+
+      value  radix  width   output
+        100     10      6   "   100"
+        100     10     -6   "000100"
+        100     10      0   "100"
+ 4294967295     10      0   "4294967295"
+ 4294967295    -10      0   "-1"
+     655360     16     -8   "000A0000"
+       1024     16      0   "400"
+       0x55      2     -8   "01010101"
+*/
+
+
+/*-----------------------------------------------------------------------------*/
+#define xprintf(format, ...)            __xprintf(PSTR(format), ##__VA_ARGS__)
+#define xsprintf(str, format, ...)      __xsprintf(str, PSTR(format), ##__VA_ARGS__)
+#define xfprintf(func, format, ...)     __xfprintf(func, PSTR(format), ##__VA_ARGS__)
+
+void __xprintf(const char *format_p, ...);	/* Send formatted string to the registered device */
+void __xsprintf(char*, const char *format_p, ...);	/* Put formatted string to the memory */
+void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */
+
+/* Format string is placed in the ROM. The format flags is similar to printf().
+
+   %[flag][width][size]type
+
+   flag
+     A '0' means filled with '0' when output is shorter than width.
+     ' ' is used in default. This is effective only numeral type.
+   width
+     Minimum width in decimal number. This is effective only numeral type.
+     Default width is zero.
+   size
+     A 'l' means the argument is long(32bit). Default is short(16bit).
+     This is effective only numeral type.
+   type
+     'c' : Character, argument is the value
+     's' : String placed on the RAM, argument is the pointer
+     'S' : String placed on the ROM, argument is the pointer
+     'd' : Signed decimal, argument is the value
+     'u' : Unsigned decimal, argument is the value
+     'X' : Hexdecimal, argument is the value
+     'b' : Binary, argument is the value
+     '%' : '%'
+
+*/
+
+
+/*-----------------------------------------------------------------------------*/
+char xatoi(char **str, long *ret);
+
+/* Get value of the numeral string. 
+
+  str
+    Pointer to pointer to source string
+
+    "0b11001010" binary
+    "0377" octal
+    "0xff800" hexdecimal
+    "1250000" decimal
+    "-25000" decimal
+
+  ret
+    Pointer to return value
+*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

+ 156 - 156
tmk_core/protocol/iwrap/suart.S

@@ -1,156 +1,156 @@
-;---------------------------------------------------------------------------;
-; Software implemented UART module                                          ;
-; (C)ChaN, 2005 (http://elm-chan.org/)                                      ;
-;---------------------------------------------------------------------------;
-; Bit rate settings:
-;
-;            1MHz  2MHz  4MHz  6MHz  8MHz  10MHz  12MHz  16MHz  20MHz
-;   2.4kbps   138     -     -     -     -      -      -      -      -
-;   4.8kbps    68   138     -     -     -      -      -      -      -
-;   9.6kbps    33    68   138   208     -      -      -      -      -
-;  19.2kbps     -    33    68   102   138    173    208      -      -
-;  38.4kbps     -     -    33    50    68     85    102    138    172
-;  57.6kbps     -     -    21    33    44     56     68     91    114
-; 115.2kbps     -     -     -     -    21     27     33     44     56
-
-.nolist
-#include <avr/io.h>
-.list
-
-#define	BPS	102 	/* Bit delay. (see above table) */
-#define	BIDIR	0	/* 0:Separated Tx/Rx, 1:Shared Tx/Rx */
-
-#define	OUT_1		sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT	/* Output 1 */
-#define	OUT_0		cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT	/* Output 0 */
-#define	SKIP_IN_1	sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT	/* Skip if 1 */
-#define	SKIP_IN_0	sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT	/* Skip if 0 */
-
-
-
-#ifdef SPM_PAGESIZE
-.macro	_LPMI	reg
-	lpm	\reg, Z+
-.endm
-.macro	_MOVW	dh,dl, sh,sl
-	movw	\dl, \sl
-.endm
-#else
-.macro	_LPMI	reg
-	lpm
-	mov	\reg, r0
-	adiw	ZL, 1
-.endm
-.macro	_MOVW	dh,dl, sh,sl
-	mov	\dl, \sl
-	mov	\dh, \sh
-.endm
-#endif
-
-
-
-;---------------------------------------------------------------------------;
-; Transmit a byte in serial format of N81
-;
-;Prototype: void xmit (uint8_t data);
-;Size: 16 words
-
-.global xmit
-.func xmit
-xmit:
-#if BIDIR
-	ldi	r23, BPS-1	;Pre-idle time for bidirectional data line
-5:	dec	r23     	;
-	brne	5b		;/
-#endif
-	in	r0, _SFR_IO_ADDR(SREG)	;Save flags
-
-	com	r24		;C = start bit
-	ldi	r25, 10		;Bit counter
-	cli			;Start critical section
-
-1:	ldi	r23, BPS-1	;----- Bit transferring loop 
-2:	dec	r23     	;Wait for a bit time
-	brne	2b		;/
-	brcs	3f		;MISO = bit to be sent
-	OUT_1			;
-3:	brcc	4f		;
-	OUT_0			;/
-4:	lsr	r24     	;Get next bit into C
-	dec	r25     	;All bits sent?
-	brne	1b	     	;  no, coutinue
-
-	out	_SFR_IO_ADDR(SREG), r0	;End of critical section
-	ret
-.endfunc
-
-
-
-;---------------------------------------------------------------------------;
-; Receive a byte
-;
-;Prototype: uint8_t rcvr (void);
-;Size: 19 words
-
-.global rcvr
-.func rcvr
-rcvr:
-	in	r0, _SFR_IO_ADDR(SREG)	;Save flags
-
-	ldi	r24, 0x80	;Receiving shift reg
-	cli			;Start critical section
-
-1:	SKIP_IN_1		;Wait for idle
-	rjmp	1b
-2:	SKIP_IN_0		;Wait for start bit
-	rjmp	2b
-	ldi	r25, BPS/2	;Wait for half bit time
-3:	dec	r25
-	brne	3b
-
-4:	ldi	r25, BPS	;----- Bit receiving loop
-5:	dec	r25     	;Wait for a bit time
-	brne	5b		;/
-	lsr	r24     	;Next bit
-	SKIP_IN_0		;Get a data bit into r24.7
-	ori	r24, 0x80
-	brcc	4b	     	;All bits received?  no, continue
-
-	out	_SFR_IO_ADDR(SREG), r0	;End of critical section
-	ret
-.endfunc
-
-
-; Not wait for start bit. This should be called after detecting start bit.
-.global recv
-.func recv
-recv:
-	in	r0, _SFR_IO_ADDR(SREG)	;Save flags
-
-	ldi	r24, 0x80	;Receiving shift reg
-	cli			;Start critical section
-
-;1:	SKIP_IN_1		;Wait for idle
-;	rjmp	1b
-;2:	SKIP_IN_0		;Wait for start bit
-;	rjmp	2b
-	ldi	r25, BPS/2	;Wait for half bit time
-3:	dec	r25
-	brne	3b
-
-4:	ldi	r25, BPS	;----- Bit receiving loop
-5:	dec	r25     	;Wait for a bit time
-	brne	5b		;/
-	lsr	r24     	;Next bit
-	SKIP_IN_0		;Get a data bit into r24.7
-	ori	r24, 0x80
-	brcc	4b	     	;All bits received?  no, continue
-
-	ldi	r25, BPS/2	;Wait for half bit time
-6:	dec	r25
-	brne	6b
-7:	SKIP_IN_1		;Wait for stop bit
-	rjmp	7b
-
-	out	_SFR_IO_ADDR(SREG), r0	;End of critical section
-	ret
-.endfunc
+;---------------------------------------------------------------------------;
+; Software implemented UART module                                          ;
+; (C)ChaN, 2005 (http://elm-chan.org/)                                      ;
+;---------------------------------------------------------------------------;
+; Bit rate settings:
+;
+;            1MHz  2MHz  4MHz  6MHz  8MHz  10MHz  12MHz  16MHz  20MHz
+;   2.4kbps   138     -     -     -     -      -      -      -      -
+;   4.8kbps    68   138     -     -     -      -      -      -      -
+;   9.6kbps    33    68   138   208     -      -      -      -      -
+;  19.2kbps     -    33    68   102   138    173    208      -      -
+;  38.4kbps     -     -    33    50    68     85    102    138    172
+;  57.6kbps     -     -    21    33    44     56     68     91    114
+; 115.2kbps     -     -     -     -    21     27     33     44     56
+
+.nolist
+#include <avr/io.h>
+.list
+
+#define	BPS	102 	/* Bit delay. (see above table) */
+#define	BIDIR	0	/* 0:Separated Tx/Rx, 1:Shared Tx/Rx */
+
+#define	OUT_1		sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT	/* Output 1 */
+#define	OUT_0		cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT	/* Output 0 */
+#define	SKIP_IN_1	sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT	/* Skip if 1 */
+#define	SKIP_IN_0	sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT	/* Skip if 0 */
+
+
+
+#ifdef SPM_PAGESIZE
+.macro	_LPMI	reg
+	lpm	\reg, Z+
+.endm
+.macro	_MOVW	dh,dl, sh,sl
+	movw	\dl, \sl
+.endm
+#else
+.macro	_LPMI	reg
+	lpm
+	mov	\reg, r0
+	adiw	ZL, 1
+.endm
+.macro	_MOVW	dh,dl, sh,sl
+	mov	\dl, \sl
+	mov	\dh, \sh
+.endm
+#endif
+
+
+
+;---------------------------------------------------------------------------;
+; Transmit a byte in serial format of N81
+;
+;Prototype: void xmit (uint8_t data);
+;Size: 16 words
+
+.global xmit
+.func xmit
+xmit:
+#if BIDIR
+	ldi	r23, BPS-1	;Pre-idle time for bidirectional data line
+5:	dec	r23     	;
+	brne	5b		;/
+#endif
+	in	r0, _SFR_IO_ADDR(SREG)	;Save flags
+
+	com	r24		;C = start bit
+	ldi	r25, 10		;Bit counter
+	cli			;Start critical section
+
+1:	ldi	r23, BPS-1	;----- Bit transferring loop 
+2:	dec	r23     	;Wait for a bit time
+	brne	2b		;/
+	brcs	3f		;MISO = bit to be sent
+	OUT_1			;
+3:	brcc	4f		;
+	OUT_0			;/
+4:	lsr	r24     	;Get next bit into C
+	dec	r25     	;All bits sent?
+	brne	1b	     	;  no, coutinue
+
+	out	_SFR_IO_ADDR(SREG), r0	;End of critical section
+	ret
+.endfunc
+
+
+
+;---------------------------------------------------------------------------;
+; Receive a byte
+;
+;Prototype: uint8_t rcvr (void);
+;Size: 19 words
+
+.global rcvr
+.func rcvr
+rcvr:
+	in	r0, _SFR_IO_ADDR(SREG)	;Save flags
+
+	ldi	r24, 0x80	;Receiving shift reg
+	cli			;Start critical section
+
+1:	SKIP_IN_1		;Wait for idle
+	rjmp	1b
+2:	SKIP_IN_0		;Wait for start bit
+	rjmp	2b
+	ldi	r25, BPS/2	;Wait for half bit time
+3:	dec	r25
+	brne	3b
+
+4:	ldi	r25, BPS	;----- Bit receiving loop
+5:	dec	r25     	;Wait for a bit time
+	brne	5b		;/
+	lsr	r24     	;Next bit
+	SKIP_IN_0		;Get a data bit into r24.7
+	ori	r24, 0x80
+	brcc	4b	     	;All bits received?  no, continue
+
+	out	_SFR_IO_ADDR(SREG), r0	;End of critical section
+	ret
+.endfunc
+
+
+; Not wait for start bit. This should be called after detecting start bit.
+.global recv
+.func recv
+recv:
+	in	r0, _SFR_IO_ADDR(SREG)	;Save flags
+
+	ldi	r24, 0x80	;Receiving shift reg
+	cli			;Start critical section
+
+;1:	SKIP_IN_1		;Wait for idle
+;	rjmp	1b
+;2:	SKIP_IN_0		;Wait for start bit
+;	rjmp	2b
+	ldi	r25, BPS/2	;Wait for half bit time
+3:	dec	r25
+	brne	3b
+
+4:	ldi	r25, BPS	;----- Bit receiving loop
+5:	dec	r25     	;Wait for a bit time
+	brne	5b		;/
+	lsr	r24     	;Next bit
+	SKIP_IN_0		;Get a data bit into r24.7
+	ori	r24, 0x80
+	brcc	4b	     	;All bits received?  no, continue
+
+	ldi	r25, BPS/2	;Wait for half bit time
+6:	dec	r25
+	brne	6b
+7:	SKIP_IN_1		;Wait for stop bit
+	rjmp	7b
+
+	out	_SFR_IO_ADDR(SREG), r0	;End of critical section
+	ret
+.endfunc

+ 8 - 8
tmk_core/protocol/iwrap/suart.h

@@ -1,8 +1,8 @@
-#ifndef SUART
-#define SUART
-
-void xmit(uint8_t);
-uint8_t rcvr(void);
-uint8_t recv(void);
-
-#endif	/* SUART */
+#ifndef SUART
+#define SUART
+
+void xmit(uint8_t);
+uint8_t rcvr(void);
+uint8_t recv(void);
+
+#endif	/* SUART */

+ 159 - 159
tmk_core/protocol/iwrap/wd.h

@@ -1,159 +1,159 @@
-/* This is from http://www.mtcnet.net/~henryvm/wdt/ */
-#ifndef _AVR_WD_H_
-#define _AVR_WD_H_
-
-#include <avr/io.h>
-
-/*
-Copyright (c) 2009, Curt Van Maanen
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-include usage-
-    #include "wd.h"             //if in same directory as project
-    #include <avr/wd.h>         //if wd.h is in avr directory
-
-set watchdog modes and prescale
-
-usage-
-    WD_SET(mode,[timeout]);     //prescale always set
-
-modes-
-    WD_OFF                      disabled
-    WD_RST                      normal reset mode
-    WD_IRQ                      interrupt only mode (if supported)
-    WD_RST_IRQ                  interrupt+reset mode (if supported)
-
-timeout-
-    WDTO_15MS                   default if no timeout provided
-    WDTO_30MS
-    WDTO_60MS
-    WDTO_120MS
-    WDTO_250MS
-    WDTO_500MS
-    WDTO_1S
-    WDTO_2S
-    WDTO_4S                     (if supported)
-    WDTO_8S                     (if supported)
-
-examples-
-    WD_SET(WD_RST,WDTO_1S);     //reset mode, 1s timeout
-    WD_SET(WD_OFF);             //watchdog disabled (if not fused on)
-    WD_SET(WD_RST);             //reset mode, 15ms (default timeout)
-    WD_SET(WD_IRQ,WDTO_120MS);  //interrupt only mode, 120ms timeout
-    WD_SET(WD_RST_IRQ,WDTO_2S); //interrupt+reset mode, 2S timeout
-
-
-for enhanced watchdogs, if the watchdog is not being used WDRF should be
-cleared on every power up or reset, along with disabling the watchdog-
-    WD_DISABLE();               //clear WDRF, then turn off watchdog
-
-*/
-
-//reset registers to the same name (MCUCSR)
-#if !defined(MCUCSR)
-#define MCUCSR                  MCUSR
-#endif
-
-//watchdog registers to the same name (WDTCSR)
-#if !defined(WDTCSR)
-#define WDTCSR                  WDTCR
-#endif
-
-//if enhanced watchdog, define irq values, create disable macro
-#if defined(WDIF)
-#define WD_IRQ                  0xC0
-#define WD_RST_IRQ              0xC8
-#define WD_DISABLE()            do{                       \
-                                    MCUCSR &= ~(1<<WDRF); \
-                                    WD_SET(WD_OFF);       \
-                                }while(0)
-#endif
-
-//all watchdogs
-#define WD_RST                  8
-#define WD_OFF                  0
-
-//prescale values
-#define WDTO_15MS               0
-#define WDTO_30MS               1
-#define WDTO_60MS               2
-#define WDTO_120MS              3
-#define WDTO_250MS              4
-#define WDTO_500MS              5
-#define WDTO_1S                 6
-#define WDTO_2S                 7
-
-//prescale values for avrs with WDP3
-#if defined(WDP3)
-#define WDTO_4S                 0x20
-#define WDTO_8S                 0x21
-#endif
-
-//watchdog reset
-#define WDR()                   __asm__ __volatile__("wdr")
-
-//avr reset using watchdog
-#define WD_AVR_RESET()          do{                              \
-                                    __asm__ __volatile__("cli"); \
-                                    WD_SET_UNSAFE(WD_RST);       \
-                                    while(1);                    \
-                                }while(0)
-
-/*set the watchdog-
-1. save SREG
-2. turn off irq's
-3. reset watchdog timer
-4. enable watchdog change
-5. write watchdog value
-6. restore SREG (restoring irq status)
-*/
-#define WD_SET(val,...)                                 \
-    __asm__ __volatile__(                               \
-        "in __tmp_reg__,__SREG__"           "\n\t"      \
-        "cli"                               "\n\t"      \
-        "wdr"                               "\n\t"      \
-        "sts %[wdreg],%[wden]"              "\n\t"      \
-        "sts %[wdreg],%[wdval]"             "\n\t"      \
-        "out __SREG__,__tmp_reg__"          "\n\t"      \
-        :                                               \
-        : [wdreg] "M" (&WDTCSR),                        \
-          [wden]  "r" ((uint8_t)(0x18)),                \
-          [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0)))  \
-        : "r0"                                          \
-)
-
-/*set the watchdog when I bit in SREG known to be clear-
-1. reset watchdog timer
-2. enable watchdog change
-5. write watchdog value
-*/
-#define WD_SET_UNSAFE(val,...)                          \
-    __asm__ __volatile__(                               \
-        "wdr"                               "\n\t"      \
-        "sts %[wdreg],%[wden]"              "\n\t"      \
-        "sts %[wdreg],%[wdval]"             "\n\t"      \
-        :                                               \
-        : [wdreg] "M" (&WDTCSR),                        \
-          [wden]  "r" ((uint8_t)(0x18)),                \
-          [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0)))  \
-)
-
-
-//for compatibility with avr/wdt.h
-#define wdt_enable(val) WD_SET(WD_RST,val)
-#define wdt_disable()   WD_SET(WD_OFF)
-
-
-#endif /* _AVR_WD_H_ */
+/* This is from http://www.mtcnet.net/~henryvm/wdt/ */
+#ifndef _AVR_WD_H_
+#define _AVR_WD_H_
+
+#include <avr/io.h>
+
+/*
+Copyright (c) 2009, Curt Van Maanen
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+include usage-
+    #include "wd.h"             //if in same directory as project
+    #include <avr/wd.h>         //if wd.h is in avr directory
+
+set watchdog modes and prescale
+
+usage-
+    WD_SET(mode,[timeout]);     //prescale always set
+
+modes-
+    WD_OFF                      disabled
+    WD_RST                      normal reset mode
+    WD_IRQ                      interrupt only mode (if supported)
+    WD_RST_IRQ                  interrupt+reset mode (if supported)
+
+timeout-
+    WDTO_15MS                   default if no timeout provided
+    WDTO_30MS
+    WDTO_60MS
+    WDTO_120MS
+    WDTO_250MS
+    WDTO_500MS
+    WDTO_1S
+    WDTO_2S
+    WDTO_4S                     (if supported)
+    WDTO_8S                     (if supported)
+
+examples-
+    WD_SET(WD_RST,WDTO_1S);     //reset mode, 1s timeout
+    WD_SET(WD_OFF);             //watchdog disabled (if not fused on)
+    WD_SET(WD_RST);             //reset mode, 15ms (default timeout)
+    WD_SET(WD_IRQ,WDTO_120MS);  //interrupt only mode, 120ms timeout
+    WD_SET(WD_RST_IRQ,WDTO_2S); //interrupt+reset mode, 2S timeout
+
+
+for enhanced watchdogs, if the watchdog is not being used WDRF should be
+cleared on every power up or reset, along with disabling the watchdog-
+    WD_DISABLE();               //clear WDRF, then turn off watchdog
+
+*/
+
+//reset registers to the same name (MCUCSR)
+#if !defined(MCUCSR)
+#define MCUCSR                  MCUSR
+#endif
+
+//watchdog registers to the same name (WDTCSR)
+#if !defined(WDTCSR)
+#define WDTCSR                  WDTCR
+#endif
+
+//if enhanced watchdog, define irq values, create disable macro
+#if defined(WDIF)
+#define WD_IRQ                  0xC0
+#define WD_RST_IRQ              0xC8
+#define WD_DISABLE()            do{                       \
+                                    MCUCSR &= ~(1<<WDRF); \
+                                    WD_SET(WD_OFF);       \
+                                }while(0)
+#endif
+
+//all watchdogs
+#define WD_RST                  8
+#define WD_OFF                  0
+
+//prescale values
+#define WDTO_15MS               0
+#define WDTO_30MS               1
+#define WDTO_60MS               2
+#define WDTO_120MS              3
+#define WDTO_250MS              4
+#define WDTO_500MS              5
+#define WDTO_1S                 6
+#define WDTO_2S                 7
+
+//prescale values for avrs with WDP3
+#if defined(WDP3)
+#define WDTO_4S                 0x20
+#define WDTO_8S                 0x21
+#endif
+
+//watchdog reset
+#define WDR()                   __asm__ __volatile__("wdr")
+
+//avr reset using watchdog
+#define WD_AVR_RESET()          do{                              \
+                                    __asm__ __volatile__("cli"); \
+                                    WD_SET_UNSAFE(WD_RST);       \
+                                    while(1);                    \
+                                }while(0)
+
+/*set the watchdog-
+1. save SREG
+2. turn off irq's
+3. reset watchdog timer
+4. enable watchdog change
+5. write watchdog value
+6. restore SREG (restoring irq status)
+*/
+#define WD_SET(val,...)                                 \
+    __asm__ __volatile__(                               \
+        "in __tmp_reg__,__SREG__"           "\n\t"      \
+        "cli"                               "\n\t"      \
+        "wdr"                               "\n\t"      \
+        "sts %[wdreg],%[wden]"              "\n\t"      \
+        "sts %[wdreg],%[wdval]"             "\n\t"      \
+        "out __SREG__,__tmp_reg__"          "\n\t"      \
+        :                                               \
+        : [wdreg] "M" (&WDTCSR),                        \
+          [wden]  "r" ((uint8_t)(0x18)),                \
+          [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0)))  \
+        : "r0"                                          \
+)
+
+/*set the watchdog when I bit in SREG known to be clear-
+1. reset watchdog timer
+2. enable watchdog change
+5. write watchdog value
+*/
+#define WD_SET_UNSAFE(val,...)                          \
+    __asm__ __volatile__(                               \
+        "wdr"                               "\n\t"      \
+        "sts %[wdreg],%[wden]"              "\n\t"      \
+        "sts %[wdreg],%[wdval]"             "\n\t"      \
+        :                                               \
+        : [wdreg] "M" (&WDTCSR),                        \
+          [wden]  "r" ((uint8_t)(0x18)),                \
+          [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0)))  \
+)
+
+
+//for compatibility with avr/wdt.h
+#define wdt_enable(val) WD_SET(WD_RST,val)
+#define wdt_disable()   WD_SET(WD_OFF)
+
+
+#endif /* _AVR_WD_H_ */

+ 161 - 161
tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml

@@ -1,161 +1,161 @@
-<asf xmlversion="1.0">
-	<project caption="CDC Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.128_4" force-caption="true" workspace-name="lufa_cdc_128kb_4kb_">
-		<require idref="lufa.bootloaders.cdc"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="CDC Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.64_4" force-caption="true" workspace-name="lufa_cdc_64kb_4kb_">
-		<require idref="lufa.bootloaders.cdc"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb647"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="CDC Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.32_4" force-caption="true" workspace-name="lufa_cdc_32kb_4kb_">
-		<require idref="lufa.bootloaders.cdc"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega32u4"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="CDC Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.16_4" force-caption="true" workspace-name="lufa_cdc_16kb_4kb_">
-		<require idref="lufa.bootloaders.cdc"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega16u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="CDC Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.8_4" force-caption="true" workspace-name="lufa_cdc_8kb_4kb_">
-		<require idref="lufa.bootloaders.cdc"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega8u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<module type="application" id="lufa.bootloaders.cdc" caption="CDC Bootloader">
-		<info type="description" value="summary">
-		CDC Class Bootloader, capable of reprogramming a device using avrdude or other AVR109 protocol compliant software when plugged into a host.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="Bootloaders"/>
-			<keyword value="USB Device"/>
-		</info>
-
- 		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="include-path" value="."/>
-		<build type="c-source" value="BootloaderCDC.c"/>
-		<build type="header-file" value="BootloaderCDC.h"/>
-		<build type="c-source" value="Descriptors.c"/>
-		<build type="header-file" value="Descriptors.h"/>
-		<build type="c-source" value="BootloaderAPI.c"/>
-		<build type="header-file" value="BootloaderAPI.h"/>
-		<build type="asm-source" value="BootloaderAPITable.S"/>
-
-		<build type="module-config" subtype="path" value="Config"/>
-		<build type="header-file" value="Config/LUFAConfig.h"/>
-		<build type="header-file" value="Config/AppConfig.h"/>
-
-		<build type="distribute" subtype="user-file" value="doxyfile"/>
-		<build type="distribute" subtype="user-file" value="BootloaderCDC.txt"/>
-		<build type="distribute" subtype="user-file" value="LUFA CDC Bootloader.inf"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-		<require idref="lufa.drivers.board.leds"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="CDC Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.128_4" force-caption="true" workspace-name="lufa_cdc_128kb_4kb_">
+		<require idref="lufa.bootloaders.cdc"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="CDC Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.64_4" force-caption="true" workspace-name="lufa_cdc_64kb_4kb_">
+		<require idref="lufa.bootloaders.cdc"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb647"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="CDC Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.32_4" force-caption="true" workspace-name="lufa_cdc_32kb_4kb_">
+		<require idref="lufa.bootloaders.cdc"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega32u4"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="CDC Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.16_4" force-caption="true" workspace-name="lufa_cdc_16kb_4kb_">
+		<require idref="lufa.bootloaders.cdc"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega16u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="CDC Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.8_4" force-caption="true" workspace-name="lufa_cdc_8kb_4kb_">
+		<require idref="lufa.bootloaders.cdc"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega8u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<module type="application" id="lufa.bootloaders.cdc" caption="CDC Bootloader">
+		<info type="description" value="summary">
+		CDC Class Bootloader, capable of reprogramming a device using avrdude or other AVR109 protocol compliant software when plugged into a host.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="Bootloaders"/>
+			<keyword value="USB Device"/>
+		</info>
+
+ 		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="include-path" value="."/>
+		<build type="c-source" value="BootloaderCDC.c"/>
+		<build type="header-file" value="BootloaderCDC.h"/>
+		<build type="c-source" value="Descriptors.c"/>
+		<build type="header-file" value="Descriptors.h"/>
+		<build type="c-source" value="BootloaderAPI.c"/>
+		<build type="header-file" value="BootloaderAPI.h"/>
+		<build type="asm-source" value="BootloaderAPITable.S"/>
+
+		<build type="module-config" subtype="path" value="Config"/>
+		<build type="header-file" value="Config/LUFAConfig.h"/>
+		<build type="header-file" value="Config/AppConfig.h"/>
+
+		<build type="distribute" subtype="user-file" value="doxyfile"/>
+		<build type="distribute" subtype="user-file" value="BootloaderCDC.txt"/>
+		<build type="distribute" subtype="user-file" value="LUFA CDC Bootloader.inf"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+		<require idref="lufa.drivers.board.leds"/>
+	</module>
+</asf>

+ 156 - 156
tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml

@@ -1,156 +1,156 @@
-<asf xmlversion="1.0">
-	<project caption="DFU Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.128_4" force-caption="true" workspace-name="lufa_dfu_128kb_4kb_">
-		<require idref="lufa.bootloaders.dfu"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="DFU Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.64_4" force-caption="true" workspace-name="lufa_dfu_64kb_4kb_">
-		<require idref="lufa.bootloaders.dfu"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb647"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="DFU Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.32_4" force-caption="true" workspace-name="lufa_dfu_32kb_4kb_">
-		<require idref="lufa.bootloaders.dfu"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega32u4"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="DFU Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.16_4" force-caption="true" workspace-name="lufa_dfu_16kb_4kb_">
-		<require idref="lufa.bootloaders.dfu"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega16u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="DFU Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.8_4" force-caption="true" workspace-name="lufa_dfu_8kb_4kb_">
-		<require idref="lufa.bootloaders.dfu"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega8u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<module type="application" id="lufa.bootloaders.dfu" caption="DFU Bootloader">
-		<info type="description" value="summary">
-		DFU Class Bootloader, capable of reprogramming a device using the Atmel FLIP or other AVR DFU programming software when plugged into a host.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="Bootloaders"/>
-			<keyword value="USB Device"/>
-		</info>
-
- 		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="include-path" value="."/>
-		<build type="c-source" value="BootloaderDFU.c"/>
-		<build type="header-file" value="BootloaderDFU.h"/>
-		<build type="c-source" value="Descriptors.c"/>
-		<build type="header-file" value="Descriptors.h"/>
-		<build type="c-source" value="BootloaderAPI.c"/>
-		<build type="header-file" value="BootloaderAPI.h"/>
-		<build type="asm-source" value="BootloaderAPITable.S"/>
-
-		<build type="module-config" subtype="path" value="Config"/>
-		<build type="header-file" value="Config/LUFAConfig.h"/>
-		<build type="header-file" value="Config/AppConfig.h"/>
-
-		<build type="distribute" subtype="user-file" value="doxyfile"/>
-		<build type="distribute" subtype="user-file" value="BootloaderDFU.txt"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-		<require idref="lufa.drivers.board.leds"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="DFU Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.128_4" force-caption="true" workspace-name="lufa_dfu_128kb_4kb_">
+		<require idref="lufa.bootloaders.dfu"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="DFU Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.64_4" force-caption="true" workspace-name="lufa_dfu_64kb_4kb_">
+		<require idref="lufa.bootloaders.dfu"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb647"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="DFU Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.32_4" force-caption="true" workspace-name="lufa_dfu_32kb_4kb_">
+		<require idref="lufa.bootloaders.dfu"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega32u4"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="DFU Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.16_4" force-caption="true" workspace-name="lufa_dfu_16kb_4kb_">
+		<require idref="lufa.bootloaders.dfu"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega16u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="DFU Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.8_4" force-caption="true" workspace-name="lufa_dfu_8kb_4kb_">
+		<require idref="lufa.bootloaders.dfu"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega8u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<module type="application" id="lufa.bootloaders.dfu" caption="DFU Bootloader">
+		<info type="description" value="summary">
+		DFU Class Bootloader, capable of reprogramming a device using the Atmel FLIP or other AVR DFU programming software when plugged into a host.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="Bootloaders"/>
+			<keyword value="USB Device"/>
+		</info>
+
+ 		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="include-path" value="."/>
+		<build type="c-source" value="BootloaderDFU.c"/>
+		<build type="header-file" value="BootloaderDFU.h"/>
+		<build type="c-source" value="Descriptors.c"/>
+		<build type="header-file" value="Descriptors.h"/>
+		<build type="c-source" value="BootloaderAPI.c"/>
+		<build type="header-file" value="BootloaderAPI.h"/>
+		<build type="asm-source" value="BootloaderAPITable.S"/>
+
+		<build type="module-config" subtype="path" value="Config"/>
+		<build type="header-file" value="Config/LUFAConfig.h"/>
+		<build type="header-file" value="Config/AppConfig.h"/>
+
+		<build type="distribute" subtype="user-file" value="doxyfile"/>
+		<build type="distribute" subtype="user-file" value="BootloaderDFU.txt"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+		<require idref="lufa.drivers.board.leds"/>
+	</module>
+</asf>

+ 123 - 123
tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml

@@ -1,123 +1,123 @@
-<asf xmlversion="1.0">
-	<project caption="HID Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.128_4" force-caption="true" workspace-name="lufa_hid_128kb_4kb_">
-		<require idref="lufa.bootloaders.hid"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
-	</project>
-
-	<project caption="HID Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.64_4" force-caption="true" workspace-name="lufa_hid_64kb_4kb_">
-		<require idref="lufa.bootloaders.hid"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb647"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
-	</project>
-
-	<project caption="HID Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.32_4" force-caption="true" workspace-name="lufa_hid_32kb_4kb_">
-		<require idref="lufa.bootloaders.hid"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega32u4"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
-	</project>
-
-	<project caption="HID Bootloader - 16KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.16_2" force-caption="true" workspace-name="lufa_hid_16kb_2kb_">
-		<require idref="lufa.bootloaders.hid"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega16u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x3800"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/>
-	</project>
-
-	<project caption="HID Bootloader - 8KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.8_2" force-caption="true" workspace-name="lufa_hid_8kb_2kb_">
-		<require idref="lufa.bootloaders.hid"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega8u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1800"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/>
-	</project>
-
-	<module type="application" id="lufa.bootloaders.hid" caption="HID Bootloader">
-		<info type="description" value="summary">
-		HID Class Bootloader, capable of reprogramming a device via a custom cross-platform command line utility when plugged into a host.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="Bootloaders"/>
-			<keyword value="USB Device"/>
-		</info>
-
-		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="include-path" value="."/>
-		<build type="c-source" value="BootloaderHID.c"/>
-		<build type="header-file" value="BootloaderHID.h"/>
-		<build type="c-source" value="Descriptors.c"/>
-		<build type="header-file" value="Descriptors.h"/>
-
-		<build type="module-config" subtype="path" value="Config"/>
-		<build type="header-file" value="Config/LUFAConfig.h"/>
-
-		<build type="distribute" subtype="user-file" value="doxyfile"/>
-		<build type="distribute" subtype="user-file" value="BootloaderHID.txt"/>
-		<build type="distribute" subtype="directory" value="HostLoaderApp"/>
-		<build type="distribute" subtype="directory" value="HostLoaderApp_Python"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-		<require idref="lufa.drivers.board.leds"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="HID Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.128_4" force-caption="true" workspace-name="lufa_hid_128kb_4kb_">
+		<require idref="lufa.bootloaders.hid"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
+	</project>
+
+	<project caption="HID Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.64_4" force-caption="true" workspace-name="lufa_hid_64kb_4kb_">
+		<require idref="lufa.bootloaders.hid"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb647"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
+	</project>
+
+	<project caption="HID Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.32_4" force-caption="true" workspace-name="lufa_hid_32kb_4kb_">
+		<require idref="lufa.bootloaders.hid"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega32u4"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
+	</project>
+
+	<project caption="HID Bootloader - 16KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.16_2" force-caption="true" workspace-name="lufa_hid_16kb_2kb_">
+		<require idref="lufa.bootloaders.hid"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega16u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x3800"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/>
+	</project>
+
+	<project caption="HID Bootloader - 8KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.8_2" force-caption="true" workspace-name="lufa_hid_8kb_2kb_">
+		<require idref="lufa.bootloaders.hid"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega8u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1800"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/>
+	</project>
+
+	<module type="application" id="lufa.bootloaders.hid" caption="HID Bootloader">
+		<info type="description" value="summary">
+		HID Class Bootloader, capable of reprogramming a device via a custom cross-platform command line utility when plugged into a host.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="Bootloaders"/>
+			<keyword value="USB Device"/>
+		</info>
+
+		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="include-path" value="."/>
+		<build type="c-source" value="BootloaderHID.c"/>
+		<build type="header-file" value="BootloaderHID.h"/>
+		<build type="c-source" value="Descriptors.c"/>
+		<build type="header-file" value="Descriptors.h"/>
+
+		<build type="module-config" subtype="path" value="Config"/>
+		<build type="header-file" value="Config/LUFAConfig.h"/>
+
+		<build type="distribute" subtype="user-file" value="doxyfile"/>
+		<build type="distribute" subtype="user-file" value="BootloaderHID.txt"/>
+		<build type="distribute" subtype="directory" value="HostLoaderApp"/>
+		<build type="distribute" subtype="directory" value="HostLoaderApp_Python"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+		<require idref="lufa.drivers.board.leds"/>
+	</module>
+</asf>

+ 102 - 102
tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S

@@ -1,102 +1,102 @@
-/*
-             LUFA Library
-     Copyright (C) Dean Camera, 2014.
-
-  dean [at] fourwalledcubicle [dot] com
-           www.lufa-lib.org
-*/
-
-/*
-  Copyright 2014  Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
-  Permission to use, copy, modify, distribute, and sell this
-  software and its documentation for any purpose is hereby granted
-  without fee, provided that the above copyright notice appear in
-  all copies and that both that the copyright notice and this
-  permission notice and warranty disclaimer appear in supporting
-  documentation, and that the name of the author not be used in
-  advertising or publicity pertaining to distribution of the
-  software without specific, written prior permission.
-
-  The author disclaims all warranties with regard to this
-  software, including all implied warranties of merchantability
-  and fitness.  In no event shall the author be liable for any
-  special, indirect or consequential damages or any damages
-  whatsoever resulting from loss of use, data or profits, whether
-  in an action of contract, negligence or other tortious action,
-  arising out of or in connection with the use or performance of
-  this software.
-*/
-
-#if AUX_BOOT_SECTION_SIZE > 0
-#warning Using a AUX bootloader section in addition to the defined bootloader space (see documentation).
-
-; Trampoline to jump over the AUX bootloader section to the start of the bootloader,
-; on devices where an AUX bootloader section is used.
-.section .boot_aux_trampoline, "ax"
-.global Boot_AUX_Trampoline
-Boot_AUX_Trampoline:
-	jmp BOOT_START_ADDR
-#endif
-
-; Trampolines to actual API implementations if the target address is outside the
-; range of a rjmp instruction (can happen with large bootloader sections)
-.section .apitable_trampolines, "ax"
-.global BootloaderAPI_Trampolines
-BootloaderAPI_Trampolines:
-
-	BootloaderAPI_ErasePage_Trampoline:
-		jmp BootloaderAPI_ErasePage
-	BootloaderAPI_WritePage_Trampoline:
-		jmp BootloaderAPI_WritePage
-	BootloaderAPI_FillWord_Trampoline:
-		jmp BootloaderAPI_FillWord
-	BootloaderAPI_ReadSignature_Trampoline:
-		jmp BootloaderAPI_ReadSignature
-	BootloaderAPI_ReadFuse_Trampoline:
-		jmp BootloaderAPI_ReadFuse
-	BootloaderAPI_ReadLock_Trampoline:
-		jmp BootloaderAPI_ReadLock
-	BootloaderAPI_WriteLock_Trampoline:
-		jmp BootloaderAPI_WriteLock
-	BootloaderAPI_UNUSED1:
-		ret
-	BootloaderAPI_UNUSED2:
-		ret
-	BootloaderAPI_UNUSED3:
-		ret
-	BootloaderAPI_UNUSED4:
-		ret
-	BootloaderAPI_UNUSED5:
-		ret
-
-
-
-; API function jump table
-.section .apitable_jumptable, "ax"
-.global BootloaderAPI_JumpTable
-BootloaderAPI_JumpTable:
-
-	rjmp BootloaderAPI_ErasePage_Trampoline
-	rjmp BootloaderAPI_WritePage_Trampoline
-	rjmp BootloaderAPI_FillWord_Trampoline
-	rjmp BootloaderAPI_ReadSignature_Trampoline
-	rjmp BootloaderAPI_ReadFuse_Trampoline
-	rjmp BootloaderAPI_ReadLock_Trampoline
-	rjmp BootloaderAPI_WriteLock_Trampoline
-	rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1
-	rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2
-	rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3
-	rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4
-	rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5
-
-
-
-; Bootloader table signatures and information
-.section .apitable_signatures, "ax"
-.global BootloaderAPI_Signatures
-BootloaderAPI_Signatures:
-
-	.long BOOT_START_ADDR ; Start address of the bootloader
-	.word 0xDF30 ; Signature for the MS class bootloader, V1
-	.word 0xDCFB ; Signature for a LUFA class bootloader
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2014.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2014  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaims all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+#if AUX_BOOT_SECTION_SIZE > 0
+#warning Using a AUX bootloader section in addition to the defined bootloader space (see documentation).
+
+; Trampoline to jump over the AUX bootloader section to the start of the bootloader,
+; on devices where an AUX bootloader section is used.
+.section .boot_aux_trampoline, "ax"
+.global Boot_AUX_Trampoline
+Boot_AUX_Trampoline:
+	jmp BOOT_START_ADDR
+#endif
+
+; Trampolines to actual API implementations if the target address is outside the
+; range of a rjmp instruction (can happen with large bootloader sections)
+.section .apitable_trampolines, "ax"
+.global BootloaderAPI_Trampolines
+BootloaderAPI_Trampolines:
+
+	BootloaderAPI_ErasePage_Trampoline:
+		jmp BootloaderAPI_ErasePage
+	BootloaderAPI_WritePage_Trampoline:
+		jmp BootloaderAPI_WritePage
+	BootloaderAPI_FillWord_Trampoline:
+		jmp BootloaderAPI_FillWord
+	BootloaderAPI_ReadSignature_Trampoline:
+		jmp BootloaderAPI_ReadSignature
+	BootloaderAPI_ReadFuse_Trampoline:
+		jmp BootloaderAPI_ReadFuse
+	BootloaderAPI_ReadLock_Trampoline:
+		jmp BootloaderAPI_ReadLock
+	BootloaderAPI_WriteLock_Trampoline:
+		jmp BootloaderAPI_WriteLock
+	BootloaderAPI_UNUSED1:
+		ret
+	BootloaderAPI_UNUSED2:
+		ret
+	BootloaderAPI_UNUSED3:
+		ret
+	BootloaderAPI_UNUSED4:
+		ret
+	BootloaderAPI_UNUSED5:
+		ret
+
+
+
+; API function jump table
+.section .apitable_jumptable, "ax"
+.global BootloaderAPI_JumpTable
+BootloaderAPI_JumpTable:
+
+	rjmp BootloaderAPI_ErasePage_Trampoline
+	rjmp BootloaderAPI_WritePage_Trampoline
+	rjmp BootloaderAPI_FillWord_Trampoline
+	rjmp BootloaderAPI_ReadSignature_Trampoline
+	rjmp BootloaderAPI_ReadFuse_Trampoline
+	rjmp BootloaderAPI_ReadLock_Trampoline
+	rjmp BootloaderAPI_WriteLock_Trampoline
+	rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1
+	rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2
+	rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3
+	rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4
+	rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5
+
+
+
+; Bootloader table signatures and information
+.section .apitable_signatures, "ax"
+.global BootloaderAPI_Signatures
+BootloaderAPI_Signatures:
+
+	.long BOOT_START_ADDR ; Start address of the bootloader
+	.word 0xDF30 ; Signature for the MS class bootloader, V1
+	.word 0xDCFB ; Signature for a LUFA class bootloader

+ 156 - 156
tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml

@@ -1,156 +1,156 @@
-<asf xmlversion="1.0">
-	<project caption="Mass Storage Bootloader - 128KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.128_8" force-caption="true" workspace-name="lufa_ms_128kb_8kb_">
-		<require idref="lufa.bootloaders.mass_storage"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1E000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1E000"/>
-
-		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Mass Storage Bootloader - 64KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.64_8" force-caption="true" workspace-name="lufa_ms_64kb_8kb_">
-		<require idref="lufa.bootloaders.mass_storage"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb647"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0xE000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0xE000"/>
-
-		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Mass Storage Bootloader - 32KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.32_4" force-caption="true" workspace-name="lufa_ms_32kb_4kb_">
-		<require idref="lufa.bootloaders.mass_storage"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega32u4"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
-
-		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x6810"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x6800"/>
-		<build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Mass Storage Bootloader - 16KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.16_4" force-caption="true" workspace-name="lufa_ms_16kb_4kb_">
-		<require idref="lufa.bootloaders.mass_storage"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega16u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
-
-		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x2810"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x2800"/>
-		<build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<module type="application" id="lufa.bootloaders.mass_storage" caption="Mass Storage Bootloader">
-		<info type="description" value="summary">
-		Mass Storage Class Bootloader, capable of reprogramming a device via binary BIN files copied to the virtual FAT12 file-system it creates when plugged into a host.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="Bootloaders"/>
-			<keyword value="USB Device"/>
-		</info>
-
-		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="include-path" value="."/>
-		<build type="c-source" value="BootloaderMassStorage.c"/>
-		<build type="header-file" value="BootloaderMassStorage.h"/>
-		<build type="c-source" value="Descriptors.c"/>
-		<build type="header-file" value="Descriptors.h"/>
-		<build type="c-source" value="BootloaderAPI.c"/>
-		<build type="header-file" value="BootloaderAPI.h"/>
-		<build type="asm-source" value="BootloaderAPITable.S"/>
-
-		<build type="module-config" subtype="path" value="Config"/>
-		<build type="header-file" value="Config/LUFAConfig.h"/>
-		<build type="header-file" value="Config/AppConfig.h"/>
-
-		<build type="include-path" value="Lib"/>
-		<build type="header-file" value="Lib/VirtualFAT.h"/>
-		<build type="c-source" value="Lib/VirtualFAT.c"/>
-		<build type="header-file" value="Lib/SCSI.h"/>
-		<build type="c-source" value="Lib/SCSI.c"/>
-
-		<build type="distribute" subtype="user-file" value="doxyfile"/>
-		<build type="distribute" subtype="user-file" value="BootloaderMassStorage.txt"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-		<require idref="lufa.drivers.board.leds"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="Mass Storage Bootloader - 128KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.128_8" force-caption="true" workspace-name="lufa_ms_128kb_8kb_">
+		<require idref="lufa.bootloaders.mass_storage"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1E000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1E000"/>
+
+		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Mass Storage Bootloader - 64KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.64_8" force-caption="true" workspace-name="lufa_ms_64kb_8kb_">
+		<require idref="lufa.bootloaders.mass_storage"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb647"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0xE000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0xE000"/>
+
+		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Mass Storage Bootloader - 32KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.32_4" force-caption="true" workspace-name="lufa_ms_32kb_4kb_">
+		<require idref="lufa.bootloaders.mass_storage"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega32u4"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
+
+		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x6810"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x6800"/>
+		<build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Mass Storage Bootloader - 16KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.16_4" force-caption="true" workspace-name="lufa_ms_16kb_4kb_">
+		<require idref="lufa.bootloaders.mass_storage"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega16u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
+
+		<build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x2810"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x2800"/>
+		<build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<module type="application" id="lufa.bootloaders.mass_storage" caption="Mass Storage Bootloader">
+		<info type="description" value="summary">
+		Mass Storage Class Bootloader, capable of reprogramming a device via binary BIN files copied to the virtual FAT12 file-system it creates when plugged into a host.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="Bootloaders"/>
+			<keyword value="USB Device"/>
+		</info>
+
+		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="include-path" value="."/>
+		<build type="c-source" value="BootloaderMassStorage.c"/>
+		<build type="header-file" value="BootloaderMassStorage.h"/>
+		<build type="c-source" value="Descriptors.c"/>
+		<build type="header-file" value="Descriptors.h"/>
+		<build type="c-source" value="BootloaderAPI.c"/>
+		<build type="header-file" value="BootloaderAPI.h"/>
+		<build type="asm-source" value="BootloaderAPITable.S"/>
+
+		<build type="module-config" subtype="path" value="Config"/>
+		<build type="header-file" value="Config/LUFAConfig.h"/>
+		<build type="header-file" value="Config/AppConfig.h"/>
+
+		<build type="include-path" value="Lib"/>
+		<build type="header-file" value="Lib/VirtualFAT.h"/>
+		<build type="c-source" value="Lib/VirtualFAT.c"/>
+		<build type="header-file" value="Lib/SCSI.h"/>
+		<build type="c-source" value="Lib/SCSI.c"/>
+
+		<build type="distribute" subtype="user-file" value="doxyfile"/>
+		<build type="distribute" subtype="user-file" value="BootloaderMassStorage.txt"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+		<require idref="lufa.drivers.board.leds"/>
+	</module>
+</asf>

+ 68 - 68
tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile

@@ -1,68 +1,68 @@
-#
-#             LUFA Library
-#     Copyright (C) Dean Camera, 2014.
-#
-#  dean [at] fourwalledcubicle [dot] com
-#           www.lufa-lib.org
-#
-# --------------------------------------
-#         LUFA Project Makefile.
-# --------------------------------------
-
-# Run "make help" for target help.
-
-MCU          = at90usb1287
-ARCH         = AVR8
-BOARD        = USBKEY
-F_CPU        = 8000000
-F_USB        = $(F_CPU)
-OPTIMIZATION = s
-TARGET       = BootloaderMassStorage
-SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
-LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
-
-# Flash size and bootloader section sizes of the target, in KB. These must
-# match the target's total FLASH size and the bootloader size set in the
-# device's fuses.
-FLASH_SIZE_KB         = 128
-BOOT_SECTION_SIZE_KB  = 8
-
-# Bootloader address calculation formulas
-# Do not modify these macros, but rather modify the dependent values above.
-CALC_ADDRESS_IN_HEX   = $(shell printf "0x%X" $$(( $(1) )) )
-BOOT_START_OFFSET     = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )
-BOOT_SEC_OFFSET       = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) )
-
-# Bootloader linker section flags for relocating the API table sections to
-# known FLASH addresses - these should not normally be user-edited.
-BOOT_SECTION_LD_FLAG  = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2))
-BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96)
-BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable,   BootloaderAPI_JumpTable,   32)
-BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  BootloaderAPI_Signatures,  8)
-
-# Check if the bootloader needs an AUX section, located before the real bootloader section to store some of the
-# bootloader code. This is required for 32KB and smaller devices, where the actual bootloader is 6KB but the maximum
-# bootloader section size is 4KB. The actual usable application space will be reduced by 6KB for these devices.
-ifeq ($(BOOT_SECTION_SIZE_KB),8)
-  CC_FLAGS           += -DAUX_BOOT_SECTION_SIZE=0
-else
-  AUX_BOOT_SECTION_SIZE_KB = (6 - $(BOOT_SECTION_SIZE_KB))
-
-  CC_FLAGS           += -DAUX_BOOT_SECTION_SIZE='($(AUX_BOOT_SECTION_SIZE_KB) * 1024)'
-  LD_FLAGS           += -Wl,--section-start=.boot_aux=$(call BOOT_SEC_OFFSET, (($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024 - 16))
-  LD_FLAGS           += $(call BOOT_SECTION_LD_FLAG, .boot_aux_trampoline, Boot_AUX_Trampoline, ($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024)
-endif
-
-# Default target
-all:
-
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2014.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+# Run "make help" for target help.
+
+MCU          = at90usb1287
+ARCH         = AVR8
+BOARD        = USBKEY
+F_CPU        = 8000000
+F_USB        = $(F_CPU)
+OPTIMIZATION = s
+TARGET       = BootloaderMassStorage
+SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
+LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
+
+# Flash size and bootloader section sizes of the target, in KB. These must
+# match the target's total FLASH size and the bootloader size set in the
+# device's fuses.
+FLASH_SIZE_KB         = 128
+BOOT_SECTION_SIZE_KB  = 8
+
+# Bootloader address calculation formulas
+# Do not modify these macros, but rather modify the dependent values above.
+CALC_ADDRESS_IN_HEX   = $(shell printf "0x%X" $$(( $(1) )) )
+BOOT_START_OFFSET     = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )
+BOOT_SEC_OFFSET       = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) )
+
+# Bootloader linker section flags for relocating the API table sections to
+# known FLASH addresses - these should not normally be user-edited.
+BOOT_SECTION_LD_FLAG  = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2))
+BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable,   BootloaderAPI_JumpTable,   32)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  BootloaderAPI_Signatures,  8)
+
+# Check if the bootloader needs an AUX section, located before the real bootloader section to store some of the
+# bootloader code. This is required for 32KB and smaller devices, where the actual bootloader is 6KB but the maximum
+# bootloader section size is 4KB. The actual usable application space will be reduced by 6KB for these devices.
+ifeq ($(BOOT_SECTION_SIZE_KB),8)
+  CC_FLAGS           += -DAUX_BOOT_SECTION_SIZE=0
+else
+  AUX_BOOT_SECTION_SIZE_KB = (6 - $(BOOT_SECTION_SIZE_KB))
+
+  CC_FLAGS           += -DAUX_BOOT_SECTION_SIZE='($(AUX_BOOT_SECTION_SIZE_KB) * 1024)'
+  LD_FLAGS           += -Wl,--section-start=.boot_aux=$(call BOOT_SEC_OFFSET, (($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024 - 16))
+  LD_FLAGS           += $(call BOOT_SECTION_LD_FLAG, .boot_aux_trampoline, Boot_AUX_Trampoline, ($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024)
+endif
+
+# Default target
+all:
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk

+ 91 - 91
tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S

@@ -1,91 +1,91 @@
-/*
-             LUFA Library
-     Copyright (C) Dean Camera, 2014.
-
-  dean [at] fourwalledcubicle [dot] com
-           www.lufa-lib.org
-*/
-
-/*
-  Copyright 2014  Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
-  Permission to use, copy, modify, distribute, and sell this
-  software and its documentation for any purpose is hereby granted
-  without fee, provided that the above copyright notice appear in
-  all copies and that both that the copyright notice and this
-  permission notice and warranty disclaimer appear in supporting
-  documentation, and that the name of the author not be used in
-  advertising or publicity pertaining to distribution of the
-  software without specific, written prior permission.
-
-  The author disclaims all warranties with regard to this
-  software, including all implied warranties of merchantability
-  and fitness.  In no event shall the author be liable for any
-  special, indirect or consequential damages or any damages
-  whatsoever resulting from loss of use, data or profits, whether
-  in an action of contract, negligence or other tortious action,
-  arising out of or in connection with the use or performance of
-  this software.
-*/
-
-; Trampolines to actual API implementations if the target address is outside the
-; range of a rjmp instruction (can happen with large bootloader sections)
-.section .apitable_trampolines, "ax"
-.global BootloaderAPI_Trampolines
-BootloaderAPI_Trampolines:
-
-	BootloaderAPI_ErasePage_Trampoline:
-		jmp BootloaderAPI_ErasePage
-	BootloaderAPI_WritePage_Trampoline:
-		jmp BootloaderAPI_WritePage
-	BootloaderAPI_FillWord_Trampoline:
-		jmp BootloaderAPI_FillWord
-	BootloaderAPI_ReadSignature_Trampoline:
-		jmp BootloaderAPI_ReadSignature
-	BootloaderAPI_ReadFuse_Trampoline:
-		jmp BootloaderAPI_ReadFuse
-	BootloaderAPI_ReadLock_Trampoline:
-		jmp BootloaderAPI_ReadLock
-	BootloaderAPI_WriteLock_Trampoline:
-		jmp BootloaderAPI_WriteLock
-	BootloaderAPI_UNUSED1:
-		ret
-	BootloaderAPI_UNUSED2:
-		ret
-	BootloaderAPI_UNUSED3:
-		ret
-	BootloaderAPI_UNUSED4:
-		ret
-	BootloaderAPI_UNUSED5:
-		ret
-
-
-
-; API function jump table
-.section .apitable_jumptable, "ax"
-.global BootloaderAPI_JumpTable
-BootloaderAPI_JumpTable:
-
-	rjmp BootloaderAPI_ErasePage_Trampoline
-	rjmp BootloaderAPI_WritePage_Trampoline
-	rjmp BootloaderAPI_FillWord_Trampoline
-	rjmp BootloaderAPI_ReadSignature_Trampoline
-	rjmp BootloaderAPI_ReadFuse_Trampoline
-	rjmp BootloaderAPI_ReadLock_Trampoline
-	rjmp BootloaderAPI_WriteLock_Trampoline
-	rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1
-	rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2
-	rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3
-	rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4
-	rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5
-
-
-
-; Bootloader table signatures and information
-.section .apitable_signatures, "ax"
-.global BootloaderAPI_Signatures
-BootloaderAPI_Signatures:
-
-	.long BOOT_START_ADDR ; Start address of the bootloader
-	.word 0xDF20 ; Signature for the Printer class bootloader
-	.word 0xDCFB ; Signature for a LUFA class bootloader
+/*
+             LUFA Library
+     Copyright (C) Dean Camera, 2014.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+*/
+
+/*
+  Copyright 2014  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+  Permission to use, copy, modify, distribute, and sell this
+  software and its documentation for any purpose is hereby granted
+  without fee, provided that the above copyright notice appear in
+  all copies and that both that the copyright notice and this
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+
+  The author disclaims all warranties with regard to this
+  software, including all implied warranties of merchantability
+  and fitness.  In no event shall the author be liable for any
+  special, indirect or consequential damages or any damages
+  whatsoever resulting from loss of use, data or profits, whether
+  in an action of contract, negligence or other tortious action,
+  arising out of or in connection with the use or performance of
+  this software.
+*/
+
+; Trampolines to actual API implementations if the target address is outside the
+; range of a rjmp instruction (can happen with large bootloader sections)
+.section .apitable_trampolines, "ax"
+.global BootloaderAPI_Trampolines
+BootloaderAPI_Trampolines:
+
+	BootloaderAPI_ErasePage_Trampoline:
+		jmp BootloaderAPI_ErasePage
+	BootloaderAPI_WritePage_Trampoline:
+		jmp BootloaderAPI_WritePage
+	BootloaderAPI_FillWord_Trampoline:
+		jmp BootloaderAPI_FillWord
+	BootloaderAPI_ReadSignature_Trampoline:
+		jmp BootloaderAPI_ReadSignature
+	BootloaderAPI_ReadFuse_Trampoline:
+		jmp BootloaderAPI_ReadFuse
+	BootloaderAPI_ReadLock_Trampoline:
+		jmp BootloaderAPI_ReadLock
+	BootloaderAPI_WriteLock_Trampoline:
+		jmp BootloaderAPI_WriteLock
+	BootloaderAPI_UNUSED1:
+		ret
+	BootloaderAPI_UNUSED2:
+		ret
+	BootloaderAPI_UNUSED3:
+		ret
+	BootloaderAPI_UNUSED4:
+		ret
+	BootloaderAPI_UNUSED5:
+		ret
+
+
+
+; API function jump table
+.section .apitable_jumptable, "ax"
+.global BootloaderAPI_JumpTable
+BootloaderAPI_JumpTable:
+
+	rjmp BootloaderAPI_ErasePage_Trampoline
+	rjmp BootloaderAPI_WritePage_Trampoline
+	rjmp BootloaderAPI_FillWord_Trampoline
+	rjmp BootloaderAPI_ReadSignature_Trampoline
+	rjmp BootloaderAPI_ReadFuse_Trampoline
+	rjmp BootloaderAPI_ReadLock_Trampoline
+	rjmp BootloaderAPI_WriteLock_Trampoline
+	rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1
+	rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2
+	rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3
+	rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4
+	rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5
+
+
+
+; Bootloader table signatures and information
+.section .apitable_signatures, "ax"
+.global BootloaderAPI_Signatures
+BootloaderAPI_Signatures:
+
+	.long BOOT_START_ADDR ; Start address of the bootloader
+	.word 0xDF20 ; Signature for the Printer class bootloader
+	.word 0xDCFB ; Signature for a LUFA class bootloader

+ 159 - 159
tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml

@@ -1,159 +1,159 @@
-<asf xmlversion="1.0">
-	<project caption="Printer Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.128_4" force-caption="true" workspace-name="lufa_printer_128kb_4kb_">
-		<require idref="lufa.bootloaders.printer"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Printer Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.64_4" force-caption="true" workspace-name="lufa_printer_64kb_4kb_">
-		<require idref="lufa.bootloaders.printer"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="at90usb647"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Printer Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.32_4" force-caption="true" workspace-name="lufa_printer_32kb_4kb_">
-		<require idref="lufa.bootloaders.printer"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega32u4"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Printer Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.16_4" force-caption="true" workspace-name="lufa_printer_16kb_4kb_">
-		<require idref="lufa.bootloaders.printer"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega16u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<project caption="Printer Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.8_4" force-caption="true" workspace-name="lufa_printer_8kb_4kb_">
-		<require idref="lufa.bootloaders.printer"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8"/>
-
-		<device-support value="atmega8u2"/>
-		<config name="lufa.drivers.board.name" value="none"/>
-
-		<config name="config.compiler.optimization.level" value="size"/>
-
-		<build type="define" name="F_CPU" value="16000000UL"/>
-		<build type="define" name="F_USB" value="16000000UL"/>
-
-		<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
-
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
-		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/>
-		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
-	</project>
-
-	<module type="application" id="lufa.bootloaders.printer" caption="Printer Bootloader">
-		<info type="description" value="summary">
-		Printer Class Bootloader, capable of reprogramming a device by "printing" new HEX files to the virtual Plain-Text printer it creates when plugged into a host.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="Bootloaders"/>
-			<keyword value="USB Device"/>
-		</info>
-
-		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="include-path" value="."/>
-		<build type="c-source" value="BootloaderPrinter.c"/>
-		<build type="header-file" value="BootloaderPrinter.h"/>
-		<build type="c-source" value="Descriptors.c"/>
-		<build type="header-file" value="Descriptors.h"/>
-		<build type="c-source" value="BootloaderAPI.c"/>
-		<build type="header-file" value="BootloaderAPI.h"/>
-		<build type="asm-source" value="BootloaderAPITable.S"/>
-
-		<build type="module-config" subtype="path" value="Config"/>
-		<build type="header-file" value="Config/LUFAConfig.h"/>
-
-		<build type="distribute" subtype="user-file" value="doxyfile"/>
-		<build type="distribute" subtype="user-file" value="BootloaderPrinter.txt"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-		<require idref="lufa.drivers.board.leds"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="Printer Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.128_4" force-caption="true" workspace-name="lufa_printer_128kb_4kb_">
+		<require idref="lufa.bootloaders.printer"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Printer Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.64_4" force-caption="true" workspace-name="lufa_printer_64kb_4kb_">
+		<require idref="lufa.bootloaders.printer"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="at90usb647"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Printer Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.32_4" force-caption="true" workspace-name="lufa_printer_32kb_4kb_">
+		<require idref="lufa.bootloaders.printer"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega32u4"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Printer Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.16_4" force-caption="true" workspace-name="lufa_printer_16kb_4kb_">
+		<require idref="lufa.bootloaders.printer"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega16u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<project caption="Printer Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.8_4" force-caption="true" workspace-name="lufa_printer_8kb_4kb_">
+		<require idref="lufa.bootloaders.printer"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8"/>
+
+		<device-support value="atmega8u2"/>
+		<config name="lufa.drivers.board.name" value="none"/>
+
+		<config name="config.compiler.optimization.level" value="size"/>
+
+		<build type="define" name="F_CPU" value="16000000UL"/>
+		<build type="define" name="F_USB" value="16000000UL"/>
+
+		<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
+
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/>
+		<build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/>
+		<build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/>
+	</project>
+
+	<module type="application" id="lufa.bootloaders.printer" caption="Printer Bootloader">
+		<info type="description" value="summary">
+		Printer Class Bootloader, capable of reprogramming a device by "printing" new HEX files to the virtual Plain-Text printer it creates when plugged into a host.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="Bootloaders"/>
+			<keyword value="USB Device"/>
+		</info>
+
+		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="include-path" value="."/>
+		<build type="c-source" value="BootloaderPrinter.c"/>
+		<build type="header-file" value="BootloaderPrinter.h"/>
+		<build type="c-source" value="Descriptors.c"/>
+		<build type="header-file" value="Descriptors.h"/>
+		<build type="c-source" value="BootloaderAPI.c"/>
+		<build type="header-file" value="BootloaderAPI.h"/>
+		<build type="asm-source" value="BootloaderAPITable.S"/>
+
+		<build type="module-config" subtype="path" value="Config"/>
+		<build type="header-file" value="Config/LUFAConfig.h"/>
+
+		<build type="distribute" subtype="user-file" value="doxyfile"/>
+		<build type="distribute" subtype="user-file" value="BootloaderPrinter.txt"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+		<require idref="lufa.drivers.board.leds"/>
+	</module>
+</asf>

+ 55 - 55
tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile

@@ -1,55 +1,55 @@
-#
-#             LUFA Library
-#     Copyright (C) Dean Camera, 2014.
-#
-#  dean [at] fourwalledcubicle [dot] com
-#           www.lufa-lib.org
-#
-# --------------------------------------
-#         LUFA Project Makefile.
-# --------------------------------------
-
-# Run "make help" for target help.
-
-MCU          = at90usb1287
-ARCH         = AVR8
-BOARD        = USBKEY
-F_CPU        = 8000000
-F_USB        = $(F_CPU)
-OPTIMIZATION = s
-TARGET       = BootloaderPrinter
-SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
-LUFA_PATH    = ../../LUFA
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
-LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
-
-# Flash size and bootloader section sizes of the target, in KB. These must
-# match the target's total FLASH size and the bootloader size set in the
-# device's fuses.
-FLASH_SIZE_KB         = 128
-BOOT_SECTION_SIZE_KB  = 8
-
-# Bootloader address calculation formulas
-# Do not modify these macros, but rather modify the dependent values above.
-CALC_ADDRESS_IN_HEX   = $(shell printf "0x%X" $$(( $(1) )) )
-BOOT_START_OFFSET     = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )
-BOOT_SEC_OFFSET       = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) )
-
-# Bootloader linker section flags for relocating the API table sections to
-# known FLASH addresses - these should not normally be user-edited.
-BOOT_SECTION_LD_FLAG  = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2))
-BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96)
-BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable,   BootloaderAPI_JumpTable,   32)
-BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  BootloaderAPI_Signatures,  8)
-
-# Default target
-all:
-
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2014.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+# Run "make help" for target help.
+
+MCU          = at90usb1287
+ARCH         = AVR8
+BOARD        = USBKEY
+F_CPU        = 8000000
+F_USB        = $(F_CPU)
+OPTIMIZATION = s
+TARGET       = BootloaderPrinter
+SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
+LUFA_PATH    = ../../LUFA
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
+LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
+
+# Flash size and bootloader section sizes of the target, in KB. These must
+# match the target's total FLASH size and the bootloader size set in the
+# device's fuses.
+FLASH_SIZE_KB         = 128
+BOOT_SECTION_SIZE_KB  = 8
+
+# Bootloader address calculation formulas
+# Do not modify these macros, but rather modify the dependent values above.
+CALC_ADDRESS_IN_HEX   = $(shell printf "0x%X" $$(( $(1) )) )
+BOOT_START_OFFSET     = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )
+BOOT_SEC_OFFSET       = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) )
+
+# Bootloader linker section flags for relocating the API table sections to
+# known FLASH addresses - these should not normally be user-edited.
+BOOT_SECTION_LD_FLAG  = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2))
+BOOT_API_LD_FLAGS     = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable,   BootloaderAPI_JumpTable,   32)
+BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  BootloaderAPI_Signatures,  8)
+
+# Default target
+all:
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk

+ 42 - 42
tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile

@@ -1,42 +1,42 @@
-#
-#             LUFA Library
-#     Copyright (C) Dean Camera, 2014.
-#
-#  dean [at] fourwalledcubicle [dot] com
-#           www.lufa-lib.org
-#
-# --------------------------------------
-#         LUFA Project Makefile.
-# --------------------------------------
-
-# Run "make help" for target help.
-
-MCU          = at90usb1287
-ARCH         = AVR8
-F_CPU        = 1000000
-F_USB        = $(F_CPU)
-OPTIMIZATION = s
-TARGET       = HID_EEPROM_Loader
-SRC          = $(TARGET).c
-LUFA_PATH    = ../../../LUFA
-CC_FLAGS     =
-LD_FLAGS     =
-OBJECT_FILES = InputEEData.o
-
-# Default target
-all:
-
-# Determine the AVR sub-architecture of the build main application object file
-FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1)
-
-# Create a linkable object file with the input binary EEPROM data stored in the FLASH section
-InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST)
-	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\"
-	avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@
-
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2014.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+# --------------------------------------
+#         LUFA Project Makefile.
+# --------------------------------------
+
+# Run "make help" for target help.
+
+MCU          = at90usb1287
+ARCH         = AVR8
+F_CPU        = 1000000
+F_USB        = $(F_CPU)
+OPTIMIZATION = s
+TARGET       = HID_EEPROM_Loader
+SRC          = $(TARGET).c
+LUFA_PATH    = ../../../LUFA
+CC_FLAGS     =
+LD_FLAGS     =
+OBJECT_FILES = InputEEData.o
+
+# Default target
+all:
+
+# Determine the AVR sub-architecture of the build main application object file
+FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1)
+
+# Create a linkable object file with the input binary EEPROM data stored in the FLASH section
+InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST)
+	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\"
+	avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_hid.mk

+ 55 - 55
tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/asf.xml

@@ -1,55 +1,55 @@
-<asf xmlversion="1.0">
-	<project caption="USB Device Template" id="lufa.templates.device.project.avr8">
-		<require idref="lufa.templates.device"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8_template"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="usbkey"/>
-
-		<build type="define" name="F_CPU" value="8000000UL"/>
-		<build type="define" name="F_USB" value="8000000UL"/>
-	</project>
-
-	<project caption="USB Device Template" id="lufa.templates.device.project.xmega">
-		<require idref="lufa.templates.device"/>
-		<require idref="lufa.boards.dummy.xmega"/>
-		<generator value="as5_8_template"/>
-
-		<device-support value="atxmega256a3bu"/>
-		<config name="lufa.drivers.board.name" value="a3bu_xplained"/>
-
-		<build type="define" name="F_CPU" value="32000000UL"/>
-		<build type="define" name="F_USB" value="48000000UL"/>
-	</project>
-
-	<module type="application" id="lufa.templates.device" caption="USB Device Template">
-		<info type="description" value="summary">
-		Template for a LUFA USB device mode application.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="USB Device"/>
-			<keyword value="Template Projects"/>
-		</info>
-
-		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="c-source" value="DeviceApplication.c"/>
-		<build type="c-source" value="Descriptors.c"/>
-		<build type="header-file" value="DeviceApplication.h"/>
-		<build type="header-file" value="Descriptors.h"/>
-
-		<build type="module-config" subtype="path" value=".."/>
-		<build type="header-file" value="../LUFAConfig.h"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="USB Device Template" id="lufa.templates.device.project.avr8">
+		<require idref="lufa.templates.device"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8_template"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="usbkey"/>
+
+		<build type="define" name="F_CPU" value="8000000UL"/>
+		<build type="define" name="F_USB" value="8000000UL"/>
+	</project>
+
+	<project caption="USB Device Template" id="lufa.templates.device.project.xmega">
+		<require idref="lufa.templates.device"/>
+		<require idref="lufa.boards.dummy.xmega"/>
+		<generator value="as5_8_template"/>
+
+		<device-support value="atxmega256a3bu"/>
+		<config name="lufa.drivers.board.name" value="a3bu_xplained"/>
+
+		<build type="define" name="F_CPU" value="32000000UL"/>
+		<build type="define" name="F_USB" value="48000000UL"/>
+	</project>
+
+	<module type="application" id="lufa.templates.device" caption="USB Device Template">
+		<info type="description" value="summary">
+		Template for a LUFA USB device mode application.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="USB Device"/>
+			<keyword value="Template Projects"/>
+		</info>
+
+		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="c-source" value="DeviceApplication.c"/>
+		<build type="c-source" value="Descriptors.c"/>
+		<build type="header-file" value="DeviceApplication.h"/>
+		<build type="header-file" value="Descriptors.h"/>
+
+		<build type="module-config" subtype="path" value=".."/>
+		<build type="header-file" value="../LUFAConfig.h"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+	</module>
+</asf>

+ 41 - 41
tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml

@@ -1,41 +1,41 @@
-<asf xmlversion="1.0">
-	<project caption="USB Host Template" id="lufa.templates.host.project">
-		<require idref="lufa.templates.host"/>
-		<require idref="lufa.boards.dummy.avr8"/>
-		<generator value="as5_8_template"/>
-
-		<device-support value="at90usb1287"/>
-		<config name="lufa.drivers.board.name" value="usbkey"/>
-
-		<build type="define" name="F_CPU" value="8000000UL"/>
-		<build type="define" name="F_USB" value="8000000UL"/>
-	</project>
-
-	<module type="application" id="lufa.templates.host" caption="USB Host Template">
-		<info type="description" value="summary">
-		Template for a LUFA USB host mode application.
-		</info>
-
- 		<info type="gui-flag" value="move-to-root"/>
-
-		<info type="keyword" value="Technology">
-			<keyword value="USB Host"/>
-			<keyword value="Template Projects"/>
-		</info>
-
-		<device-support-alias value="lufa_avr8"/>
-		<device-support-alias value="lufa_xmega"/>
-		<device-support-alias value="lufa_uc3"/>
-
-		<build type="c-source" value="HostApplication.c"/>
-		<build type="header-file" value="HostApplication.h"/>
-
-		<build type="module-config" subtype="path" value=".."/>
-		<build type="header-file" value="../LUFAConfig.h"/>
-
-		<require idref="lufa.common"/>
-		<require idref="lufa.platform"/>
-		<require idref="lufa.drivers.usb"/>
-		<require idref="lufa.drivers.board"/>
-	</module>
-</asf>
+<asf xmlversion="1.0">
+	<project caption="USB Host Template" id="lufa.templates.host.project">
+		<require idref="lufa.templates.host"/>
+		<require idref="lufa.boards.dummy.avr8"/>
+		<generator value="as5_8_template"/>
+
+		<device-support value="at90usb1287"/>
+		<config name="lufa.drivers.board.name" value="usbkey"/>
+
+		<build type="define" name="F_CPU" value="8000000UL"/>
+		<build type="define" name="F_USB" value="8000000UL"/>
+	</project>
+
+	<module type="application" id="lufa.templates.host" caption="USB Host Template">
+		<info type="description" value="summary">
+		Template for a LUFA USB host mode application.
+		</info>
+
+ 		<info type="gui-flag" value="move-to-root"/>
+
+		<info type="keyword" value="Technology">
+			<keyword value="USB Host"/>
+			<keyword value="Template Projects"/>
+		</info>
+
+		<device-support-alias value="lufa_avr8"/>
+		<device-support-alias value="lufa_xmega"/>
+		<device-support-alias value="lufa_uc3"/>
+
+		<build type="c-source" value="HostApplication.c"/>
+		<build type="header-file" value="HostApplication.h"/>
+
+		<build type="module-config" subtype="path" value=".."/>
+		<build type="header-file" value="../LUFAConfig.h"/>
+
+		<require idref="lufa.common"/>
+		<require idref="lufa.platform"/>
+		<require idref="lufa.drivers.usb"/>
+		<require idref="lufa.drivers.board"/>
+	</module>
+</asf>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 975 - 975
tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildSystem.txt