]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/sun_usb/config.h
next_usb: Change LEDs usage for CapsLock status
[max/tmk_keyboard.git] / converter / sun_usb / config.h
index 32303cd32b0305bc292b8d8f80518e21ed0b9ef9..66036da931b09d8f753ba9ffed3e0f431ec18173 100644 (file)
@@ -39,15 +39,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* legacy keymap support */
 #define USE_LEGACY_KEYMAP
 
-/* Boot Section Size in *BYTEs*
- *   Teensy   halfKay    512
- *   Teensy++ halfKay    1024
- *   Atmel DFU loader    4096
- *   LUFA bootloader     4096
- *   USBaspLoader        2048
- */
-#define BOOTLOADER_SIZE 4096
-
 
 /* Serial(USART) configuration
  *     asynchronous, negative logic, 1200baud, no flow control
@@ -65,12 +56,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define SERIAL_SOFT_RXD_BIT         2
 #define SERIAL_SOFT_RXD_VECT        INT2_vect
 /* RXD Interupt */
+#ifdef SERIAL_SOFT_LOGIC_NEGATIVE
+/* enable interrupt: INT2(rising edge) */
+#define INTR_TRIG_EDGE   ((1<<ISC21)|(1<<ISC20))
+#else
+/* enable interrupt: INT2(falling edge) */
+#define INTR_TRIG_EDGE   ((1<<ISC21)|(0<<ISC20))
+#endif
 #define SERIAL_SOFT_RXD_INIT()      do { \
     /* pin configuration: input with pull-up */ \
     SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
     SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
-    /* enable interrupt: INT2(rising edge) */ \
-    EICRA |= ((1<<ISC21)|(1<<ISC20)); \
+    EICRA |= INTR_TRIG_EDGE; \
     EIMSK |= (1<<INT2); \
     sei(); \
 } while (0)