| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

Functions
Public Functions
BLUENRG1 Peripheral Driver » ADC Peripheral

## Functions

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_Init (ADC_InitType *ADC_InitStruct)
| Initializes the ADC peripheral according to the specified parameters in the ADC_InitStruct. 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_RoundConvertedData (FunctionalState NewState)
| Enable disable the ADC auto round output data. More...
void | ADC_SelectFrequencyMic (uint8_t Frequency)
| Select the frequency of the clock signal for an external MEMS microphone (through IO0) 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_GetConvertedData (uint8_t DataType, uint8_t Vref)
| Get the ADC converted value in Volt. More...

## Detailed Description

## Function Documentation

void ADC_AutoOffsetUpdate | ( | FunctionalState | NewState | ) |

Enable disable the ADC automatic update of the offset.

Parameters

  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 351 of file BlueNRG1_adc.c.

void ADC_Calibration | ( | FunctionalState | NewState | ) |

Enable disable the ADC calibration procedure.

Parameters

  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 330 of file BlueNRG1_adc.c.

void ADC_Cmd | ( | FunctionalState | NewState | ) |

Enable disable the ADC conversion.

Parameters

  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 284 of file BlueNRG1_adc.c.

void ADC_ConversionMode | ( | uint8_t | ConvertionMode | ) |

Configure the ADC conversion mode.

Parameters

  cConvertionMode | the value can be
  - ADC_ConversionMode_Single single shot ADC conversion
  - ADC_ConversionMode_Continuous continuous ADC conversion

Return values

  None |

Definition at line 406 of file BlueNRG1_adc.c.

void ADC_DeInit | ( | void |  | ) |

Deinitializes ADC peripheral registers to their default reset values.

Parameters

  None |

Return values

  None |

Definition at line 202 of file BlueNRG1_adc.c.

void ADC_DmaCmd | ( | FunctionalState | NewState | ) |

Enable disable the ADC DMA feature.

Parameters

  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 309 of file BlueNRG1_adc.c.

float ADC_GetConvertedData | ( | uint8_t | DataType,
|  | uint8_t | Vref
| ) |  |

Get the ADC converted value in Volt.

Parameters

  dataType | the selected channel, this value can be
  - ADC_Input_AdcPin1 data from ADC pin1
  - ADC_Input_AdcPin2 data from ADC pin2
  - ADC_Input_AdcPin12 data from ADC pin12
  - ADC_Input_Internal0V60V6 data from internal 0.6V
  - ADC_Input_Internal1V20V0 data from internal 1.2V
  - ADC_Input_BattSensor data from battery sensor
  - ADC_Input_TempSensor data from temperature sensor
  vRef | voltage reference configured, the value can be
  - ADC_ReferenceVoltage_0V Vref is 0.0 V
  - ADC_ReferenceVoltage_0V4 Vref is 0.4 V
  - ADC_ReferenceVoltage_0V6 Vref is 0.6 V
  - ADC_ReferenceVoltage_1V2 Vref is 1.2 V

Return values

  Converted | ADC value in Volt

Definition at line 562 of file BlueNRG1_adc.c.

FlagStatus ADC_GetFlagStatus | ( | uint8_t | ADC_Flag | ) |

Get the status flag of ADC.

Parameters

  ADC_Flag | the value can be
  - ADC_FLAG_CAL ADC End of Calibration flag
  - ADC_FLAG_BUSY ADC busy flag
  - ADC_FLAG_EOC ADC End of Conversion flag
  - ADC_FLAG_WDG ADC ADV value within set threshold

Return values

  FlagStatus | functional state FlagStatus This parameter can be: SET or RESET.

Definition at line 471 of file BlueNRG1_adc.c.

ITStatus ADC_GetITStatus | ( | uint8_t | ADC_Flag | ) |

Get the status of the masked IT flag. The read operation will clear the flags.

Parameters

  ADC_Flag | the value can be
  - ADC_FLAG_CAL ADC End of Calibration flag
  - ADC_FLAG_BUSY ADC busy flag
  - ADC_FLAG_EOC ADC End of Conversion flag
  - ADC_FLAG_WDG ADC ADV value within set threshold

Return values

  ITStatus | functional state ITStatus This parameter can be: SET or RESET.

Definition at line 499 of file BlueNRG1_adc.c.

void ADC_Init | ( | ADC_InitType * | ADC_InitStruct | ) |

Initializes the ADC peripheral according to the specified parameters in the ADC_InitStruct.

Parameters

  ADC_InitStruct | pointer to an ADC_InitType structure that contains the configuration information for the ADC peripheral.

Return values

  None |

Definition at line 240 of file BlueNRG1_adc.c.

void ADC_ITConfig | ( | uint8_t | ADC_Flag,
|  | FunctionalState | NewState
| ) |  |

Enable disable the ADC IT flag.

Parameters

  ADC_Flag | the value can be
  - ADC_FLAG_CAL ADC End of Calibration flag
  - ADC_FLAG_BUSY ADC busy flag
  - ADC_FLAG_EOC ADC End of Conversion flag
  - ADC_FLAG_WDG ADC ADV value within set threshold
  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 529 of file BlueNRG1_adc.c.

void ADC_RoundConvertedData | ( | FunctionalState | NewState | ) |

Enable disable the ADC auto round output data.

Parameters

  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 425 of file BlueNRG1_adc.c.

void ADC_SelectFrequencyMic | ( | uint8_t | Frequency | ) |

Select the frequency of the clock signal for an external MEMS microphone (through IO0)

Parameters

  Frequency | the value can be
  - ADC_MIC_800KH Enable the 800 kHz through IO0 for external MEMS microphone
  - ADC_MIC_1600KH Enable the 1.6 MHz through IO0 for external MEMS microphone

Return values

  None |

Definition at line 445 of file BlueNRG1_adc.c.

void ADC_StructInit | ( | ADC_InitType * | ADC_InitStruct | ) |

Fills the ADC_InitStruct with default values.

Parameters

  ADC_InitStruct | pointer to an ADC_InitType structure which will be initialized.

Return values

  None |

Definition at line 214 of file BlueNRG1_adc.c.

void ADC_ThresholdCheck | ( | FunctionalState | NewState | ) |

Enable disable the ADC threshold check.

Parameters

  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 371 of file BlueNRG1_adc.c.

void ADC_ThresholdConfig | ( | uint32_t | ThresholdLow,
|  | uint32_t | ThresholdHigh
| ) |  |

Configure the ADC threshold.

Parameters

  ThresholdLow | ADC threshold low value. ThresholdHigh: ADC threshold high value.

Return values

  None |

Definition at line 391 of file BlueNRG1_adc.c.