Lazuli
Loading...
Searching...
No Matches
timer_counter_1.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-3.0-only
3 * This file is part of Lazuli.
4 */
5
15#ifndef LAZULI_SYS_ARCH_AVR_TIMER_COUNTER_1_H
16#define LAZULI_SYS_ARCH_AVR_TIMER_COUNTER_1_H
17
18#include <stdint.h>
19
20#include <Lazuli/common.h>
21
23
32#define TCCR1A DIRECT(0x80)
33
35#define TCCR1B DIRECT(0x81)
36
38#define TCCR1C DIRECT(0x82)
39
41#define TCNT1L DIRECT(0x84)
42
44#define TCNT1H DIRECT(0x85)
45
47#define TCNT1 DIRECT_T(0x84, uint16_t)
48
50#define ICR1L DIRECT(0x86)
51
53#define ICR1H DIRECT(0x87)
54
56#define OCR1AL DIRECT(0x88)
57
59#define OCR1AH DIRECT(0x89)
60
62#define OCR1BL DIRECT(0x8a)
63
65#define OCR1BH DIRECT(0x8b)
66
68#define TIMSK1 DIRECT(0x6f)
69
71#define TIFR1 DIRECT(0x36)
72
84enum {
91};
92
96enum {
105
109enum {
113
117enum {
123
127enum {
131 TIFR1_ICF1 = POSITION(5U)
133
137
138#endif /* LAZULI_SYS_ARCH_AVR_TIMER_COUNTER_1_H */
Basic type definitions and useful macros.
#define _EXTERN_C_DECL_BEGIN
Open C++ header file declarations.
Definition common.h:39
#define _EXTERN_C_DECL_END
Close C++ header file declarations.
Definition common.h:44
#define POSITION(X)
Define a constant bit at position X, starting from index 0.
Definition common_asm.h:30
@ TCCR1C_FOC1A
Force output compare for channel B.
@ TCCR1C_FOC1B
Force output compare for channel A.
@ TCCR1A_COM1A0
Compare output mode for Channel A.
@ TCCR1A_COM1B0
Compare output mode for Channel B.
@ TCCR1A_WGM11
Waveform generation mode
@ TCCR1A_WGM10
Waveform generation mode
@ TCCR1A_COM1B1
Compare output mode for Channel B.
@ TCCR1A_COM1A1
Compare output mode for Channel A.
@ TCCR1B_CS11
Clock select
@ TCCR1B_CS12
Clock select
@ TCCR1B_WGM12
Waveform generation mode
@ TCCR1B_CS10
Clock select
@ TCCR1B_ICES1
Input capture edge select
@ TCCR1B_WGM13
Waveform generation mode
@ TCCR1B_ICNC1
Input capture noise canceller.
@ TIFR1_TOV1
Overflow flag
@ TIFR1_OCF1B
Output compare B match flag.
@ TIFR1_ICF1
Input capture flag
@ TIFR1_OCF1A
Output compare A match flag.
@ TIMSK1_ICIE1
Input capture enable
@ TIMSK1_OCIE1A
Output compare A match interrupt enable.
@ TIMSK1_TOIE1
Overflow interrupt enable
@ TIMSK1_OCIE1B
Output compare B match interrupt enable.