Prusa-Firmware/Firmware/system_timer.h
Alex Voinea 751f810dd7
ALTFAN implementation (#2692)
* ALTFAN implementation

* Use CRITICAL_SECTION macros

* Use uint16_t instead of unsigned int

* Add forgotten CRITICAL_SECTION

* Documentation
2020-06-01 17:58:15 +02:00

30 lines
559 B
C

//! @file
#ifndef FIRMWARE_SYSTEM_TIMER_H_
#define FIRMWARE_SYSTEM_TIMER_H_
#include "Arduino.h"
#define SYSTEM_TIMER_2
#ifdef SYSTEM_TIMER_2
#include "timer02.h"
#include "tone04.h"
#define _millis millis2
#define _micros micros2
#define _delay delay2
#define _tone tone4
#define _noTone noTone4
#define timer02_set_pwm0(pwm0)
#else //SYSTEM_TIMER_2
#define _millis millis
#define _micros micros
#define _delay delay
#define _tone tone
#define _noTone noTone
#define timer02_set_pwm0(pwm0)
#endif //SYSTEM_TIMER_2
#endif /* FIRMWARE_SYSTEM_TIMER_H_ */