Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make it even harder to unintentionally include fuse definitions

  • Loading branch information...
commit 1815ab1ef7d448bf1abc926d4cdd1084c577bbf7 1 parent d88179a
@triffid triffid authored
Showing with 31 additions and 29 deletions.
  1. +31 −29 fuses.h
View
60 fuses.h
@@ -1,29 +1,31 @@
-#ifdef FUSES
- #if defined (__AVR_ATmega168__)
- FUSES = {
- .low = FUSE_CKSEL3 & FUSE_SUT0,
- .high = FUSE_SPIEN,
- .extended = FUSE_BOOTSZ1 & FUSE_BOOTSZ0,
- };
- #elif defined (__AVR_ATmega328P__)
- FUSES = {
- .low = FUSE_CKSEL3 & FUSE_SUT0,
- .high = FUSE_SPIEN & FUSE_BOOTSZ0 & FUSE_BOOTSZ1,
- .extended = EFUSE_DEFAULT,
- };
- #elif defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__)
- FUSES = {
- .low = FUSE_CKSEL3 & FUSE_SUT0,
- .high = FUSE_SPIEN & FUSE_BOOTSZ0 & FUSE_BOOTSZ1,
- .extended = EFUSE_DEFAULT,
- };
- #elif defined (__AVR_ATmega1280__)
- FUSES = {
- .low = FUSE_CKSEL3 & FUSE_SUT0,
- .high = FUSE_SPIEN & FUSE_BOOTSZ0 & FUSE_BOOTSZ1,
- .extended = EFUSE_DEFAULT,
- };
- #else
- #warning No fuse definitions for this chip in fuses.h!
- #endif
-#endif /* FUSES */
+#ifndef _FUSES_H
+ #ifdef _INCLUDE_FUSES
+ #if defined (__AVR_ATmega168__)
+ FUSES = {
+ .low = FUSE_CKSEL3 & FUSE_SUT0,
+ .high = FUSE_SPIEN,
+ .extended = FUSE_BOOTSZ1 & FUSE_BOOTSZ0,
+ };
+ #elif defined (__AVR_ATmega328P__)
+ FUSES = {
+ .low = FUSE_CKSEL3 & FUSE_SUT0,
+ .high = FUSE_SPIEN & FUSE_BOOTSZ0 & FUSE_BOOTSZ1,
+ .extended = EFUSE_DEFAULT,
+ };
+ #elif defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__)
+ FUSES = {
+ .low = FUSE_CKSEL3 & FUSE_SUT0,
+ .high = FUSE_SPIEN & FUSE_BOOTSZ0 & FUSE_BOOTSZ1,
+ .extended = EFUSE_DEFAULT,
+ };
+ #elif defined (__AVR_ATmega1280__)
+ FUSES = {
+ .low = FUSE_CKSEL3 & FUSE_SUT0,
+ .high = FUSE_SPIEN & FUSE_BOOTSZ0 & FUSE_BOOTSZ1,
+ .extended = EFUSE_DEFAULT,
+ };
+ #else
+ #warning No fuse definitions for this chip in fuses.h!
+ #endif
+ #endif /* _INCLUDE_FUSES */
+#endif /* _FUSES_H */
Please sign in to comment.
Something went wrong with that request. Please try again.