Struct arduino_hal::port::Pins
source · pub struct Pins {Show 20 fields
pub a0: Pin<Input<Floating>, PC0>,
pub a1: Pin<Input<Floating>, PC1>,
pub a2: Pin<Input<Floating>, PC2>,
pub a3: Pin<Input<Floating>, PC3>,
pub a4: Pin<Input<Floating>, PC4>,
pub a5: Pin<Input<Floating>, PC5>,
pub d0: Pin<Input<Floating>, PD0>,
pub d1: Pin<Input<Floating>, PD1>,
pub d2: Pin<Input<Floating>, PD2>,
pub d3: Pin<Input<Floating>, PD3>,
pub d4: Pin<Input<Floating>, PD4>,
pub d5: Pin<Input<Floating>, PD5>,
pub d6: Pin<Input<Floating>, PD6>,
pub d7: Pin<Input<Floating>, PD7>,
pub d8: Pin<Input<Floating>, PB0>,
pub d9: Pin<Input<Floating>, PB1>,
pub d10: Pin<Input<Floating>, PB2>,
pub d11: Pin<Input<Floating>, PB3>,
pub d12: Pin<Input<Floating>, PB4>,
pub d13: Pin<Input<Floating>, PB5>,
}
Expand description
Pins of the Arduino Uno, Arduino Nano, SparkFun ProMini 3.3V (8Mhz), and SparkFun ProMini 5V (16MHz).
This struct is best initialized via the arduino_hal::pins!()
macro.
Fields§
§a0: Pin<Input<Floating>, PC0>
A0
- ADC0 (ADC input channel 0)
- PCINT8 (pin change interrupt 8)
a1: Pin<Input<Floating>, PC1>
A1
- ADC1 (ADC input channel 1)
- PCINT9 (pin change interrupt 9)
a2: Pin<Input<Floating>, PC2>
A2
- ADC2 (ADC input channel 2)
- PCINT10 (pin change interrupt 10)
a3: Pin<Input<Floating>, PC3>
A3
- ADC3 (ADC input channel 3)
- PCINT11 (pin change interrupt 11)
a4: Pin<Input<Floating>, PC4>
A4
- ADC4 (ADC input channel 4)
- SDA (2-wire serial bus data input/output line)
- PCINT12 (pin change interrupt 12)
a5: Pin<Input<Floating>, PC5>
A5
ADC5 (ADC input channel 5) SCL (2-wire serial bus clock line) PCINT13 (pin change interrupt 13)
d0: Pin<Input<Floating>, PD0>
D0
/ RX
- RXD (USART input pin)
- PCINT16 (pin change interrupt 16)
d1: Pin<Input<Floating>, PD1>
D1
/ TX
- TXD (USART output pin)
- PCINT17 (pin change interrupt 17)
d2: Pin<Input<Floating>, PD2>
D2
- INT0 (external interrupt 0 input)
- PCINT18 (pin change interrupt 18)
d3: Pin<Input<Floating>, PD3>
D3
- PWM: [atmega328p_hal::timer::Timer3Pwm]
- INT1 (external interrupt 1 input)
- OC2B (Timer/Counter2 output compare match B output)
- PCINT19 (pin change interrupt 19)
d4: Pin<Input<Floating>, PD4>
D4
- XCK (USART external clock input/output)
- T0 (Timer/Counter 0 external counter input)
- PCINT20 (pin change interrupt 20)
d5: Pin<Input<Floating>, PD5>
D5
- PWM: [atmega328p_hal::timer::Timer3Pwm]
- T1 (Timer/Counter 1 external counter input)
- OC0B (Timer/Counter0 output compare match B output)
- PCINT21 (pin change interrupt 21)
d6: Pin<Input<Floating>, PD6>
D6
- PWM: [atmega328p_hal::timer::Timer3Pwm]
- AIN0 (analog comparator positive input)
- OC0A (Timer/Counter0 output compare match A output)
- PCINT22 (pin change interrupt 22)
d7: Pin<Input<Floating>, PD7>
D7
- AIN1 (analog comparator negative input)
- PCINT23 (pin change interrupt 23)
d8: Pin<Input<Floating>, PB0>
D8
- ICP1 (Timer/Counter1 input capture input)
- CLKO (divided system clock output)
- PCINT0 (pin change interrupt 0)
d9: Pin<Input<Floating>, PB1>
D9
- PWM: [atmega328p_hal::timer::Timer3Pwm]
- OC1A (Timer/Counter1 output compare match A output)
- PCINT1 (pin change interrupt 1)
d10: Pin<Input<Floating>, PB2>
D10
- PWM: [atmega328p_hal::timer::Timer3Pwm]
- SS (SPI bus master slave select)
- OC1B (Timer/Counter1 output compare match B output)
- PCINT2 (pin change interrupt 2)
d11: Pin<Input<Floating>, PB3>
D11
- PWM: [atmega328p_hal::timer::Timer3Pwm]
- MOSI (SPI bus master/slave input)
- OC2A (Timer/Counter2 output compare match A output)
- PCINT3 (pin change interrupt 3)
d12: Pin<Input<Floating>, PB4>
D12
- MISO (SPI bus master input/slave output)
- PCINT4 (pin change interrupt 4)
d13: Pin<Input<Floating>, PB5>
D13
- SCK (SPI bus master clock input)
- PCINT5 (pin change interrupt 5)
- L LED on Arduino Uno
Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Pins
impl Send for Pins
impl Sync for Pins
impl Unpin for Pins
impl UnwindSafe for Pins
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more