File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,42 @@ where
403
403
}
404
404
}
405
405
406
+ /// Use in combination with `interrupt::enable`.
407
+ /// The interrupt is cleared when all pending messages are received.
408
+ #[ cfg( any( esp32c3, esp32s3) ) ]
409
+ pub fn enable_rx_interrupt ( & mut self ) {
410
+ self . peripheral
411
+ . register_block ( )
412
+ . int_ena
413
+ . modify ( |_, w| w. rx_int_ena ( ) . set_bit ( ) ) ;
414
+ }
415
+
416
+ /// Use in combination with `interrupt::enable`.
417
+ /// The interrupt is cleared when all pending messages are received.
418
+ #[ cfg( esp32c6) ]
419
+ pub fn enable_rx_interrupt ( & mut self ) {
420
+ self . peripheral
421
+ . register_block ( )
422
+ . interrupt_enable
423
+ . modify ( |_, w| w. ext_receive_int_ena ( ) . set_bit ( ) ) ;
424
+ }
425
+
426
+ #[ cfg( any( esp32c3, esp32s3) ) ]
427
+ pub fn disable_rx_interrupt ( & mut self ) {
428
+ self . peripheral
429
+ . register_block ( )
430
+ . int_ena
431
+ . modify ( |_, w| w. rx_int_ena ( ) . clear_bit ( ) ) ;
432
+ }
433
+
434
+ #[ cfg( esp32c6) ]
435
+ pub fn disable_rx_interrupt ( & mut self ) {
436
+ self . peripheral
437
+ . register_block ( )
438
+ . interrupt_enable
439
+ . modify ( |_, w| w. ext_receive_int_ena ( ) . clear_bit ( ) ) ;
440
+ }
441
+
406
442
/// Release the message in the buffer. This will decrement the received
407
443
/// message counter and prepare the next message in the FIFO for
408
444
/// reading.
You can’t perform that action at this time.
0 commit comments