You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sleep.h 676B

123456789101112131415161718192021222324
  1. #ifndef _AVR_SLEEP_H_
  2. #define _AVR_SLEEP_H_ 1
  3. #define SLEEP_MODE_IDLE 0
  4. #define SLEEP_MODE_ADC 0
  5. #define SLEEP_MODE_PWR_DOWN 1
  6. #define SLEEP_MODE_PWR_SAVE 1
  7. #define SLEEP_MODE_STANDBY 1
  8. #define SLEEP_MODE_EXT_STANDBY 1
  9. #define set_sleep_mode(mode) // TODO: actually set the mode...
  10. #define sleep_enable()
  11. #define sleep_disable()
  12. #define sleep_cpu() (asm("wfi"))
  13. #define sleep_bod_disable()
  14. #define sleep_mode() sleep_cpu()
  15. // workaround for early versions of Nordic's BLE library
  16. // EIMSK moved to a dummy byte in avr_emulation...
  17. //#if defined(HAL_ACI_TL_H__) && defined(PLATFORM_H__)
  18. //#define EIMSK uint8_t EIMSKworkaround=0; EIMSKworkaround
  19. //#endif
  20. #endif