alimenation documentation and move of includes to c
This commit is contained in:
parent
625998d321
commit
779b5cfaf1
2 changed files with 27 additions and 17 deletions
|
@ -1,5 +1,10 @@
|
|||
#include "Alimentation.h"
|
||||
|
||||
#include "stm32f1xx_ll_adc.h"
|
||||
#include "stm32f1xx_ll_bus.h"
|
||||
#include "stm32f1xx_ll_rcc.h"
|
||||
#include "stm32f1xx_ll_gpio.h"
|
||||
#include <math.h>
|
||||
|
||||
void ALIMENTATION_Init(void){
|
||||
RCC -> CFGR |= (0x1<<15);
|
||||
|
|
|
@ -1,25 +1,30 @@
|
|||
// RIEN A MODIFIER //
|
||||
|
||||
//codé par Léonie GALLOIS et Morgane FOUSSATS
|
||||
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file RFOutput.h
|
||||
* @author GALLOIS, Leonie and GÜLDENSTEIN, Jasper and FOUSSATS, Morgane
|
||||
* @brief Service for using the RF Module to transmit characters.
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef ALIMENTATION_H
|
||||
#define ALIMENTATION_H
|
||||
|
||||
|
||||
|
||||
#include "stm32f103xb.h"
|
||||
#include "stm32f1xx_ll_adc.h"
|
||||
#include "stm32f1xx_ll_bus.h"
|
||||
#include "stm32f1xx_ll_rcc.h"
|
||||
#include "stm32f1xx_ll_gpio.h"
|
||||
#include "math.h"
|
||||
|
||||
/* =====================================================================================
|
||||
Les fonctions qui gèrent les IO (ajout par rapport à l'activité 1)
|
||||
=======================================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Initializes for reading of the power supply/battery level
|
||||
* Peripherals used: ADC1
|
||||
* Pins used: PC2 (Analog input)
|
||||
*/
|
||||
void ALIMENTATION_Init(void);
|
||||
|
||||
/**
|
||||
* @brief Reads the power supply/battery level
|
||||
* @retval battery level in Volts
|
||||
*/
|
||||
float ALIMENTATION_GetBatteryLevel(void);
|
||||
|
||||
/**
|
||||
* @brief Returns if the power supply/battery level is above acceptable level
|
||||
* @retval state (0 or 1)
|
||||
*/
|
||||
int ALIMENTATION_IsLevelEnough(void);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue