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 --- .../stack/Components/HAL/include/appTimer.h | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h (limited to 'digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h') diff --git a/digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h b/digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h new file mode 100644 index 00000000..9c241ab6 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h @@ -0,0 +1,81 @@ +/***************************************************************************//** + \file appTimer.h + + \brief The header file describes the appTimer interface. + + \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: + 5/12/07 A. Khromykh - Created + ******************************************************************************/ +/****************************************************************************** + * WARNING: CHANGING THIS FILE MAY AFFECT CORE FUNCTIONALITY OF THE STACK. * + * EXPERT USERS SHOULD PROCEED WITH CAUTION. * + ******************************************************************************/ + +#ifndef _APPTIMER_H +#define _APPTIMER_H + +// \cond +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include +#include +// \endcond + +/****************************************************************************** + Types section +******************************************************************************/ +/** \brief fields of structure: \n + uint32_t interval - timer firing interval. Interval must be more than 10 ms (set by user) \n + TimerMode_t mode - timer work mode (set by user). Must be chosen from: \n + TIMER_REPEAT_MODE \n + TIMER_ONE_SHOT_MODE \n + void (*callback)(void) - pointer to timer callback function (set by user). */ +typedef Timer_t HAL_AppTimer_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** +\brief Starts to count an interval (starts user timer). + +\param[in] + appTimer - pointer to the timer structure (HAL_AppTimer_t is typedef Timer_t) + +\return + -1 - pointer is NULL + 0 - success +******************************************************************************/ +int HAL_StartAppTimer(HAL_AppTimer_t *appTimer); + +/**************************************************************************//** +\brief Stops the user timer. + +\param[in] + appTimer - pointer to the timer structure. + +\return + -1 - there is no appTimer started or pointer is NULL + 0 - success +******************************************************************************/ +int HAL_StopAppTimer(HAL_AppTimer_t *appTimer); + +/**************************************************************************//** +\brief Gets system time. + +\return + time since power up in milliseconds(8 bytes). +******************************************************************************/ +BcTime_t HAL_GetSystemTime(void); + +#endif /*_APPTIMER_H*/ +//eof appTimer.h -- cgit v1.2.3