summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.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/avr/atmega1281/rcb231_212/include/halMacIsr.h
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h b/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h
new file mode 100644
index 00000000..127af1ee
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h
@@ -0,0 +1,77 @@
+/**************************************************************************//**
+ \file halMacIsr.h
+
+ \brief Declaration mac timer 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:
+ 14/01/08 A. Mandychev - Created.
+ ******************************************************************************/
+/******************************************************************************
+ * WARNING: CHANGING THIS FILE MAY AFFECT CORE FUNCTIONALITY OF THE STACK. *
+ * EXPERT USERS SHOULD PROCEED WITH CAUTION. *
+ ******************************************************************************/
+
+#ifndef _HALMACISR_H
+#define _HALMACISR_H
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <halAppClock.h>
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+typedef enum
+{
+ HAL_RTIMER_REPEAT_MODE = 0,
+ HAL_RTIMER_ONE_SHOT_MODE = 1,
+ HAL_RTIMER_STOPPED_MODE = 2,
+} HAL_RTimerMode_t;
+
+typedef struct // Timer description.
+{
+ volatile HAL_RTimerMode_t mode; // Mode.
+ volatile uint16_t period; // Period of the timer.
+ volatile uint16_t nextEvent; // Counter of periods.
+} RTimerDescr_t;
+
+/******************************************************************************
+ External variables.
+******************************************************************************/
+// Do not use it in other files.
+extern RTimerDescr_t __rtimer;
+
+/******************************************************************************
+ Prototypes section.
+******************************************************************************/
+/******************************************************************************
+ Initializes Rtimer and RF ext. interrupts.
+******************************************************************************/
+void HAL_InitMacIsr(void);
+
+/******************************************************************************
+ Starts RTimer. Function should be invoked in critical section.
+ Parameters:
+ source - source of invocation.
+ mode - RTimer mode.
+ period - RTimer period.
+******************************************************************************/
+bool HAL_StartRtimer(HAL_RTimerMode_t mode, uint16_t period);
+
+/******************************************************************************
+ Stops RTimer. Function should be invoked in critical section.
+******************************************************************************/
+void HAL_StopRtimer(void);
+
+#endif /* _HALMACISR_H */
+
+// eof halMacIsr.h