Prusa-Firmware/Firmware/timer02.h
Robert Pelnar eea755496b Conditional translation for SYSTEM_TIMER_2 because we want to have posibility to switch between old/new implementation.
Timing functions (millis, micros and delay) replaced in whole source, defined in Marlin.h.
This commit enables original implementation (SYSTEM_TIMER_2 undefined)
Verified with passed complete wizard process.
2019-01-27 22:48:51 +01:00

33 lines
582 B
C

//timer02.h
// use atmega timer2 as main system timer instead of timer0
// timer0 is used for fast pwm (OC0B output)
// original OVF handler is disabled
#ifndef TIMER02_H
#define TIMER02_H
#include <inttypes.h>
#if defined(__cplusplus)
extern "C" {
#endif //defined(__cplusplus)
extern uint8_t timer02_pwm0;
extern void timer02_set_pwm0(uint8_t pwm0);
extern void timer02_init(void);
extern unsigned long millis2(void);
extern unsigned long micros2(void);
extern void delay2(unsigned long ms);
#if defined(__cplusplus)
}
#endif //defined(__cplusplus)
#endif //TIMER02_H