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 "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){
|
void ALIMENTATION_Init(void){
|
||||||
RCC -> CFGR |= (0x1<<15);
|
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
|
#ifndef ALIMENTATION_H
|
||||||
#define ALIMENTATION_H
|
#define ALIMENTATION_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes for reading of the power supply/battery level
|
||||||
#include "stm32f103xb.h"
|
* Peripherals used: ADC1
|
||||||
#include "stm32f1xx_ll_adc.h"
|
* Pins used: PC2 (Analog input)
|
||||||
#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)
|
|
||||||
=======================================================================================*/
|
|
||||||
|
|
||||||
void ALIMENTATION_Init(void);
|
void ALIMENTATION_Init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reads the power supply/battery level
|
||||||
|
* @retval battery level in Volts
|
||||||
|
*/
|
||||||
float ALIMENTATION_GetBatteryLevel(void);
|
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);
|
int ALIMENTATION_IsLevelEnough(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue