Lazuli
Loading...
Searching...
No Matches
registers.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
14#ifndef LAZULI_SYS_ARCH_AVR_REGISTERS_H
15#define LAZULI_SYS_ARCH_AVR_REGISTERS_H
16
17#include <Lazuli/common.h>
18
19/*
20 * General register definitions.
21 * Ordered by address value.
22 */
23
25#define PINB DIRECT(0x23)
26
28#define DDRB DIRECT(0x24)
29
31#define PORTB DIRECT(0x25)
32
34#define PINC DIRECT(0x26)
35
37#define DDRC DIRECT(0x27)
38
40#define PORTC DIRECT(0x28)
41
43#define PIND DIRECT(0x29)
44
46#define DDRD DIRECT(0x2a)
47
49#define PORTD DIRECT(0x2b)
50
52#define EIFR DIRECT(0x3c)
53
55#define EIMSK DIRECT(0x3d)
56
58#define SMCR DIRECT(0x53)
59
61#define MCUCR DIRECT(0x55)
62
64#define SP DIRECT_T(0x5d, void*)
65
67#define PRR DIRECT(0x64)
68
70#define EICRA DIRECT(0x69)
71
72
73/*
74 * Register content definitions.
75 * Aliases on bit position for some registers.
76 */
77
81enum {
84 PRR_PRSPI = POSITION(2U),
89 PRR_PRTWI = POSITION(7U)
90};
91
92#endif /* LAZULI_SYS_ARCH_AVR_REGISTERS_H */
Basic type definitions and useful macros.
#define POSITION(X)
Define a constant bit at position X, starting from index 0.
Definition common_asm.h:30
@ PRR_PRTIM2
Power Reduction Timer/Counter 2
Definition registers.h:88
@ PRR_PRADC
Power Reduction ADC
Definition registers.h:82
@ PRR_PRTIM0
Power Reduction Timer/Counter 0
Definition registers.h:87
@ PRR_PRTWI
Power Reduction TWI
Definition registers.h:89
@ PRR_PRUSART0
Power Reduction USART0
Definition registers.h:83
@ PRR_PRTIM1
Power Reduction Timer/Counter 1
Definition registers.h:86
@ PRR_PRSPI
Power Reduction Serial Peripheral Interface
Definition registers.h:84