Projet voilier 4IRA1 Arnaud Vergnet Marino Benassai Bastien Picco Yohan Simard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Voltage.h 781B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef VOLTAGE_H
  2. #define VOLTAGE_H
  3. #include "ADC.h"
  4. #include "GPIO.h"
  5. /**
  6. * @brief Configure le GPIO et l'ADC pour lire les données de la batterie
  7. * @note
  8. * @param ADC_TypeDef adc : l'ADC à utiliser
  9. * GPIO_TypeDef gpio : le GPIO à utiliser
  10. * int pin : le pin à utiliser
  11. * @retval None
  12. */
  13. void Voltage_conf(ADC_TypeDef * adc, GPIO_TypeDef * gpio, int pin);
  14. /**
  15. * @brief Démarre l'ADC pour lire les données de la batterie
  16. * @note
  17. * @param ADC_TypeDef adc : l'ADC à utiliser
  18. * @retval None
  19. */
  20. void Voltage_start(ADC_TypeDef * adc);
  21. /**
  22. * @brief Récupère la tension de la batterie
  23. * @note
  24. * @param ADC_TypeDef adc : l'ADC à utiliser
  25. * @retval La tension
  26. */
  27. float Voltage_getVoltage(ADC_TypeDef * adc, int channel);
  28. #endif