pulse_glue.h 545 B

1234567891011121314151617181920212223242526
  1. /**
  2. * @file pulse_glue.h
  3. *
  4. * Simple tool to glue separated pulses to corret
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #include <stdbool.h>
  9. #include <stdlib.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. typedef struct PulseGlue PulseGlue;
  14. PulseGlue* pulse_glue_alloc();
  15. void pulse_glue_free(PulseGlue* pulse_glue);
  16. void pulse_glue_reset(PulseGlue* pulse_glue);
  17. bool pulse_glue_push(PulseGlue* pulse_glue, bool polarity, uint32_t length);
  18. void pulse_glue_pop(PulseGlue* pulse_glue, uint32_t* length, uint32_t* period);
  19. #ifdef __cplusplus
  20. }
  21. #endif