aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-rp/src/gpio.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs
index a0328302a..9b9a08110 100644
--- a/embassy-rp/src/gpio.rs
+++ b/embassy-rp/src/gpio.rs
@@ -159,7 +159,7 @@ unsafe fn IO_IRQ_BANK0() {
159 w.set_edge_low(pin_group, false); 159 w.set_edge_low(pin_group, false);
160 } 160 }
161 InterruptTrigger::LevelHigh => { 161 InterruptTrigger::LevelHigh => {
162 debug!("IO_IRQ_BANK0 pin {} LevelHigh triggered\n", pin); 162 debug!("IO_IRQ_BANK0 pin {} LevelHigh triggered", pin);
163 w.set_level_high(pin_group, false); 163 w.set_level_high(pin_group, false);
164 } 164 }
165 InterruptTrigger::LevelLow => { 165 InterruptTrigger::LevelLow => {
@@ -198,7 +198,7 @@ impl<'d, T: Pin> InputFuture<'d, T> {
198 critical_section::with(|_| { 198 critical_section::with(|_| {
199 pin.int_proc().inte((pin.pin() / 8) as usize).modify(|w| match level { 199 pin.int_proc().inte((pin.pin() / 8) as usize).modify(|w| match level {
200 InterruptTrigger::LevelHigh => { 200 InterruptTrigger::LevelHigh => {
201 debug!("InputFuture::new enable LevelHigh for pin {} \n", pin.pin()); 201 debug!("InputFuture::new enable LevelHigh for pin {}", pin.pin());
202 w.set_level_high(pin_group, true); 202 w.set_level_high(pin_group, true);
203 } 203 }
204 InterruptTrigger::LevelLow => { 204 InterruptTrigger::LevelLow => {
@@ -245,45 +245,45 @@ impl<'d, T: Pin> Future for InputFuture<'d, T> {
245 // the pin and if it has been disabled that means it was done by the 245 // the pin and if it has been disabled that means it was done by the
246 // interrupt service routine, so we then know that the event/trigger 246 // interrupt service routine, so we then know that the event/trigger
247 // happened and Poll::Ready will be returned. 247 // happened and Poll::Ready will be returned.
248 debug!("{:?} for pin {}\n", self.level, self.pin.pin()); 248 debug!("{:?} for pin {}", self.level, self.pin.pin());
249 match self.level { 249 match self.level {
250 InterruptTrigger::AnyEdge => { 250 InterruptTrigger::AnyEdge => {
251 if !inte.edge_high(pin_group) && !inte.edge_low(pin_group) { 251 if !inte.edge_high(pin_group) && !inte.edge_low(pin_group) {
252 #[rustfmt::skip] 252 #[rustfmt::skip]
253 debug!("{:?} for pin {} was cleared, return Poll::Ready\n", self.level, self.pin.pin()); 253 debug!("{:?} for pin {} was cleared, return Poll::Ready", self.level, self.pin.pin());
254 return Poll::Ready(()); 254 return Poll::Ready(());
255 } 255 }
256 } 256 }
257 InterruptTrigger::LevelHigh => { 257 InterruptTrigger::LevelHigh => {
258 if !inte.level_high(pin_group) { 258 if !inte.level_high(pin_group) {
259 #[rustfmt::skip] 259 #[rustfmt::skip]
260 debug!("{:?} for pin {} was cleared, return Poll::Ready\n", self.level, self.pin.pin()); 260 debug!("{:?} for pin {} was cleared, return Poll::Ready", self.level, self.pin.pin());
261 return Poll::Ready(()); 261 return Poll::Ready(());
262 } 262 }
263 } 263 }
264 InterruptTrigger::LevelLow => { 264 InterruptTrigger::LevelLow => {
265 if !inte.level_low(pin_group) { 265 if !inte.level_low(pin_group) {
266 #[rustfmt::skip] 266 #[rustfmt::skip]
267 debug!("{:?} for pin {} was cleared, return Poll::Ready\n", self.level, self.pin.pin()); 267 debug!("{:?} for pin {} was cleared, return Poll::Ready", self.level, self.pin.pin());
268 return Poll::Ready(()); 268 return Poll::Ready(());
269 } 269 }
270 } 270 }
271 InterruptTrigger::EdgeHigh => { 271 InterruptTrigger::EdgeHigh => {
272 if !inte.edge_high(pin_group) { 272 if !inte.edge_high(pin_group) {
273 #[rustfmt::skip] 273 #[rustfmt::skip]
274 debug!("{:?} for pin {} was cleared, return Poll::Ready\n", self.level, self.pin.pin()); 274 debug!("{:?} for pin {} was cleared, return Poll::Ready", self.level, self.pin.pin());
275 return Poll::Ready(()); 275 return Poll::Ready(());
276 } 276 }
277 } 277 }
278 InterruptTrigger::EdgeLow => { 278 InterruptTrigger::EdgeLow => {
279 if !inte.edge_low(pin_group) { 279 if !inte.edge_low(pin_group) {
280 #[rustfmt::skip] 280 #[rustfmt::skip]
281 debug!("{:?} for pin {} was cleared, return Poll::Ready\n", self.level, self.pin.pin()); 281 debug!("{:?} for pin {} was cleared, return Poll::Ready", self.level, self.pin.pin());
282 return Poll::Ready(()); 282 return Poll::Ready(());
283 } 283 }
284 } 284 }
285 } 285 }
286 debug!("InputFuture::poll return Poll::Pending\n"); 286 debug!("InputFuture::poll return Poll::Pending");
287 Poll::Pending 287 Poll::Pending
288 } 288 }
289} 289}