arduino_hal/port/uno.rs
1pub use atmega_hal::port::{mode, Pin, PinMode, PinOps};
2
3avr_hal_generic::renamed_pins! {
4 /// Pins of the **Arduino Uno**, **Arduino Nano**, **SparkFun ProMini 3.3V (8Mhz)**, and **SparkFun ProMini 5V (16MHz)**.
5 ///
6 /// This struct is best initialized via the [`arduino_hal::pins!()`][crate::pins] macro.
7 pub struct Pins {
8 /// `A0`
9 ///
10 /// * ADC0 (ADC input channel 0)
11 /// * PCINT8 (pin change interrupt 8)
12 pub a0: atmega_hal::port::PC0 = pc0,
13 /// `A1`
14 ///
15 /// * ADC1 (ADC input channel 1)
16 /// * PCINT9 (pin change interrupt 9)
17 pub a1: atmega_hal::port::PC1 = pc1,
18 /// `A2`
19 ///
20 /// * ADC2 (ADC input channel 2)
21 /// * PCINT10 (pin change interrupt 10)
22 pub a2: atmega_hal::port::PC2 = pc2,
23 /// `A3`
24 ///
25 /// * ADC3 (ADC input channel 3)
26 /// * PCINT11 (pin change interrupt 11)
27 pub a3: atmega_hal::port::PC3 = pc3,
28 /// `A4`
29 ///
30 /// * ADC4 (ADC input channel 4)
31 /// * SDA (2-wire serial bus data input/output line)
32 /// * PCINT12 (pin change interrupt 12)
33 pub a4: atmega_hal::port::PC4 = pc4,
34 /// `A5`
35 ///
36 /// ADC5 (ADC input channel 5)
37 /// SCL (2-wire serial bus clock line)
38 /// PCINT13 (pin change interrupt 13)
39 pub a5: atmega_hal::port::PC5 = pc5,
40
41 /// `D0` / `RX`
42 ///
43 /// * RXD (USART input pin)
44 /// * PCINT16 (pin change interrupt 16)
45 pub d0: atmega_hal::port::PD0 = pd0,
46 /// `D1` / `TX`
47 ///
48 /// * TXD (USART output pin)
49 /// * PCINT17 (pin change interrupt 17)
50 pub d1: atmega_hal::port::PD1 = pd1,
51 /// `D2`
52 ///
53 /// * INT0 (external interrupt 0 input)
54 /// * PCINT18 (pin change interrupt 18)
55 pub d2: atmega_hal::port::PD2 = pd2,
56 /// `D3`
57 ///
58 /// * **PWM**: [atmega328p_hal::timer::Timer3Pwm]
59 /// * INT1 (external interrupt 1 input)
60 /// * OC2B (Timer/Counter2 output compare match B output)
61 /// * PCINT19 (pin change interrupt 19)
62 pub d3: atmega_hal::port::PD3 = pd3,
63 /// `D4`
64 ///
65 /// * XCK (USART external clock input/output)
66 /// * T0 (Timer/Counter 0 external counter input)
67 /// * PCINT20 (pin change interrupt 20)
68 pub d4: atmega_hal::port::PD4 = pd4,
69 /// `D5`
70 ///
71 /// * **PWM**: [atmega328p_hal::timer::Timer3Pwm]
72 /// * T1 (Timer/Counter 1 external counter input)
73 /// * OC0B (Timer/Counter0 output compare match B output)
74 /// * PCINT21 (pin change interrupt 21)
75 pub d5: atmega_hal::port::PD5 = pd5,
76 /// `D6`
77 ///
78 /// * **PWM**: [atmega328p_hal::timer::Timer3Pwm]
79 /// * AIN0 (analog comparator positive input)
80 /// * OC0A (Timer/Counter0 output compare match A output)
81 /// * PCINT22 (pin change interrupt 22)
82 pub d6: atmega_hal::port::PD6 = pd6,
83 /// `D7`
84 ///
85 /// * AIN1 (analog comparator negative input)
86 /// * PCINT23 (pin change interrupt 23)
87 pub d7: atmega_hal::port::PD7 = pd7,
88 /// `D8`
89 ///
90 /// * ICP1 (Timer/Counter1 input capture input)
91 /// * CLKO (divided system clock output)
92 /// * PCINT0 (pin change interrupt 0)
93 pub d8: atmega_hal::port::PB0 = pb0,
94 /// `D9`
95 ///
96 /// * **PWM**: [atmega328p_hal::timer::Timer3Pwm]
97 /// * OC1A (Timer/Counter1 output compare match A output)
98 /// * PCINT1 (pin change interrupt 1)
99 pub d9: atmega_hal::port::PB1 = pb1,
100 /// `D10`
101 ///
102 /// * **PWM**: [atmega328p_hal::timer::Timer3Pwm]
103 /// * SS (SPI bus master slave select)
104 /// * OC1B (Timer/Counter1 output compare match B output)
105 /// * PCINT2 (pin change interrupt 2)
106 pub d10: atmega_hal::port::PB2 = pb2,
107 /// `D11`
108 ///
109 /// * **PWM**: [atmega328p_hal::timer::Timer3Pwm]
110 /// * MOSI (SPI bus master/slave input)
111 /// * OC2A (Timer/Counter2 output compare match A output)
112 /// * PCINT3 (pin change interrupt 3)
113 pub d11: atmega_hal::port::PB3 = pb3,
114 /// `D12`
115 ///
116 /// * MISO (SPI bus master input/slave output)
117 /// * PCINT4 (pin change interrupt 4)
118 pub d12: atmega_hal::port::PB4 = pb4,
119 /// `D13`
120 ///
121 /// * SCK (SPI bus master clock input)
122 /// * PCINT5 (pin change interrupt 5)
123 /// * L LED on Arduino Uno
124 pub d13: atmega_hal::port::PB5 = pb5,
125 }
126
127 impl Pins {
128 type Pin = Pin;
129 type McuPins = atmega_hal::Pins;
130 }
131}