| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Classes | Macros | Functions
BlueNRG1_adc.h File Reference

This file contains all the functions prototypes for the ADC firmware library. More...

`#include "BlueNRG1.h"`

Go to the source code of this file.

## Classes

struct | ADC_InitType
| Structure definition of ADC initialization. More...

## Macros

#define | ADC_DecimationRate_200 ((uint8_t)0x00)
#define | ADC_DecimationRate_100 ((uint8_t)0x01)
#define | ADC_DecimationRate_64 ((uint8_t)0x02)
#define | ADC_DecimationRate_32 ((uint8_t)0x03)
#define | IS_ADC_DECIMATIONRATE(DECIMATIONRATE)
#define | ADC_Input_None ((uint8_t)0x00)
#define | ADC_Input_AdcPin2 ((uint8_t)0x01)
#define | ADC_Input_AdcPin1 ((uint8_t)0x02)
#define | ADC_Input_AdcPin12 ((uint8_t)0x03)
#define | ADC_Input_TempSensor ((uint8_t)0x04)
#define | ADC_Input_BattSensor ((uint8_t)0x05)
#define | ADC_Input_Internal0V60V6 ((uint8_t)0x06)
#define | ADC_Input_Internal1V20V0 ((uint8_t)0x07)
#define | ADC_Input_Microphone ((uint8_t)0x0F)
#define | IS_ADC_INPUT(INPUT)
#define | ADC_ConversionMode_Single ((uint8_t)0x00)
#define | ADC_ConversionMode_Continuous ((uint8_t)0x08)
#define | IS_ADC_CONVERSIONMODE(CONVERSIONMODE)
#define | ADC_Attenuation_0dB ((uint8_t)0x00)
#define | ADC_Attenuation_6dB02 ((uint8_t)0x01)
#define | ADC_Attenuation_9dB54 ((uint8_t)0x02)
#define | IS_ADC_ATTENUATION(ATTENUATION)
#define | ADC_ReferenceVoltage_0V ((uint8_t)0x00)
#define | ADC_ReferenceVoltage_0V4 ((uint8_t)0x01)
#define | ADC_ReferenceVoltage_0V6 ((uint8_t)0x02)
#define | ADC_ReferenceVoltage_1V2 ((uint8_t)0x03)
#define | IS_ADC_REFERENCEVOLTAGE(REFERENCEVOLTAGE)
#define | ADC_MIC_800KHZ ((uint8_t)0x00)
#define | ADC_MIC_1600KHZ ((uint8_t)0x01)
#define | IS_ADC_MIC_FREQ_SEL(FREQ) (((FREQ) == ADC_MIC_800KHZ) || ((FREQ) == ADC_MIC_1600KHZ))
#define | ADC_FLAG_CAL ((uint8_t)0x01)
#define | ADC_FLAG_BUSY ((uint8_t)0x02)
#define | ADC_FLAG_EOC ((uint8_t)0x04)
#define | ADC_FLAG_WDG ((uint8_t)0x08)
#define | IS_ADC_GET_FLAG(FLAG) ((FLAG & 0x0F) != 0)
#define | ADC_GetRawData() READ_REG(ADC->DATA_CONV)
| Get the ADC raw value. More...

## Functions

void | ADC_Init (ADC_InitType *ADC_InitStruct)
| Initializes the ADC peripheral according to the specified parameters in the ADC_InitStruct. More...
void | ADC_DeInit (void)
| Deinitializes ADC peripheral registers to their default reset values. More...
void | ADC_StructInit (ADC_InitType *ADC_InitStruct)
| Fills the ADC_InitStruct with default values. More...
void | ADC_Cmd (FunctionalState NewState)
| Enable disable the ADC conversion. More...
void | ADC_DmaCmd (FunctionalState NewState)
| Enable disable the ADC DMA feature. More...
void | ADC_Calibration (FunctionalState NewState)
| Enable disable the ADC calibration procedure. More...
void | ADC_AutoOffsetUpdate (FunctionalState NewState)
| Enable disable the ADC automatic update of the offset. More...
void | ADC_ThresholdCheck (FunctionalState NewState)
| Enable disable the ADC threshold check. More...
void | ADC_ThresholdConfig (uint32_t ThresholdLow, uint32_t ThresholdHigh)
| Configure the ADC threshold. More...
void | ADC_ConversionMode (uint8_t ConvertionMode)
| Configure the ADC conversion mode. More...
void | ADC_SelectFrequencyMic (uint8_t Frequency)
| Select the frequency of the clock signal for an external MEMS microphone (through IO0) More...
void | ADC_RoundConvertedData (FunctionalState NewState)
| Enable disable the ADC auto round output data. More...
float | ADC_GetConvertedData (uint8_t DataType, uint8_t Vref)
| Get the ADC converted value in Volt. More...
FlagStatus | ADC_GetFlagStatus (uint8_t ADC_Flag)
| Get the status flag of ADC. More...
ITStatus | ADC_GetITStatus (uint8_t ADC_Flag)
| Get the status of the masked IT flag. The read operation will clear the flags. More...
void | ADC_ITConfig (uint8_t ADC_Flag, FunctionalState NewState)
| Enable disable the ADC IT flag. More...
float | ADC_ConvertDifferentialVoltage (int32_t raw_value, uint8_t attenuation)
| Convert raw ADC value in converted differential voltage value. More...
float | ADC_ConvertSingleEndedVoltage (int32_t raw_value, uint8_t channel, uint8_t vRef, uint8_t attenuation)
| Convert raw ADC value in converted single ended voltage value. More...
float | ADC_ConvertBatterySensor (int32_t raw_value, uint8_t vRef)
| Convert raw ADC value in battery level. More...
float | ADC_ConvertTemperatureSensor (int32_t raw_value, uint8_t vRef, uint8_t attenuation)
| Convert raw ADC value in temperature level. More...

## Detailed Description

This file contains all the functions prototypes for the ADC firmware library.

Author
  VMA Application Team

Version
  V2.1.0

Date
  21-March-2016

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2016 STMicroelectronics

Definition in file BlueNRG1_adc.h.