22#define TIMER_COUNTER_1_PRESCALER (8)
27#define COMPARE_MATCH_REGISTER_VALUE \
28 ((uint16_t)((LZ_CONFIG_MACHINE_CLOCK_FREQUENCY / \
29 (TIMER_COUNTER_1_PRESCALER * \
30 LZ_CONFIG_SYSTEM_CLOCK_RESOLUTION_FREQUENCY)) - 1)) \
unsigned int uint16_t
Represents a unsigned integer type with width of exactly 16 bits.
#define HI8(X)
Take the high byte of a 16-bit value.
#define LO8(X)
Take the low byte of a 16-bit value.
Include appropriate config file.
void Arch_InitSystemTimer(void)
Initialize the system timer.
void Arch_StartSystemTimer(void)
Start the system timer.
#define COMPARE_MATCH_REGISTER_VALUE
Value of the compare match register with the desired clock settings.
Interface for Timer/Counter 1 of the ATMega328p.
#define TCCR1B
Timer/Counter1 Control Register B.
#define TCNT1H
Timer/Counter1 (High register)
#define TCNT1L
Timer/Counter1 (Low register)
@ TCCR1B_CS11
Clock select
@ TCCR1B_WGM12
Waveform generation mode
#define OCR1AL
Output Compare Register 1 A (Low register)
#define TCCR1A
Timer/Counter1 Control Register A.
#define OCR1AH
Output Compare Register 1 A (High register)
#define TIFR1
Timer/Counter 1 Interrupt Flag Register.
@ TIMSK1_OCIE1A
Output compare A match interrupt enable.
#define TIMSK1
Timer/Counter 1 Interrupt Mask Register.