documentation accelero

This commit is contained in:
Jasper Güldenstein 2020-11-15 17:56:48 +01:00
parent 3789f1b8ca
commit 4a430029df

View file

@ -1,29 +1,38 @@
// 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 reading the analog signals of the Accelerometer.
******************************************************************************
*/
#ifndef ACCELERO_H #ifndef ACCELERO_H
#define ACCELERO_H #define ACCELERO_H
/**
* @brief Initializes for reading the Accelerometer
#include "stm32f103xb.h" * Peripherals used: ADC1
#include "stm32f1xx_ll_adc.h" * Pins used: PC0 (Analog Input, X channel accelerometer)
#include "stm32f1xx_ll_bus.h" * Pins used: PC1 (Analog Input, Y channel accelerometer)
#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 ACCELEROMETER_Init(void); void ACCELEROMETER_Init(void);
/**
* @brief Reads the accelerometer x channel
* @retval acceleration in x direction in g
*/
double ACCELEROMETER_GetX(void); double ACCELEROMETER_GetX(void);
/**
* @brief Reads the accelerometer y channel
* @retval acceleration in y direction in g
*/
double ACCELEROMETER_GetY(void); double ACCELEROMETER_GetY(void);
/**
* @brief Reads the accelerometer x and y channel
Calculates if the roll angle lies between -40 and 40 degrees
* @retval state (0 or 1)
*/
int ACCELEROMETER_AngleGood(void); int ACCELEROMETER_AngleGood(void);