TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

Library Functions. More...

Functions

void TM_ADC_InitADC (ADC_TypeDef *ADCx)
 Initializes ADCx peripheral. More...
 
void TM_ADC_Init (ADC_TypeDef *ADCx, TM_ADC_Channel_t channel)
 Initializes ADCx with ADCx channel. More...
 
uint16_t TM_ADC_Read (ADC_TypeDef *ADCx, TM_ADC_Channel_t channel)
 Reads from ADCx channel. More...
 
void TM_ADC_EnableVbat (void)
 Enables Vbat channel for ADC. More...
 
void TM_ADC_DisableVbat (void)
 Disables Vbat channel for ADC. More...
 
uint16_t TM_ADC_ReadVbat (ADC_TypeDef *ADCx)
 Reads vbat pin voltage. More...
 

Detailed Description

Library Functions.

Function Documentation

void TM_ADC_DisableVbat ( void  )

Disables Vbat channel for ADC.

Parameters
None
Return values
None
void TM_ADC_EnableVbat ( void  )

Enables Vbat channel for ADC.

Parameters
None
Return values
None
void TM_ADC_Init ( ADC_TypeDef *  ADCx,
TM_ADC_Channel_t  channel 
)

Initializes ADCx with ADCx channel.

Parameters
*ADCxADCx peripheral to operate with
channelchannel for ADCx. This parameter can be a value of TM_ADC_Channel_t enumeration
Return values
None
void TM_ADC_InitADC ( ADC_TypeDef *  ADCx)

Initializes ADCx peripheral.

Parameters
*ADCxADCx peripheral to initialize
Return values
None
uint16_t TM_ADC_Read ( ADC_TypeDef *  ADCx,
TM_ADC_Channel_t  channel 
)

Reads from ADCx channel.

Parameters
*ADCxADCx peripheral to operate with
channelchannel for ADCx to read from. This parameter can be a value of TM_ADC_Channel_t enumeration
Return values
ADCvalue
uint16_t TM_ADC_ReadVbat ( ADC_TypeDef *  ADCx)

Reads vbat pin voltage.

Parameters
*ADCxADCx peripheral to use for Vbat measurement
Return values
Batteryvoltage in mV