attiny_hal/
port.rs
1pub use avr_hal_generic::port::{mode, PinMode, PinOps};
21
22#[cfg(feature = "attiny2313")]
23avr_hal_generic::impl_port_traditional! {
24 enum Ports {
25 A: crate::pac::PORTA = [0, 1, 2],
26 B: crate::pac::PORTB = [0, 1, 2, 3, 4, 5, 6, 7],
27 D: crate::pac::PORTD = [0, 1, 2, 3, 4, 5, 6],
28 }
29}
30
31#[cfg(feature = "attiny167")]
32avr_hal_generic::impl_port_traditional! {
33 enum Ports {
34 A: crate::pac::PORTA = [0, 1, 2, 3, 4, 5, 6, 7],
35 B: crate::pac::PORTB = [0, 1, 2, 3, 4, 5, 6, 7],
36 }
37}
38
39#[cfg(feature = "attiny84")]
40avr_hal_generic::impl_port_traditional! {
41 enum Ports {
42 A: crate::pac::PORTA = [0, 1, 2, 3, 4, 5, 6, 7],
43 B: crate::pac::PORTB = [0, 1, 2, 3],
44 }
45}
46
47#[cfg(feature = "attiny85")]
48avr_hal_generic::impl_port_traditional! {
49 enum Ports {
50 B: crate::pac::PORTB = [0, 1, 2, 3, 4, 5],
51 }
52}
53
54#[cfg(feature = "attiny88")]
55avr_hal_generic::impl_port_traditional! {
56 enum Ports {
57 A: crate::pac::PORTA = [0, 1, 2, 3],
58 B: crate::pac::PORTB = [0, 1, 2, 3, 4, 5, 6, 7],
59 C: crate::pac::PORTC = [0, 1, 2, 3, 4, 5, 6, 7],
60 D: crate::pac::PORTD = [0, 1, 2, 3, 4, 5, 6, 7],
61 }
62}