3D printed Arduino Airsoft Chronograph
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * timing.h
  3. *
  4. * OpenChrono BB speed measurement device.
  5. *
  6. * Copyright (c) 2022 Thomas Buck <thomas@xythobuz.de>
  7. *
  8. * OpenChrono is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * OpenChrono is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with OpenChrono. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. * Two phototransistors connected to external interrupts 0 and 1.
  22. */
  23. #ifndef __TIMING_H__
  24. #define __TIMING_H__
  25. extern volatile uint8_t trigger_a, trigger_b;
  26. extern volatile uint16_t time_a, time_b;
  27. void interrupt_init();
  28. void timer_init();
  29. uint16_t timer_get();
  30. void timer_start();
  31. #endif // __TIMING_H__