summaryrefslogtreecommitdiffstats
path: root/firmware/configuration/t841_default/bootloaderconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/configuration/t841_default/bootloaderconfig.h')
-rw-r--r--firmware/configuration/t841_default/bootloaderconfig.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/firmware/configuration/t841_default/bootloaderconfig.h b/firmware/configuration/t841_default/bootloaderconfig.h
index 4ea59dd..80f6522 100644
--- a/firmware/configuration/t841_default/bootloaderconfig.h
+++ b/firmware/configuration/t841_default/bootloaderconfig.h
@@ -23,11 +23,11 @@
* "B", the registers PORTB, PINB and DDRB will be used.
*/
-#define USB_CFG_DMINUS_BIT 3
+#define USB_CFG_DMINUS_BIT 0
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
*/
-#define USB_CFG_DPLUS_BIT 4
+#define USB_CFG_DPLUS_BIT 1
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
* This may be any bit in the port, but must be configured as a pin change interrupt.
*/
@@ -49,23 +49,30 @@
// setup interrupt for Pin Change for D+
-#define USB_INTR_CFG PCMSK
+#define USB_INTR_CFG PCMSK1
#define USB_INTR_CFG_SET (1 << USB_CFG_DPLUS_BIT)
#define USB_INTR_CFG_CLR 0
#define USB_INTR_ENABLE GIMSK
-#define USB_INTR_ENABLE_BIT PCIE
+#define USB_INTR_ENABLE_BIT PCIE1
#define USB_INTR_PENDING GIFR
-#define USB_INTR_PENDING_BIT PCIF
-#define USB_INTR_VECTOR PCINT0_vect
-
+#define USB_INTR_PENDING_BIT PCIF1
+#define USB_INTR_VECTOR PCINT1_vect
+
/* ------------------------------------------------------------------------- */
/* Configuration relevant to the CPU the bootloader is running on */
/* ------------------------------------------------------------------------- */
// how many milliseconds should host wait till it sends another erase or write?
// needs to be above 4.5 (and a whole integer) as avr freezes for 4.5ms
+
+// ATtiny841 erases four pages at once
#define MICRONUCLEUS_WRITE_SLEEP 5
+#define MICRONUCLEUS_ERASE_SLEEP 1
+// ATtiny841 does not know OSCCAL
+#ifndef OSCCAL
+#define OSCCAL OSCCAL0
+#endif
/* ---------------------- feature / code size options ---------------------- */
/* Configure the behavior of the bootloader here */
@@ -183,8 +190,8 @@
* comes with its own OSCCAL calibration or an external clock source is used.
*/
-#define OSCCAL_RESTORE 0
-#define OSCCAL_16_5MHz 1
+#define OSCCAL_RESTORE 1
+#define OSCCAL_16_5MHz 0
#define OSCCAL_HAVE_XTAL 0
/*
@@ -200,11 +207,11 @@
*
*/
-#define LED_MODE ACTIVE_HIGH
+#define LED_MODE ACTIVE_LOW
#define LED_DDR DDRB
#define LED_PORT PORTB
-#define LED_PIN PB1
+#define LED_PIN PB2
/*
* This is the implementation of the LED code. Change the configuration above unless you want to