|
Chrispy
High-performance multichannel ADC sampling and audio recording.
|
#include "Timer.h"#include <Arduino.h>#include <avr/interrupt.h>#include <limits.h>#include <math.h>Data Structures | |
| struct | Timer1 |
Macros | |
| #define | SKIP_PRESCALER 0 |
| #define | CTC_MODE (0b01 << WGM12) |
| #define | max(a, b) (a >= b ? a : b) |
| #define | min(a, b) (a >= b ? b : a) |
Functions | |
| TimerRc | activate_t1 (TimerConfig &cfg) |
| Activate the 16-bit timer 1 on ATMEGA2560 with a given configuration. | |
| void | deactivate_t1 () |
| Deactivate 16-bit timer 1 on ATMEGA2560. | |
| const char * | error_str (TimerRc rc) |
| Retrieve a string description of a timer return code. | |
| #define CTC_MODE (0b01 << WGM12) |
| #define max | ( | a, | |
| b | |||
| ) | (a >= b ? a : b) |
| #define min | ( | a, | |
| b | |||
| ) | (a >= b ? b : a) |
| #define SKIP_PRESCALER 0 |
| TimerRc activate_t1 | ( | TimerConfig & | cfg | ) |
Activate the 16-bit timer 1 on ATMEGA2560 with a given configuration.
| cfg | Computed timer configuration with desired clock frequency. |
| void deactivate_t1 | ( | ) |
Deactivate 16-bit timer 1 on ATMEGA2560.
| const char * error_str | ( | TimerRc | rc | ) |
Retrieve a string description of a timer return code.
| rc | Return code to get its string for. |