瀏覽代碼

add avr/sleep.h for Teensy3, for Nordic BLE library

teensy4-core
PaulStoffregen 10 年之前
父節點
當前提交
3feee12f27
共有 1 個文件被更改,包括 23 次插入0 次删除
  1. +23
    -0
      teensy3/avr/sleep.h

+ 23
- 0
teensy3/avr/sleep.h 查看文件

@@ -0,0 +1,23 @@
#ifndef _AVR_SLEEP_H_
#define _AVR_SLEEP_H_ 1

#define SLEEP_MODE_IDLE 0
#define SLEEP_MODE_ADC 0
#define SLEEP_MODE_PWR_DOWN 1
#define SLEEP_MODE_PWR_SAVE 1
#define SLEEP_MODE_STANDBY 1
#define SLEEP_MODE_EXT_STANDBY 1

#define set_sleep_mode(mode) // TODO: actually set the mode...
#define sleep_enable()
#define sleep_disable()
#define sleep_cpu() (asm("wfi"))
#define sleep_bod_disable()
#define sleep_mode() sleep_cpu()

// workaround for early versions of Nordic's BLE library
#if defined(HAL_ACI_TL_H__) && defined(PLATFORM_H__)
#define EIMSK uint8_t EIMSKworkaround=0; EIMSKworkaround
#endif

#endif

Loading…
取消
儲存