adc.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. ******************************************************************************
  3. * @file VAPC-meter/lib/adc.h
  4. * @author "Vladimir N. Shilov" <shilow@ukr.net>
  5. * @version V1
  6. * @date 24-March-2016
  7. * @brief This file contains the headers of the ADC functions.
  8. ******************************************************************************
  9. */
  10. /* Define to prevent recursive inclusion -------------------------------------*/
  11. #pragma once
  12. #ifndef __ADC_H
  13. #define __ADC_H
  14. /* Includes ------------------------------------------------------------------*/
  15. #include "stm8l15x.h"
  16. /* Exported types ------------------------------------------------------------*/
  17. /* Exported defines ----------------------------------------------------------*/
  18. /* Exported constants --------------------------------------------------------*/
  19. #define ADC_BUFFER_SIZE ((uint8_t)2)
  20. #define FAST_BUFFER_SIZE ((uint8_t)64)
  21. /* Exported macro ------------------------------------------------------------*/
  22. /* Exported variables --------------------------------------------------------*/
  23. extern __IO uint16_t ADC_Buffer[];
  24. extern __IO uint16_t VoltageFastBuffer[];
  25. extern __IO uint16_t CurrentFastBuffer[];
  26. /* Exported functions ------------------------------------------------------- */
  27. void ADC_Config(void);
  28. uint16_t * ADC_GetValues(void);
  29. #endif /* __ADC_H */
  30. /************************ (C) Vladimir N. Shilov *****END OF FILE****/