aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-09-18 01:33:55 +0000
committerGitHub <[email protected]>2023-09-18 01:33:55 +0000
commit183824fbddb2a05aed4ed854f6eb08fe4ba7e7c1 (patch)
tree9719bff837e19dd39a88a68ef8d130147e439f45
parentfdfe12fe1c043e2db17c6ea7c05cf700db0a90b0 (diff)
parent5d0c40f61d4a58614f3e489bc366a87da3757457 (diff)
Merge pull request #1924 from embassy-rs/rp-remove-paste
rp: remove paste macro.
-rw-r--r--embassy-rp/Cargo.toml1
-rw-r--r--embassy-rp/src/pio.rs41
2 files changed, 33 insertions, 9 deletions
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index 094b528f2..1147286fc 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -89,7 +89,6 @@ embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional =
89embedded-hal-async = { version = "=1.0.0-rc.1", optional = true} 89embedded-hal-async = { version = "=1.0.0-rc.1", optional = true}
90embedded-hal-nb = { version = "=1.0.0-rc.1", optional = true} 90embedded-hal-nb = { version = "=1.0.0-rc.1", optional = true}
91 91
92paste = "1.0"
93pio-proc = {version= "0.2" } 92pio-proc = {version= "0.2" }
94pio = {version= "0.2.1" } 93pio = {version= "0.2.1" }
95rp2040-boot2 = "0.3" 94rp2040-boot2 = "0.3"
diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs
index c09d09143..97dfce2e6 100644
--- a/embassy-rp/src/pio.rs
+++ b/embassy-rp/src/pio.rs
@@ -1079,18 +1079,43 @@ impl_pio!(PIO1, 1, PIO1, PIO1_0, PIO1_IRQ_0);
1079pub trait PioPin: sealed::PioPin + gpio::Pin {} 1079pub trait PioPin: sealed::PioPin + gpio::Pin {}
1080 1080
1081macro_rules! impl_pio_pin { 1081macro_rules! impl_pio_pin {
1082 ($( $num:tt )*) => { 1082 ($( $pin:ident, )*) => {
1083 $( 1083 $(
1084 paste::paste!{ 1084 impl sealed::PioPin for peripherals::$pin {}
1085 impl sealed::PioPin for peripherals::[< PIN_ $num >] {} 1085 impl PioPin for peripherals::$pin {}
1086 impl PioPin for peripherals::[< PIN_ $num >] {}
1087 }
1088 )* 1086 )*
1089 }; 1087 };
1090} 1088}
1091 1089
1092impl_pio_pin! { 1090impl_pio_pin! {
1093 0 1 2 3 4 5 6 7 8 9 1091 PIN_0,
1094 10 11 12 13 14 15 16 17 18 19 1092 PIN_1,
1095 20 21 22 23 24 25 26 27 28 29 1093 PIN_2,
1094 PIN_3,
1095 PIN_4,
1096 PIN_5,
1097 PIN_6,
1098 PIN_7,
1099 PIN_8,
1100 PIN_9,
1101 PIN_10,
1102 PIN_11,
1103 PIN_12,
1104 PIN_13,
1105 PIN_14,
1106 PIN_15,
1107 PIN_16,
1108 PIN_17,
1109 PIN_18,
1110 PIN_19,
1111 PIN_20,
1112 PIN_21,
1113 PIN_22,
1114 PIN_23,
1115 PIN_24,
1116 PIN_25,
1117 PIN_26,
1118 PIN_27,
1119 PIN_28,
1120 PIN_29,
1096} 1121}