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 --- .../SystemEnvironment/include/sysTimer.h | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysTimer.h (limited to 'digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysTimer.h') diff --git a/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysTimer.h b/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysTimer.h new file mode 100644 index 00000000..4420725d --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/SystemEnvironment/include/sysTimer.h @@ -0,0 +1,79 @@ +/**************************************************************************//** + \file sysTimer.h + + \brief Simple interface of HAL application timer. + + \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: + 2010-10-18 Max Gekk - Created. + Last change: + $Id: sysTimer.h 17448 2011-06-09 13:53:59Z ataradov $ + ******************************************************************************/ +#if !defined _SYS_TIMER_H +#define _SYS_TIMER_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include + +/****************************************************************************** + Types section + ******************************************************************************/ +/* Internal states of system timer. */ +typedef enum _SYS_TimerState_t +{ + SYS_TIMER_STOPPED = 0x00, + SYS_TIMER_STARTED = 0x01 +} SYS_TimerState_t; + +/* Type of the system timer. */ +typedef struct _SYS_Timer_t +{ + SYS_TimerState_t state; + HAL_AppTimer_t timer; +} SYS_Timer_t; + + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +/****************************************************************************** + \brief Initialize the System Timer. + + \param[in] sysTimer - timer pointer will be initialized. + \param[in] mode - timer mode: TIMER_ONE_SHOT_MODE or TIMER_REPEAT_MODE. + \param[in] interval - timer interval (milliseconds). + \param[in] handler - timer handler function pointer. + + \return None. + *****************************************************************************/ +void SYS_InitTimer(SYS_Timer_t *const sysTimer, const TimerMode_t mode, + const uint32_t interval, void (*handler)(void)); + +/****************************************************************************** + \brief Start the HAL Application Timer. + + \param[in] appTimer - timer pointer will be started. + \return None. + ******************************************************************************/ +void SYS_StartTimer(SYS_Timer_t *const sysTimer); + +/****************************************************************************** + \brief Stop the HAL Application Timer. + + \param[in] appTimer - timer pointer will be stopped. + + \return None. + *****************************************************************************/ +void SYS_StopTimer(SYS_Timer_t *const sysTimer); + +#endif /* _SYS_TIMER_H */ +/** eof sysTimer.h */ -- cgit v1.2.3