From: Pat Thoyts Date: Wed, 6 Nov 2013 22:18:25 +0000 (+0000) Subject: Change fuse settings to preserve the eeprom when reprogramming. X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=3cba1352cc8fcf74d6d965ceb2a22c2185f9e0a6;p=hid_keyb Change fuse settings to preserve the eeprom when reprogramming. This allows the serial number and calibration setting to be written once and preserved subsequently. Signed-off-by: Pat Thoyts --- diff --git a/Makefile b/Makefile index 00c04f7..06df256 100644 --- a/Makefile +++ b/Makefile @@ -64,8 +64,9 @@ flash: all # +-------------------- CKDIV8 (divide clock by 8 -> don't divide) # For 16.5MHz internal: -U hfuse:w:0xdd:m -U lfuse:w:0xe1:m # For 12MHz crystal: -U hfuse:w:0xdd:m -U lfuse:w:0b11111111:m +# Note: 0xd5 is as per 0xdd but with EESAVE enabled. fuse: - $(AVRDUDE) -U hfuse:w:0xdd:m -U lfuse:w:0xe1:m + $(AVRDUDE) -U hfuse:w:0xd5:m -U lfuse:w:0xe1:m readcal: $(AVRDUDE) -U calibration:r:/dev/stdout:i | head -1