From 22abd06132445a55a1a0266897920f26634825c1 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 26 Dec 2012 17:38:10 +0100 Subject: digital/beacon: remove obsolete bitcloud stack --- .../Components/HAL/avr/common/src/sleep.c | 79 ---------------------- 1 file changed, 79 deletions(-) delete mode 100644 digital/beacon/src/Bitcloud_stack/Components/HAL/avr/common/src/sleep.c (limited to 'digital/beacon/src/Bitcloud_stack/Components/HAL/avr/common/src/sleep.c') diff --git a/digital/beacon/src/Bitcloud_stack/Components/HAL/avr/common/src/sleep.c b/digital/beacon/src/Bitcloud_stack/Components/HAL/avr/common/src/sleep.c deleted file mode 100644 index 1ad72df2..00000000 --- a/digital/beacon/src/Bitcloud_stack/Components/HAL/avr/common/src/sleep.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************//** - \file sleep.c - - \brief The implementation of common sleep and wake up. - - \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. * - ******************************************************************************/ -/****************************************************************************** - Includes section -******************************************************************************/ -#include - -/****************************************************************************** - Define(s) section -******************************************************************************/ -#define HAL_NULL_POINTER -1 -#define HAL_SLEEP_TIMER_HAS_ALREADY_STARTED -3 -#define HAL_SLEEP_TIMER_IS_BUSY -2 -#define HAL_SLEEP_SYSTEM_HAS_ALREADY_STARTED -3 - -/****************************************************************************** - Global variables section -******************************************************************************/ -HalSleepControl_t halSleepControl = -{ - .wakeupStation = HAL_ACTIVE_MODE, - .sleepTimerState = HAL_SLEEP_TIMER_IS_STOPPED -}; - -/****************************************************************************** - Implementations section -******************************************************************************/ -/**************************************************************************//** -\brief Starts sleep timer and HAL sleep. When system is wake up send callback -\param[in] - sleepParam - pointer to sleep structure. -\return - -1 - bad pointer, \n - -2 - sleep timer is busy, \n - -3 - sleep system has been started. - 0 - success. -******************************************************************************/ -int HAL_StartSystemSleep(HAL_Sleep_t *sleepParam) -{ - HAL_SleepTimer_t sleepTimer; - int sleepTimerStatus; - - if (!sleepParam) - return HAL_NULL_POINTER; - - halSleepControl.callback = sleepParam->callback; - sleepTimer.interval = sleepParam->sleepTime; - sleepTimer.mode = TIMER_ONE_SHOT_MODE; - sleepTimer.callback = NULL; - - sleepTimerStatus = HAL_StartSleepTimer(&sleepTimer); - if ((HAL_NULL_POINTER == sleepTimerStatus) || (HAL_SLEEP_TIMER_HAS_ALREADY_STARTED == sleepTimerStatus)) - return HAL_SLEEP_TIMER_IS_BUSY; - - if (-1 == HAL_Sleep()) - return HAL_SLEEP_SYSTEM_HAS_ALREADY_STARTED; - - return 0; -} - -//eof sleep.c -- cgit v1.2.3