adc.h File Reference

Description of the ADC interface. More...

Go to the source code of this file.

Functions

int HAL_OpenAdc (HAL_AdcDivisionFactor_t factor, void(*callback)(uint16_t data))
 Opens the ADC to make the measurement on the ADC channel.
int HAL_ReadAdc (uint8_t channel)
 Starts ADC with the parameters defined in HAL_OpenAdc.
int HAL_CloseAdc ()
 Closes the ADC.


Detailed Description

Description of the ADC interface.

Definition in file adc.h.


Function Documentation

int HAL_CloseAdc (  ) 

Closes the ADC.

Returns:
-1 - the module was not open.
0 - success.

int HAL_OpenAdc ( HAL_AdcDivisionFactor_t  factor,
void(*)(uint16_t data)  callback 
)

Opens the ADC to make the measurement on the ADC channel.

Parameters:
[in] factor - division factor for the input clock frequency. Must be chosen from:
ADC_DIVISION_FACTOR_2
ADC_DIVISION_FACTOR_4
ADC_DIVISION_FACTOR_8
ADC_DIVISION_FACTOR_16
ADC_DIVISION_FACTOR_32
ADC_DIVISION_FACTOR_64
ADC_DIVISION_FACTOR_128
[in] callback - pointer to the function that will notify about measurement completion.
Returns:
-1 - ADC is busy.
0 - success.

int HAL_ReadAdc ( uint8_t  channel  ) 

Starts ADC with the parameters defined in HAL_OpenAdc.

Parameters:
[in] channel - number of ADC channel. Must be chosen from:
HAL_ADC_CHANNEL0
HAL_ADC_CHANNEL1
HAL_ADC_CHANNEL2
HAL_ADC_CHANNEL3
Returns:
-1 - unable to open ADC (unsupported channel number).
0 - success.


Generated on Wed Apr 2 19:06:16 2008 for ZigBeeNet Stack Documentation by  doxygen 1.5.1-p1