summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halAdc.h
diff options
context:
space:
mode:
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halAdc.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halAdc.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halAdc.h b/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halAdc.h
new file mode 100644
index 00000000..d64f6bd2
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halAdc.h
@@ -0,0 +1,68 @@
+/**************************************************************************//**
+ \file halAdc.h
+
+ \brief Declaration of hardware depended ADC 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 _HALADC_H
+#define _HALADC_H
+
+/******************************************************************************
+ Includes section
+******************************************************************************/
+#include <types.h>
+#include <halTaskManager.h>
+#include <halFCPU.h>
+#include <adc.h>
+
+/******************************************************************************
+ Prototypes section
+******************************************************************************/
+/**************************************************************************//**
+\brief Initializations the ADC.
+\param[in]
+ param - pointer to parameter structure
+******************************************************************************/
+void halOpenAdc(HAL_AdcParams_t *param);
+
+/**************************************************************************//**
+\brief starts convertion on the ADC channel.
+\param[in]
+ channel - channel number.
+******************************************************************************/
+void halStartAdc(uint8_t channel);
+
+/**************************************************************************//**
+\brief Closes the ADC.
+******************************************************************************/
+void halCloseAdc(void);
+
+/******************************************************************************
+ Inline static functions section
+******************************************************************************/
+/**************************************************************************//**
+\brief SIG_ADC interrupt handler signal implementation
+******************************************************************************/
+INLINE void halSigAdcInterrupt(void)
+{
+ halPostTask3(HAL_ADC);
+}
+
+#endif /* _HALADC_H */
+
+// eof halSdc.h