Merge pull request #1609 from embassy-rs/fix-peripheral-deref
hal-common: require DerefMut for peripherals, not just Deref.
This commit is contained in:
commit
99b4ea7c1d
@ -161,7 +161,7 @@ pub trait Peripheral: Sized {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'b, T: Deref> Peripheral for T
|
impl<'b, T: DerefMut> Peripheral for T
|
||||||
where
|
where
|
||||||
T::Target: Peripheral,
|
T::Target: Peripheral,
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ impl<'d, T: Instance, Tx> DacCh1<'d, T, Tx> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let tx_request = self.dma.request();
|
let tx_request = self.dma.request();
|
||||||
let dma_channel = &self.dma;
|
let dma_channel = &mut self.dma;
|
||||||
|
|
||||||
let tx_options = crate::dma::TransferOptions {
|
let tx_options = crate::dma::TransferOptions {
|
||||||
circular,
|
circular,
|
||||||
@ -376,7 +376,7 @@ impl<'d, T: Instance, Tx> DacCh2<'d, T, Tx> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let tx_request = self.dma.request();
|
let tx_request = self.dma.request();
|
||||||
let dma_channel = &self.dma;
|
let dma_channel = &mut self.dma;
|
||||||
|
|
||||||
let tx_options = crate::dma::TransferOptions {
|
let tx_options = crate::dma::TransferOptions {
|
||||||
circular,
|
circular,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user