/* This is the port where the USB bus is connected. When you configure it to
* "B", the registers PORTB, PINB and DDRB will be used.
*/
-#define USB_CFG_DMINUS_BIT 4
+#define JUMPER_BIT 7 /* old value was 0 */
+/*
+ * jumper is connected to this bit in port D, active low
+ */
+#define USB_CFG_DMINUS_BIT 6 /* old value was 4 */
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
*/
/* ---------------------- feature / code size options ---------------------- */
/* ------------------------------------------------------------------------- */
+#define HAVE_READ_LOCK_FUSE 1
+/*
+ * enable the loaders capability to load its lfuse, hfuse and lockbits
+ * ...However, programming of these is prohibited...
+ */
+
+#define HAVE_BLB11_SOFTW_LOCKBIT 1
+/*
+ * The IC itself do not need to prgra BLB11, but the bootloader will avaoid
+ * to erase itself from the bootregion
+ */
+
+#define HAVE_BLB11_SOFTW_BACKDOOR 1
+/*
+ * When "HAVE_BLB11_SOFTW_LOCKBIT" is enabled, this backdor will allow writing
+ * to the BLS while JUMPER stays low. (keeps be pressed)
+ * If JUMPER is released (and after a short debouncing period) repressing it
+ * will have NO affect on disabling the writelock.
+ */
+
#define HAVE_EEPROM_PAGED_ACCESS 1
/* If HAVE_EEPROM_PAGED_ACCESS is defined to 1, page mode access to EEPROM is
* compiled in. Whether page mode or byte mode access is used by AVRDUDE
* signature) does not support page mode for EEPROM. It is required for
* accessing the EEPROM on the ATMega8. Costs ~54 bytes.
*/
-#define BOOTLOADER_CAN_EXIT 1
+#define BOOTLOADER_CAN_EXIT 0
/* If this macro is defined to 1, the boot loader will exit shortly after the
* programmer closes the connection to the device. Costs ~36 bytes.
*/
#ifndef __ASSEMBLER__ /* assembler cannot parse function definitions */
-#define JUMPER_BIT 7 /* jumper is connected to this bit in port D, active low */
-
#ifndef MCUCSR /* compatibility between ATMega8 and ATMega88 */
# define MCUCSR MCUSR
#endif
static inline void bootLoaderInit(void)
{
PORTD |= (1 << JUMPER_BIT); /* activate pull-up */
- if(!(MCUCSR & (1 << EXTRF))) /* If this was not an external reset, ignore */
- leaveBootloader();
+// deactivated by Stephan - reset after each avrdude op is annoing!
+// if(!(MCUCSR & (1 << EXTRF))) /* If this was not an external reset, ignore */
+// leaveBootloader();
MCUCSR = 0; /* clear all reset flags for next time */
}
PORTD = 0; /* undo bootLoaderInit() changes */
}
-#define bootLoaderCondition() ((PIND & (1 << JUMPER_BIT)) == 0)
+#define bootLoaderCondition() ((PIND & (1 << JUMPER_BIT)) == 0)
#endif /* __ASSEMBLER__ */