channel.h 452 B

123456789101112131415161718192021222324252627
  1. #ifndef INCL_CHANNEL_H
  2. #define INCL_CHANNEL_H
  3. #include <stdint.h>
  4. enum channel_trigger_mode_e {
  5. TRIG_NONE = 0,
  6. TRIG_RISE = 1,
  7. TRIG_FALL = 2,
  8. TRIG_BOTH = 3
  9. };
  10. struct di_channel {
  11. int idx;
  12. enum channel_trigger_mode_e trigger;
  13. uint8_t *sample_start;
  14. uint8_t *sample_cur;
  15. };
  16. void timer_capture_on(void);
  17. void timer_capture_off(void);
  18. void probe_on(void);
  19. void probe_off(void);
  20. uint32_t timer_capture_get(void);
  21. #endif