From b24866225a6301d3a663f874725e83c012dc25d3 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 26 Dec 2012 17:36:00 +0100 Subject: digital/beacon: add bitcloud stack into common directory digital/zigbit --- .../HAL/avr/atmega1281/common/include/halSleep.h | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halSleep.h (limited to 'digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halSleep.h') diff --git a/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halSleep.h b/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halSleep.h new file mode 100644 index 00000000..c82c1a09 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halSleep.h @@ -0,0 +1,73 @@ +/**************************************************************************//** + \file halSleep.h + + \brief Interface to control sleep mode. + + \author + Atmel Corporation: http://www.atmel.com \n + Support email: avr@atmel.com + + Copyright (c) 2008-2011, Atmel Corporation. All rights reserved. + Licensed under Atmel's Limited License Agreement (BitCloudTM). + + \internal + History: + 1/12/09 A. Khromykh - Created + ******************************************************************************/ +/****************************************************************************** + * WARNING: CHANGING THIS FILE MAY AFFECT CORE FUNCTIONALITY OF THE STACK. * + * EXPERT USERS SHOULD PROCEED WITH CAUTION. * + ******************************************************************************/ + +#ifndef _HALSLEEP_H +#define _HALSLEEP_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include + +/****************************************************************************** + Defines section +******************************************************************************/ +#define HAL_ACTIVE_MODE 0 +#define HAL_SLEEP_MODE 1 +#define HAL_SLEEP_TIMER_IS_STOPPED 0 +#define HAL_SLEEP_TIMER_IS_STARTED 1 +#define HAL_SLEEP_TIMER_IS_WAKEUP_SOURCE 0 +#define HAL_EXT_IRQ_IS_WAKEUP_SOURCE 1 + +/****************************************************************************** + Types section +******************************************************************************/ +typedef struct +{ + HAL_WakeUpCallback_t callback; + HAL_SleepTimer_t sleepTimer; + uint8_t wakeupStation : 1; + uint8_t wakeupSource : 1; + uint8_t sleepTimerState : 1; +} HalSleepControl_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** +\brief Switch on system power. + +\param[in] + wakeupSource - wake up source +******************************************************************************/ +void halPowerOn(const uint8_t wakeupSource); + +/******************************************************************************* + Shutdown system. + NOTES: + the application should be sure the poweroff will not be + interrupted after the execution of the sleep(). +*******************************************************************************/ +void halPowerOff(void); + +#endif /* _HALSLEEP_H */ +// eof halSleep.h -- cgit v1.2.3