|
28 | 28 | #include <avr/io.h> |
29 | 29 | #include <util/delay.h> |
30 | 30 |
|
31 | | -//To program the fuse bits, the FUSE macro is used. The fuse settings are set to the devices production values. |
| 31 | +// To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values. |
32 | 32 | FUSES = { |
33 | | - .WDTCFG = 0x00, // WDTCFG {PERIOD=OFF, WINDOW=OFF} |
34 | | - .BODCFG = 0x00, // BODCFG {SLEEP=DISABLE, ACTIVE=DISABLE, SAMPFREQ=128Hz, LVL=BODLEVEL0} |
35 | | - .OSCCFG = 0x00, // OSCCFG {CLKSEL=OSCHF} |
36 | | - .SYSCFG0 = 0xC0, // SYSCFG0 {EESAVE=DISABLE, RSTPINCFG=INPUT, CRCSEL=CRC16, CRCSRC=NOCRC} |
37 | | - .SYSCFG1 = 0x08, // SYSCFG1 {SUT=0MS, MVSYSCFG=DUAL} |
38 | | - .CODESIZE = 0x00, // CODESIZE |
39 | | - .BOOTSIZE = 0x00, // BOOTSIZE |
| 33 | + .WDTCFG = FUSE_WDTCFG_DEFAULT, |
| 34 | + .BODCFG = FUSE_BODCFG_DEFAULT, |
| 35 | + .OSCCFG = FUSE_OSCCFG_DEFAULT, |
| 36 | + .SYSCFG0 = FUSE_SYSCFG0_DEFAULT, |
| 37 | + .SYSCFG1 = FUSE_SYSCFG1_DEFAULT, |
| 38 | + .CODESIZE = FUSE_CODESIZE_DEFAULT, |
| 39 | + .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT, |
40 | 40 | }; |
41 | | -//Macro used to set lockbits. Set to production value. |
| 41 | +// To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked. |
42 | 42 | LOCKBITS = { |
43 | | - 0x5CC5C55C, // KEY {KEY=NOLOCK} |
44 | | -}; |
| 43 | + LOCKBITS_DEFAULT, |
| 44 | +}; |
45 | 45 |
|
46 | 46 | // The VREF (Voltage Reference) peripheral will be set up to generate a |
47 | 47 | // reference voltage of 2.5 V |
|
0 commit comments