X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/blobdiff_plain/13894a8b1ba8938b9b5c5d0177f10a4e90b3ef9d..c31b47c8592f04ca20342dccac31e2c34580a3c9:/firmware/bootloaderconfig.h diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index aa234a1..9525aad 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -42,7 +42,11 @@ these macros are defined, the boot loader usees them. /* 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. */ @@ -77,6 +81,26 @@ these macros are defined, the boot loader usees them. /* ---------------------- 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 @@ -90,7 +114,7 @@ these macros are defined, the boot loader usees them. * 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. */ @@ -132,8 +156,6 @@ these macros are defined, the boot loader usees them. #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 @@ -141,8 +163,9 @@ these macros are defined, the boot loader usees them. 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 */ } @@ -151,7 +174,7 @@ static inline void bootLoaderExit(void) PORTD = 0; /* undo bootLoaderInit() changes */ } -#define bootLoaderCondition() ((PIND & (1 << JUMPER_BIT)) == 0) +#define bootLoaderCondition() ((PIND & (1 << JUMPER_BIT)) == 0) #endif /* __ASSEMBLER__ */