documentation accelero
This commit is contained in:
parent
3789f1b8ca
commit
4a430029df
1 changed files with 26 additions and 17 deletions
|
@ -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
|
||||
#define ACCELERO_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 the Accelerometer
|
||||
* Peripherals used: ADC1
|
||||
* Pins used: PC0 (Analog Input, X channel accelerometer)
|
||||
* Pins used: PC1 (Analog Input, Y channel accelerometer)
|
||||
*/
|
||||
void ACCELEROMETER_Init(void);
|
||||
|
||||
/**
|
||||
* @brief Reads the accelerometer x channel
|
||||
* @retval acceleration in x direction in g
|
||||
*/
|
||||
double ACCELEROMETER_GetX(void);
|
||||
|
||||
/**
|
||||
* @brief Reads the accelerometer y channel
|
||||
* @retval acceleration in y direction in g
|
||||
*/
|
||||
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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue