ATmega2560
Hardware definitions
Loading...
Searching...
No Matches
Pin.h
Go to the documentation of this file.
1
5
6
#ifndef ATMEGA2560_DEFINITIONS_PIN_H
7
#define ATMEGA2560_DEFINITIONS_PIN_H
8
9
#include <stdint.h>
10
#include "
Config.h
"
11
13
namespace
atmega2560
14
{
16
namespace
pin
17
{
19
enum class
Port
: uint8_t
20
{
21
A
= 0,
22
B
= 1,
23
C
= 2,
24
D
= 3,
25
E
= 4,
26
F
= 5,
27
G
= 6,
28
H
= 7,
29
J
= 8,
30
K
= 9,
31
L
= 10,
32
};
33
34
enum class
Pin
: uint8_t
35
{
36
PA0
= 0x00,
37
PA1
= 0x01,
38
PA2
= 0x02,
39
PA3
= 0x03,
40
PA4
= 0x04,
41
PA5
= 0x05,
42
PA6
= 0x06,
43
PA7
= 0x07,
44
PB0
= 0x10,
45
PB1
= 0x11,
46
PB2
= 0x12,
47
PB3
= 0x13,
48
PB4
= 0x14,
49
PB5
= 0x15,
50
PB6
= 0x16,
51
PB7
= 0x17,
52
PC0
= 0x20,
53
PC1
= 0x21,
54
PC2
= 0x22,
55
PC3
= 0x23,
56
PC4
= 0x24,
57
PC5
= 0x25,
58
PC6
= 0x26,
59
PC7
= 0x27,
60
PD0
= 0x30,
61
PD1
= 0x31,
62
PD2
= 0x32,
63
PD3
= 0x33,
64
PD4
= 0x34,
65
PD5
= 0x35,
66
PD6
= 0x36,
67
PD7
= 0x37,
68
PE0
= 0x40,
69
PE1
= 0x41,
70
PE2
= 0x42,
71
PE3
= 0x43,
72
PE4
= 0x44,
73
PE5
= 0x45,
74
PE6
= 0x46,
75
PE7
= 0x47,
76
PF0
= 0x50,
77
PF1
= 0x51,
78
PF2
= 0x52,
79
PF3
= 0x53,
80
PF4
= 0x54,
81
PF5
= 0x55,
82
PF6
= 0x56,
83
PF7
= 0x57,
84
PG0
= 0x60,
85
PG1
= 0x61,
86
PG2
= 0x62,
87
PG3
= 0x63,
88
PG4
= 0x64,
89
PG5
= 0x65,
90
PH0
= 0x70,
91
PH1
= 0x71,
92
PH2
= 0x72,
93
PH3
= 0x73,
94
PH4
= 0x74,
95
PH5
= 0x75,
96
PH6
= 0x76,
97
PH7
= 0x77,
98
PJ0
= 0x80,
99
PJ1
= 0x81,
100
PJ2
= 0x82,
101
PJ3
= 0x83,
102
PJ4
= 0x84,
103
PJ5
= 0x85,
104
PJ6
= 0x86,
105
PJ7
= 0x87,
106
PK0
= 0x90,
107
PK1
= 0x91,
108
PK2
= 0x92,
109
PK3
= 0x93,
110
PK4
= 0x94,
111
PK5
= 0x95,
112
PK6
= 0x96,
113
PK7
= 0x97,
114
PL0
= 0xA0,
115
PL1
= 0xA1,
116
PL2
= 0xA2,
117
PL3
= 0xA3,
118
PL4
= 0xA4,
119
PL5
= 0xA5,
120
PL6
= 0xA6,
121
PL7
= 0xA7,
122
};
123
124
enum : uint8_t
125
{
126
port_shift
= 4,
127
port_mask
= 0xF0,
128
bit_mask
= 0x0F,
129
pin_count
= 86,
130
};
132
enum : uint8_t
133
{
134
port_a_code
= 0,
135
port_b_code
= 1,
136
port_c_code
= 2,
137
port_d_code
= 3,
138
port_e_code
= 4,
139
port_f_code
= 5,
140
port_g_code
= 6,
141
port_h_code
= 7,
142
port_j_code
= 8,
143
port_k_code
= 9,
144
port_l_code
= 10,
145
};
147
enum : uint8_t
148
{
149
port_a_width
= 8,
150
port_b_width
= 8,
151
port_c_width
= 8,
152
port_d_width
= 8,
153
port_e_width
= 8,
154
port_f_width
= 8,
155
port_g_width
= 6,
156
port_h_width
= 8,
157
port_j_width
= 8,
158
port_k_width
= 8,
159
port_l_width
= 8,
160
};
161
}
162
using
pin::Pin
;
163
using
pin::Port
;
164
}
165
166
#endif
Config.h
Device, package and operating-grade selection.
atmega2560::pin
Logical pin and alternate function identifiers definitions.
Definition
Pin.h:17
atmega2560::pin::Pin
Pin
Package-independent logical GPIO pins.
Definition
Pin.h:35
atmega2560::pin::Pin::PA6
@ PA6
Port A bit 6.
Definition
Pin.h:42
atmega2560::pin::Pin::PJ3
@ PJ3
Port J bit 3.
Definition
Pin.h:101
atmega2560::pin::Pin::PC6
@ PC6
Port C bit 6.
Definition
Pin.h:58
atmega2560::pin::Pin::PB5
@ PB5
Port B bit 5.
Definition
Pin.h:49
atmega2560::pin::Pin::PJ0
@ PJ0
Port J bit 0.
Definition
Pin.h:98
atmega2560::pin::Pin::PL3
@ PL3
Port L bit 3.
Definition
Pin.h:117
atmega2560::pin::Pin::PL6
@ PL6
Port L bit 6.
Definition
Pin.h:120
atmega2560::pin::Pin::PD4
@ PD4
Port D bit 4.
Definition
Pin.h:64
atmega2560::pin::Pin::PK6
@ PK6
Port K bit 6.
Definition
Pin.h:112
atmega2560::pin::Pin::PH1
@ PH1
Port H bit 1.
Definition
Pin.h:91
atmega2560::pin::Pin::PH3
@ PH3
Port H bit 3.
Definition
Pin.h:93
atmega2560::pin::Pin::PG4
@ PG4
Port G bit 4.
Definition
Pin.h:88
atmega2560::pin::Pin::PH6
@ PH6
Port H bit 6.
Definition
Pin.h:96
atmega2560::pin::Pin::PC3
@ PC3
Port C bit 3.
Definition
Pin.h:55
atmega2560::pin::Pin::PH4
@ PH4
Port H bit 4.
Definition
Pin.h:94
atmega2560::pin::Pin::PF3
@ PF3
Port F bit 3.
Definition
Pin.h:79
atmega2560::pin::Pin::PL5
@ PL5
Port L bit 5.
Definition
Pin.h:119
atmega2560::pin::Pin::PL2
@ PL2
Port L bit 2.
Definition
Pin.h:116
atmega2560::pin::Pin::PC0
@ PC0
Port C bit 0.
Definition
Pin.h:52
atmega2560::pin::Pin::PB7
@ PB7
Port B bit 7.
Definition
Pin.h:51
atmega2560::pin::Pin::PC2
@ PC2
Port C bit 2.
Definition
Pin.h:54
atmega2560::pin::Pin::PL1
@ PL1
Port L bit 1.
Definition
Pin.h:115
atmega2560::pin::Pin::PB3
@ PB3
Port B bit 3.
Definition
Pin.h:47
atmega2560::pin::Pin::PG3
@ PG3
Port G bit 3.
Definition
Pin.h:87
atmega2560::pin::Pin::PL0
@ PL0
Port L bit 0.
Definition
Pin.h:114
atmega2560::pin::Pin::PF5
@ PF5
Port F bit 5.
Definition
Pin.h:81
atmega2560::pin::Pin::PK7
@ PK7
Port K bit 7.
Definition
Pin.h:113
atmega2560::pin::Pin::PF2
@ PF2
Port F bit 2.
Definition
Pin.h:78
atmega2560::pin::Pin::PJ5
@ PJ5
Port J bit 5.
Definition
Pin.h:103
atmega2560::pin::Pin::PH2
@ PH2
Port H bit 2.
Definition
Pin.h:92
atmega2560::pin::Pin::PA2
@ PA2
Port A bit 2.
Definition
Pin.h:38
atmega2560::pin::Pin::PE5
@ PE5
Port E bit 5.
Definition
Pin.h:73
atmega2560::pin::Pin::PH7
@ PH7
Port H bit 7.
Definition
Pin.h:97
atmega2560::pin::Pin::PD7
@ PD7
Port D bit 7.
Definition
Pin.h:67
atmega2560::pin::Pin::PK0
@ PK0
Port K bit 0.
Definition
Pin.h:106
atmega2560::pin::Pin::PJ2
@ PJ2
Port J bit 2.
Definition
Pin.h:100
atmega2560::pin::Pin::PD0
@ PD0
Port D bit 0.
Definition
Pin.h:60
atmega2560::pin::Pin::PB0
@ PB0
Port B bit 0.
Definition
Pin.h:44
atmega2560::pin::Pin::PE6
@ PE6
Port E bit 6.
Definition
Pin.h:74
atmega2560::pin::Pin::PA0
@ PA0
Port A bit 0.
Definition
Pin.h:36
atmega2560::pin::Pin::PC7
@ PC7
Port C bit 7.
Definition
Pin.h:59
atmega2560::pin::Pin::PD6
@ PD6
Port D bit 6.
Definition
Pin.h:66
atmega2560::pin::Pin::PE7
@ PE7
Port E bit 7.
Definition
Pin.h:75
atmega2560::pin::Pin::PF4
@ PF4
Port F bit 4.
Definition
Pin.h:80
atmega2560::pin::Pin::PH5
@ PH5
Port H bit 5.
Definition
Pin.h:95
atmega2560::pin::Pin::PB6
@ PB6
Port B bit 6.
Definition
Pin.h:50
atmega2560::pin::Pin::PE3
@ PE3
Port E bit 3.
Definition
Pin.h:71
atmega2560::pin::Pin::PE1
@ PE1
Port E bit 1.
Definition
Pin.h:69
atmega2560::pin::Pin::PJ7
@ PJ7
Port J bit 7.
Definition
Pin.h:105
atmega2560::pin::Pin::PC4
@ PC4
Port C bit 4.
Definition
Pin.h:56
atmega2560::pin::Pin::PC1
@ PC1
Port C bit 1.
Definition
Pin.h:53
atmega2560::pin::Pin::PL4
@ PL4
Port L bit 4.
Definition
Pin.h:118
atmega2560::pin::Pin::PG0
@ PG0
Port G bit 0.
Definition
Pin.h:84
atmega2560::pin::Pin::PB2
@ PB2
Port B bit 2.
Definition
Pin.h:46
atmega2560::pin::Pin::PA1
@ PA1
Port A bit 1.
Definition
Pin.h:37
atmega2560::pin::Pin::PD3
@ PD3
Port D bit 3.
Definition
Pin.h:63
atmega2560::pin::Pin::PF0
@ PF0
Port F bit 0.
Definition
Pin.h:76
atmega2560::pin::Pin::PA4
@ PA4
Port A bit 4.
Definition
Pin.h:40
atmega2560::pin::Pin::PG2
@ PG2
Port G bit 2.
Definition
Pin.h:86
atmega2560::pin::Pin::PA7
@ PA7
Port A bit 7.
Definition
Pin.h:43
atmega2560::pin::Pin::PK2
@ PK2
Port K bit 2.
Definition
Pin.h:108
atmega2560::pin::Pin::PK4
@ PK4
Port K bit 4.
Definition
Pin.h:110
atmega2560::pin::Pin::PA5
@ PA5
Port A bit 5.
Definition
Pin.h:41
atmega2560::pin::Pin::PE4
@ PE4
Port E bit 4.
Definition
Pin.h:72
atmega2560::pin::Pin::PK3
@ PK3
Port K bit 3.
Definition
Pin.h:109
atmega2560::pin::Pin::PE0
@ PE0
Port E bit 0.
Definition
Pin.h:68
atmega2560::pin::Pin::PK1
@ PK1
Port K bit 1.
Definition
Pin.h:107
atmega2560::pin::Pin::PB4
@ PB4
Port B bit 4.
Definition
Pin.h:48
atmega2560::pin::Pin::PJ6
@ PJ6
Port J bit 6.
Definition
Pin.h:104
atmega2560::pin::Pin::PL7
@ PL7
Port L bit 7.
Definition
Pin.h:121
atmega2560::pin::Pin::PD1
@ PD1
Port D bit 1.
Definition
Pin.h:61
atmega2560::pin::Pin::PJ1
@ PJ1
Port J bit 1.
Definition
Pin.h:99
atmega2560::pin::Pin::PH0
@ PH0
Port H bit 0.
Definition
Pin.h:90
atmega2560::pin::Pin::PJ4
@ PJ4
Port J bit 4.
Definition
Pin.h:102
atmega2560::pin::Pin::PC5
@ PC5
Port C bit 5.
Definition
Pin.h:57
atmega2560::pin::Pin::PG1
@ PG1
Port G bit 1.
Definition
Pin.h:85
atmega2560::pin::Pin::PF7
@ PF7
Port F bit 7.
Definition
Pin.h:83
atmega2560::pin::Pin::PD2
@ PD2
Port D bit 2.
Definition
Pin.h:62
atmega2560::pin::Pin::PK5
@ PK5
Port K bit 5.
Definition
Pin.h:111
atmega2560::pin::Pin::PF1
@ PF1
Port F bit 1.
Definition
Pin.h:77
atmega2560::pin::Pin::PA3
@ PA3
Port A bit 3.
Definition
Pin.h:39
atmega2560::pin::Pin::PD5
@ PD5
Port D bit 5.
Definition
Pin.h:65
atmega2560::pin::Pin::PF6
@ PF6
Port F bit 6.
Definition
Pin.h:82
atmega2560::pin::Pin::PG5
@ PG5
Port G bit 5.
Definition
Pin.h:89
atmega2560::pin::Pin::PE2
@ PE2
Port E bit 2.
Definition
Pin.h:70
atmega2560::pin::Pin::PB1
@ PB1
Port B bit 1.
Definition
Pin.h:45
atmega2560::pin::port_b_width
@ port_b_width
Port B width.
Definition
Pin.h:150
atmega2560::pin::port_d_width
@ port_d_width
Port D width.
Definition
Pin.h:152
atmega2560::pin::port_l_width
@ port_l_width
Port L width.
Definition
Pin.h:159
atmega2560::pin::port_h_width
@ port_h_width
Port H width.
Definition
Pin.h:156
atmega2560::pin::port_a_width
@ port_a_width
Port A width.
Definition
Pin.h:149
atmega2560::pin::port_f_width
@ port_f_width
Port F width.
Definition
Pin.h:154
atmega2560::pin::port_k_width
@ port_k_width
Port K width.
Definition
Pin.h:158
atmega2560::pin::port_e_width
@ port_e_width
Port E width.
Definition
Pin.h:153
atmega2560::pin::port_g_width
@ port_g_width
Port G width.
Definition
Pin.h:155
atmega2560::pin::port_j_width
@ port_j_width
Port J width.
Definition
Pin.h:157
atmega2560::pin::port_c_width
@ port_c_width
Port C width.
Definition
Pin.h:151
atmega2560::pin::port_f_code
@ port_f_code
Port F code.
Definition
Pin.h:139
atmega2560::pin::port_e_code
@ port_e_code
Port E code.
Definition
Pin.h:138
atmega2560::pin::port_h_code
@ port_h_code
Port H code.
Definition
Pin.h:141
atmega2560::pin::port_b_code
@ port_b_code
Port B code.
Definition
Pin.h:135
atmega2560::pin::port_l_code
@ port_l_code
Port L code.
Definition
Pin.h:144
atmega2560::pin::port_k_code
@ port_k_code
Port K code.
Definition
Pin.h:143
atmega2560::pin::port_g_code
@ port_g_code
Port G code.
Definition
Pin.h:140
atmega2560::pin::port_j_code
@ port_j_code
Port J code.
Definition
Pin.h:142
atmega2560::pin::port_c_code
@ port_c_code
Port C code.
Definition
Pin.h:136
atmega2560::pin::port_d_code
@ port_d_code
Port D code.
Definition
Pin.h:137
atmega2560::pin::port_a_code
@ port_a_code
Port A code.
Definition
Pin.h:134
atmega2560::pin::Port
Port
GPIO ports.
Definition
Pin.h:20
atmega2560::pin::Port::C
@ C
GPIO port C.
Definition
Pin.h:23
atmega2560::pin::Port::E
@ E
GPIO port E.
Definition
Pin.h:25
atmega2560::pin::Port::A
@ A
GPIO port A.
Definition
Pin.h:21
atmega2560::pin::Port::F
@ F
GPIO port F.
Definition
Pin.h:26
atmega2560::pin::Port::B
@ B
GPIO port B.
Definition
Pin.h:22
atmega2560::pin::Port::K
@ K
GPIO port K.
Definition
Pin.h:30
atmega2560::pin::Port::H
@ H
GPIO port H.
Definition
Pin.h:28
atmega2560::pin::Port::L
@ L
GPIO port L.
Definition
Pin.h:31
atmega2560::pin::Port::G
@ G
GPIO port G.
Definition
Pin.h:27
atmega2560::pin::Port::D
@ D
GPIO port D.
Definition
Pin.h:24
atmega2560::pin::Port::J
@ J
GPIO port J.
Definition
Pin.h:29
atmega2560::pin::port_shift
@ port_shift
port shift.
Definition
Pin.h:126
atmega2560::pin::bit_mask
@ bit_mask
bit mask.
Definition
Pin.h:128
atmega2560::pin::pin_count
@ pin_count
pin count.
Definition
Pin.h:129
atmega2560::pin::port_mask
@ port_mask
port mask.
Definition
Pin.h:127
atmega2560
ATmega2560 hardware definitions.
Definition
ADC.h:15
include
atmega2560
Pin.h
Generated by
1.15.0