timer02.h 582 B

1234567891011121314151617181920212223242526272829303132
  1. //timer02.h
  2. // use atmega timer2 as main system timer instead of timer0
  3. // timer0 is used for fast pwm (OC0B output)
  4. // original OVF handler is disabled
  5. #ifndef TIMER02_H
  6. #define TIMER02_H
  7. #include <inttypes.h>
  8. #if defined(__cplusplus)
  9. extern "C" {
  10. #endif //defined(__cplusplus)
  11. extern uint8_t timer02_pwm0;
  12. extern void timer02_set_pwm0(uint8_t pwm0);
  13. extern void timer02_init(void);
  14. extern unsigned long millis2(void);
  15. extern unsigned long micros2(void);
  16. extern void delay2(unsigned long ms);
  17. #if defined(__cplusplus)
  18. }
  19. #endif //defined(__cplusplus)
  20. #endif //TIMER02_H