FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
PulseTimer API. More...
#include "boards/board_traits.h"
#include <avr/interrupt.h>
#include <stddef.h>
#include "interrupts.h"
#include "utilities.h"
#include "timer.h"
#include "gpio.h"
#include "types_traits.h"
Go to the source code of this file.
Classes | |
class | timer::PulseTimer< NTIMER_, PRESCALER_, T > |
Special kind of timer::Timer , specialized in emitting pulses with accurate width, according to a slow frequency. More... | |
Namespaces | |
namespace | timer |
Defines all API to manipulate AVR Timers. | |
Macros | |
#define | REGISTER_PULSE_TIMER8_AB_ISR(TIMER_NUM, PRESCALER, PIN_A, PIN_B) |
Register all necessary ISR (Tnterrupt Service Routines) for a timer::PulseTimer to work properly, when both its PWM pins are connected. More... | |
#define | REGISTER_PULSE_TIMER8_A_ISR(TIMER_NUM, PRESCALER, PIN_A) |
Register all necessary ISR (Tnterrupt Service Routines) for a timer::PulseTimer to work properly, when only its first PWM pins is connected. More... | |
#define | REGISTER_PULSE_TIMER8_B_ISR(TIMER_NUM, PRESCALER, PIN_B) |
Register all necessary ISR (Tnterrupt Service Routines) for a timer::PulseTimer to work properly, when only its second PWM pins is connected. More... | |
PulseTimer API.
Definition in file pulse_timer.h.
#define REGISTER_PULSE_TIMER8_AB_ISR | ( | TIMER_NUM, | |
PRESCALER, | |||
PIN_A, | |||
PIN_B | |||
) |
Register all necessary ISR (Tnterrupt Service Routines) for a timer::PulseTimer to work properly, when both its PWM pins are connected.
Note: this is necessary only for PulseTimer based on an 8-bits Timer. If you are using a 16-bits based PulseTimer, then you don't need to use this macro.
TIMER_NUM | the timer number (as defined in MCU datasheet) |
PRESCALER | the prescaler value used to instantiate the PulseTimer template |
PIN_A | the board::PWMPin connected to first PWM pin of the PulseTimer; this is used for control only, to avoid bugs due to code typos. |
PIN_B | the board::PWMPin connected to second PWM pin of the PulseTimer; this is used for control only, to avoid bugs due to code typos. |
Definition at line 51 of file pulse_timer.h.
#define REGISTER_PULSE_TIMER8_A_ISR | ( | TIMER_NUM, | |
PRESCALER, | |||
PIN_A | |||
) |
Register all necessary ISR (Tnterrupt Service Routines) for a timer::PulseTimer to work properly, when only its first PWM pins is connected.
Note: this is necessary only for PulseTimer based on an 8-bits Timer. If you are using a 16-bits based PulseTimer, then you don't need to use this macro.
TIMER_NUM | the timer number (as defined in MCU datasheet) |
PRESCALER | the prescaler value used to instantiate the PulseTimer template |
PIN_A | the board::PWMPin connected to first PWM pin of the PulseTimer; this is used for control only, to avoid bugs due to code typos. |
Definition at line 79 of file pulse_timer.h.
#define REGISTER_PULSE_TIMER8_B_ISR | ( | TIMER_NUM, | |
PRESCALER, | |||
PIN_B | |||
) |
Register all necessary ISR (Tnterrupt Service Routines) for a timer::PulseTimer to work properly, when only its second PWM pins is connected.
Note: this is necessary only for PulseTimer based on an 8-bits Timer. If you are using a 16-bits based PulseTimer, then you don't need to use this macro.
TIMER_NUM | the timer number (as defined in MCU datasheet) |
PRESCALER | the prescaler value used to instantiate the PulseTimer template |
PIN_B | the board::PWMPin connected to second PWM pin of the PulseTimer; this is used for control only, to avoid bugs due to code typos. |
Definition at line 104 of file pulse_timer.h.