aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpennae <[email protected]>2023-04-25 20:18:22 +0200
committerpennae <[email protected]>2023-05-01 12:58:57 +0200
commitfa1ec29ae61df78a74be4bffb47f400fa35e49f1 (patch)
tree3b82d841d59d45c3f5c8e3352bdbb20d5567e18b
parent58e727d3b9aa9d54f7c20f618fada176dcd533a9 (diff)
rp/pio: remove a bunch of unnecessary let _ = self
-rw-r--r--embassy-rp/src/pio.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs
index b43244da2..8492ca31d 100644
--- a/embassy-rp/src/pio.rs
+++ b/embassy-rp/src/pio.rs
@@ -328,7 +328,6 @@ impl<PIO: PioInstance, SM: SmInstance> PioStateMachine for PioStateMachineInstan
328 328
329pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin { 329pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin {
330 fn pio_no(&self) -> u8 { 330 fn pio_no(&self) -> u8 {
331 let _ = self;
332 Self::Pio::PIO_NO 331 Self::Pio::PIO_NO
333 } 332 }
334 333
@@ -337,7 +336,6 @@ pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin {
337 } 336 }
338 337
339 fn restart(&mut self) { 338 fn restart(&mut self) {
340 let _ = self;
341 unsafe { 339 unsafe {
342 Self::Pio::PIO 340 Self::Pio::PIO
343 .ctrl() 341 .ctrl()
@@ -345,7 +343,6 @@ pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin {
345 } 343 }
346 } 344 }
347 fn set_enable(&mut self, enable: bool) { 345 fn set_enable(&mut self, enable: bool) {
348 let _ = self;
349 let mask = 1u8 << Self::Sm::SM_NO; 346 let mask = 1u8 << Self::Sm::SM_NO;
350 unsafe { 347 unsafe {
351 Self::Pio::PIO 348 Self::Pio::PIO
@@ -355,25 +352,20 @@ pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin {
355 } 352 }
356 353
357 fn is_enabled(&self) -> bool { 354 fn is_enabled(&self) -> bool {
358 let _ = self;
359 unsafe { Self::Pio::PIO.ctrl().read().sm_enable() & (1u8 << Self::Sm::SM_NO) != 0 } 355 unsafe { Self::Pio::PIO.ctrl().read().sm_enable() & (1u8 << Self::Sm::SM_NO) != 0 }
360 } 356 }
361 357
362 fn is_tx_empty(&self) -> bool { 358 fn is_tx_empty(&self) -> bool {
363 let _ = self;
364 unsafe { Self::Pio::PIO.fstat().read().txempty() & (1u8 << Self::Sm::SM_NO) != 0 } 359 unsafe { Self::Pio::PIO.fstat().read().txempty() & (1u8 << Self::Sm::SM_NO) != 0 }
365 } 360 }
366 fn is_tx_full(&self) -> bool { 361 fn is_tx_full(&self) -> bool {
367 let _ = self;
368 unsafe { Self::Pio::PIO.fstat().read().txfull() & (1u8 << Self::Sm::SM_NO) != 0 } 362 unsafe { Self::Pio::PIO.fstat().read().txfull() & (1u8 << Self::Sm::SM_NO) != 0 }
369 } 363 }
370 364
371 fn is_rx_empty(&self) -> bool { 365 fn is_rx_empty(&self) -> bool {
372 let _ = self;
373 unsafe { Self::Pio::PIO.fstat().read().rxempty() & (1u8 << Self::Sm::SM_NO) != 0 } 366 unsafe { Self::Pio::PIO.fstat().read().rxempty() & (1u8 << Self::Sm::SM_NO) != 0 }
374 } 367 }
375 fn is_rx_full(&self) -> bool { 368 fn is_rx_full(&self) -> bool {
376 let _ = self;
377 unsafe { Self::Pio::PIO.fstat().read().rxfull() & (1u8 << Self::Sm::SM_NO) != 0 } 369 unsafe { Self::Pio::PIO.fstat().read().rxfull() & (1u8 << Self::Sm::SM_NO) != 0 }
378 } 370 }
379 371
@@ -430,7 +422,6 @@ pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin {
430 } 422 }
431 423
432 fn clkdiv_restart(&mut self) { 424 fn clkdiv_restart(&mut self) {
433 let _ = self;
434 unsafe { 425 unsafe {
435 Self::Pio::PIO 426 Self::Pio::PIO
436 .ctrl() 427 .ctrl()
@@ -785,7 +776,6 @@ pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin {
785 where 776 where
786 I: Iterator<Item = u16>, 777 I: Iterator<Item = u16>,
787 { 778 {
788 let _ = self;
789 write_instr( 779 write_instr(
790 Self::Pio::PIO, 780 Self::Pio::PIO,
791 Self::Pio::PIO_NO, 781 Self::Pio::PIO_NO,
@@ -953,7 +943,6 @@ pub trait PioCommon: sealed::PioCommon + Sized {
953 where 943 where
954 I: Iterator<Item = u16>, 944 I: Iterator<Item = u16>,
955 { 945 {
956 let _ = self;
957 write_instr(Self::Pio::PIO, Self::Pio::PIO_NO, start, instrs, MEM_USED_BY_COMMON); 946 write_instr(Self::Pio::PIO, Self::Pio::PIO_NO, start, instrs, MEM_USED_BY_COMMON);
958 } 947 }
959 948
@@ -1024,7 +1013,6 @@ impl<const SM_NO: u8> SmInstance for SmInstanceBase<SM_NO> {}
1024 1013
1025pub trait PioPeripheral: sealed::PioPeripheral + Sized { 1014pub trait PioPeripheral: sealed::PioPeripheral + Sized {
1026 fn pio(&self) -> u8 { 1015 fn pio(&self) -> u8 {
1027 let _ = self;
1028 Self::Pio::PIO_NO 1016 Self::Pio::PIO_NO
1029 } 1017 }
1030 1018
@@ -1037,7 +1025,6 @@ pub trait PioPeripheral: sealed::PioPeripheral + Sized {
1037 PioStateMachineInstance<Self::Pio, SmInstanceBase<2>>, 1025 PioStateMachineInstance<Self::Pio, SmInstanceBase<2>>,
1038 PioStateMachineInstance<Self::Pio, SmInstanceBase<3>>, 1026 PioStateMachineInstance<Self::Pio, SmInstanceBase<3>>,
1039 ) { 1027 ) {
1040 let _ = self;
1041 ( 1028 (
1042 PioCommonInstance { 1029 PioCommonInstance {
1043 pio: PhantomData::default(), 1030 pio: PhantomData::default(),