main.h 618 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef MAIN_H_
  2. #define MAIN_H_
  3. #include "util.h"
  4. #if (defined(__AVR_ATmega88__) ||\
  5. defined(__AVR_ATmega88P__) ||\
  6. defined(__AVR_ATmega328P__))
  7. # define IS_ATMEGAx8 1
  8. #elif (defined(__AVR_ATtiny13__) ||\
  9. defined(__AVR_ATtiny25__) ||\
  10. defined(__AVR_ATtiny45__) ||\
  11. defined(__AVR_ATtiny85__))
  12. # define IS_ATMEGAx8 0
  13. #else
  14. # error "Unknown microcontroller."
  15. #endif
  16. /* Sleep mode. */
  17. #if FEAT_POWERSAVE
  18. # define USE_DEEP_SLEEP 1
  19. #else
  20. # define USE_DEEP_SLEEP 0
  21. #endif
  22. void system_handle_deep_sleep_wakeup(void);
  23. void system_handle_watchdog_interrupt(void);
  24. #endif /* MAIN_H_ */