@@ -2530,60 +2530,6 @@ pub(crate) mod dma_private {
25302530    } 
25312531} 
25322532
2533- /// DMA transaction for TX only transfers 
2534- /// 
2535- /// # Safety 
2536- /// 
2537- /// Never use [core::mem::forget] on an in-progress transfer 
2538- #[ non_exhaustive]  
2539- #[ must_use]  
2540- pub  struct  DmaTransferTx < ' a ,  I > 
2541- where 
2542-     I :  dma_private:: DmaSupportTx , 
2543- { 
2544-     instance :  & ' a  mut  I , 
2545- } 
2546- 
2547- impl < ' a ,  I >  DmaTransferTx < ' a ,  I > 
2548- where 
2549-     I :  dma_private:: DmaSupportTx , 
2550- { 
2551-     #[ cfg_attr( esp32c2,  allow( dead_code) ) ]  
2552-     pub ( crate )  fn  new ( instance :  & ' a  mut  I )  -> Self  { 
2553-         Self  {  instance } 
2554-     } 
2555- 
2556-     /// Wait for the transfer to finish. 
2557-      pub  fn  wait ( self )  -> Result < ( ) ,  DmaError >  { 
2558-         self . instance . peripheral_wait_dma ( false ,  true ) ; 
2559- 
2560-         if  self 
2561-             . instance 
2562-             . tx ( ) 
2563-             . pending_out_interrupts ( ) 
2564-             . contains ( DmaTxInterrupt :: DescriptorError ) 
2565-         { 
2566-             Err ( DmaError :: DescriptorError ) 
2567-         }  else  { 
2568-             Ok ( ( ) ) 
2569-         } 
2570-     } 
2571- 
2572-     /// Check if the transfer is finished. 
2573-      pub  fn  is_done ( & mut  self )  -> bool  { 
2574-         self . instance . tx ( ) . is_done ( ) 
2575-     } 
2576- } 
2577- 
2578- impl < I >  Drop  for  DmaTransferTx < ' _ ,  I > 
2579- where 
2580-     I :  dma_private:: DmaSupportTx , 
2581- { 
2582-     fn  drop ( & mut  self )  { 
2583-         self . instance . peripheral_wait_dma ( true ,  false ) ; 
2584-     } 
2585- } 
2586- 
25872533/// DMA transaction for RX only transfers 
25882534/// 
25892535/// # Safety 
@@ -2598,37 +2544,6 @@ where
25982544    instance :  & ' a  mut  I , 
25992545} 
26002546
2601- impl < ' a ,  I >  DmaTransferRx < ' a ,  I > 
2602- where 
2603-     I :  dma_private:: DmaSupportRx , 
2604- { 
2605-     #[ cfg_attr( esp32c2,  allow( dead_code) ) ]  
2606-     pub ( crate )  fn  new ( instance :  & ' a  mut  I )  -> Self  { 
2607-         Self  {  instance } 
2608-     } 
2609- 
2610-     /// Wait for the transfer to finish. 
2611-      pub  fn  wait ( self )  -> Result < ( ) ,  DmaError >  { 
2612-         self . instance . peripheral_wait_dma ( true ,  false ) ; 
2613- 
2614-         if  self 
2615-             . instance 
2616-             . rx ( ) 
2617-             . pending_in_interrupts ( ) 
2618-             . contains ( DmaRxInterrupt :: DescriptorError ) 
2619-         { 
2620-             Err ( DmaError :: DescriptorError ) 
2621-         }  else  { 
2622-             Ok ( ( ) ) 
2623-         } 
2624-     } 
2625- 
2626-     /// Check if the transfer is finished. 
2627-      pub  fn  is_done ( & mut  self )  -> bool  { 
2628-         self . instance . rx ( ) . is_done ( ) 
2629-     } 
2630- } 
2631- 
26322547impl < I >  Drop  for  DmaTransferRx < ' _ ,  I > 
26332548where 
26342549    I :  dma_private:: DmaSupportRx , 
@@ -2832,63 +2747,6 @@ pub(crate) mod asynch {
28322747
28332748    use  super :: * ; 
28342749
2835-     #[ must_use = "futures do nothing unless you `.await` or poll them" ]  
2836-     pub  struct  DmaTxFuture < ' a ,  CH > 
2837-     where 
2838-         CH :  DmaTxChannel , 
2839-     { 
2840-         pub ( crate )  tx :  & ' a  mut  ChannelTx < Async ,  CH > , 
2841-     } 
2842- 
2843-     impl < ' a ,  CH >  DmaTxFuture < ' a ,  CH > 
2844-     where 
2845-         CH :  DmaTxChannel , 
2846-     { 
2847-         #[ cfg_attr( esp32c2,  allow( dead_code) ) ]  
2848-         pub  fn  new ( tx :  & ' a  mut  ChannelTx < Async ,  CH > )  -> Self  { 
2849-             Self  {  tx } 
2850-         } 
2851-     } 
2852- 
2853-     impl < CH >  core:: future:: Future  for  DmaTxFuture < ' _ ,  CH > 
2854-     where 
2855-         CH :  DmaTxChannel , 
2856-     { 
2857-         type  Output  = Result < ( ) ,  DmaError > ; 
2858- 
2859-         fn  poll ( 
2860-             self :  core:: pin:: Pin < & mut  Self > , 
2861-             cx :  & mut  core:: task:: Context < ' _ > , 
2862-         )  -> Poll < Self :: Output >  { 
2863-             if  self . tx . is_done ( )  { 
2864-                 self . tx . clear_interrupts ( ) ; 
2865-                 Poll :: Ready ( Ok ( ( ) ) ) 
2866-             }  else  if  self 
2867-                 . tx 
2868-                 . pending_out_interrupts ( ) 
2869-                 . contains ( DmaTxInterrupt :: DescriptorError ) 
2870-             { 
2871-                 self . tx . clear_interrupts ( ) ; 
2872-                 Poll :: Ready ( Err ( DmaError :: DescriptorError ) ) 
2873-             }  else  { 
2874-                 self . tx . waker ( ) . register ( cx. waker ( ) ) ; 
2875-                 self . tx 
2876-                     . listen_out ( DmaTxInterrupt :: TotalEof  | DmaTxInterrupt :: DescriptorError ) ; 
2877-                 Poll :: Pending 
2878-             } 
2879-         } 
2880-     } 
2881- 
2882-     impl < CH >  Drop  for  DmaTxFuture < ' _ ,  CH > 
2883-     where 
2884-         CH :  DmaTxChannel , 
2885-     { 
2886-         fn  drop ( & mut  self )  { 
2887-             self . tx 
2888-                 . unlisten_out ( DmaTxInterrupt :: TotalEof  | DmaTxInterrupt :: DescriptorError ) ; 
2889-         } 
2890-     } 
2891- 
28922750    #[ must_use = "futures do nothing unless you `.await` or poll them" ]  
28932751    pub  struct  DmaRxFuture < ' a ,  CH > 
28942752    where 
0 commit comments