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 --- .../avr/atmega1281/rcb231_212/include/halMacIsr.h | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h (limited to 'digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/rcb231_212/include/halMacIsr.h') 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 + +/****************************************************************************** + 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 -- cgit v1.2.3