summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-26 17:36:00 +0100
committerFlorent Duchon2013-02-13 21:21:12 +0100
commitb24866225a6301d3a663f874725e83c012dc25d3 (patch)
treeca527a2aab9abcdfbaf244c53ca63f0c531892b0 /digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/HAL/include/appTimer.h81
1 files changed, 81 insertions, 0 deletions
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 <types.h>
+#include <bcTimer.h>
+#include <halAppClock.h>
+// \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