Board Support  Version 1.0
Functions available when using the Board Software Components
 All Data Structures Functions Variables Groups Pages
A/D Converter

Analog to Digital Converter Interface. More...

Functions

int32_t ADC_Initialize (void)
 Initialize Analog-to-Digital Converter. More...
 
int32_t ADC_Uninitialize (void)
 De-initialize Analog-to-Digital Converter. More...
 
int32_t ADC_StartConversion (void)
 Start conversion. More...
 
int32_t ADC_ConversionDone (void)
 Check if conversion finished. More...
 
int32_t ADC_GetValue (void)
 Get converted value. More...
 
uint32_t ADC_GetResolution (void)
 Get resolution of Analog-to-Digital Converter. More...
 

Description

Analog to Digital Converter Interface.

Function Documentation

int32_t ADC_ConversionDone ( void  )

Check if conversion finished.

Returns
  • 0: conversion finished
  • -1: conversion in progress

The function checks whether the conversion has finished. The function returns an integer value of 0 when conversion has finished, and -1 when conversion is in progress.

uint32_t ADC_GetResolution ( void  )

Get resolution of Analog-to-Digital Converter.

Returns
Resolution (in bits)

The function returns the number of bits of the A/D converter.

int32_t ADC_GetValue ( void  )

Get converted value.

Returns
  • >=0: converted value
  • -1: conversion in progress or failed

The function returns the converted value from the A/D converter. The function returns -1 when the conversion failed or is still in progress.

int32_t ADC_Initialize ( void  )

Initialize Analog-to-Digital Converter.

Returns
  • 0: function succeeded
  • -1: function failed

The function initializes the A/D converter interface. The function returns an integer value of 0 on success, and -1 on error.

int32_t ADC_StartConversion ( void  )

Start conversion.

Returns
  • 0: function succeeded
  • -1: function failed

The function starts the A/D conversion. The function returns an integer value of 0 on success, and -1 on error.

int32_t ADC_Uninitialize ( void  )

De-initialize Analog-to-Digital Converter.

Returns
  • 0: function succeeded
  • -1: function failed

The function de-initializes the A/D converter interface. The function returns an integer value of 0 on success, and -1 on error.