sine.h 592 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _SINE_H_
  2. #define _SINE_H_
  3. #include "adc.h"
  4. #include "stm32f4xx_hal.h"
  5. typedef struct
  6. {
  7. uint8_t inputType; // 0x00: Line to Line 0x01: Line to Neutral
  8. uint16_t Freq;
  9. uint32_t Avg;
  10. uint16_t Vrms;
  11. uint16_t Vrms_AVG;
  12. uint16_t idx_put;
  13. uint32_t buffer[LIMIT_MOVE_FILTER];
  14. uint32_t value;
  15. uint16_t filter_Avg;
  16. uint16_t filter_Vrms;
  17. } MOVE_AVG_FILTER;
  18. extern MOVE_AVG_FILTER AC_Sine[3];
  19. extern void ADCSineCalculate2(uint32_t *adc_value, uint16_t adc_length, uint16_t adc_sample_time , MOVE_AVG_FILTER *SineValue, float Magn, uint8_t phase);
  20. #endif