aboutsummaryrefslogtreecommitdiff
path: root/tests/rp/src/bin/gpio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rp/src/bin/gpio.rs')
-rw-r--r--tests/rp/src/bin/gpio.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/rp/src/bin/gpio.rs b/tests/rp/src/bin/gpio.rs
index e0c309887..6c37ac5be 100644
--- a/tests/rp/src/bin/gpio.rs
+++ b/tests/rp/src/bin/gpio.rs
@@ -1,10 +1,15 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#[cfg(feature = "rp2040")]
3teleprobe_meta::target!(b"rpi-pico"); 4teleprobe_meta::target!(b"rpi-pico");
5#[cfg(feature = "rp235xb")]
6teleprobe_meta::target!(b"pimoroni-pico-plus-2");
4 7
5use defmt::{assert, *}; 8use defmt::{assert, *};
6use embassy_executor::Spawner; 9use embassy_executor::Spawner;
7use embassy_rp::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull}; 10#[cfg(feature = "rp2040")]
11use embassy_rp::gpio::OutputOpenDrain;
12use embassy_rp::gpio::{Flex, Input, Level, Output, Pull};
8use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
9 14
10#[embassy_executor::main] 15#[embassy_executor::main]
@@ -76,6 +81,7 @@ async fn main(_spawner: Spawner) {
76 } 81 }
77 82
78 // Test input pulldown 83 // Test input pulldown
84 #[cfg(feature = "rp2040")]
79 { 85 {
80 let b = Input::new(&mut b, Pull::Down); 86 let b = Input::new(&mut b, Pull::Down);
81 delay(); 87 delay();
@@ -104,6 +110,7 @@ async fn main(_spawner: Spawner) {
104 } 110 }
105 111
106 // OUTPUT OPEN DRAIN 112 // OUTPUT OPEN DRAIN
113 #[cfg(feature = "rp2040")]
107 { 114 {
108 let mut b = OutputOpenDrain::new(&mut b, Level::High); 115 let mut b = OutputOpenDrain::new(&mut b, Level::High);
109 let mut a = Flex::new(&mut a); 116 let mut a = Flex::new(&mut a);
@@ -202,6 +209,7 @@ async fn main(_spawner: Spawner) {
202 } 209 }
203 210
204 // Test input pulldown 211 // Test input pulldown
212 #[cfg(feature = "rp2040")]
205 { 213 {
206 let mut b = Flex::new(&mut b); 214 let mut b = Flex::new(&mut b);
207 b.set_as_input(); 215 b.set_as_input();