Board Support  Version 1.0
Functions available when using the Board Software Components
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

◆ ADC_ConversionDone()

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.

◆ ADC_GetResolution()

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.

◆ ADC_GetValue()

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.

◆ ADC_Initialize()

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.

◆ ADC_StartConversion()

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.

◆ ADC_Uninitialize()

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.