Skip to content

Commit

Permalink
Use diagnostic on DmaChannelConvert (#2465)
Browse files Browse the repository at this point in the history
* Use `diagnostic` on `DmaChannelConvert`

* Typo
  • Loading branch information
bjoernQ authored Nov 6, 2024
1 parent 8860aba commit ccb3a1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions esp-hal/src/dma/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,11 @@ pub trait DmaChannelExt: DmaChannel {
fn get_tx_interrupts() -> impl InterruptAccess<DmaTxInterrupt>;
}

#[diagnostic::on_unimplemented(
message = "The DMA channel isn't suitable for this peripheral",
label = "This DMA channel",
note = "Not all channels are useable with all peripherals"
)]
#[doc(hidden)]
pub trait DmaChannelConvert<DEG: DmaChannel>: DmaChannel {
fn degrade_rx(rx: Self::Rx) -> DEG::Rx;
Expand Down

0 comments on commit ccb3a1b

Please sign in to comment.