change for new pac api

This commit is contained in:
Dirk Fuhrmann 2024-04-30 10:40:29 +02:00
parent 16ec38c38a
commit a0a2dd0469

View File

@ -33,7 +33,7 @@ impl Default for TransferOptions {
} }
} }
impl From<WordSize> for vals::ChTr1Dw { impl From<WordSize> for vals::Dw {
fn from(raw: WordSize) -> Self { fn from(raw: WordSize) -> Self {
match raw { match raw {
WordSize::OneByte => Self::BYTE, WordSize::OneByte => Self::BYTE,
@ -274,7 +274,7 @@ impl<'a> Transfer<'a> {
w.set_dinc(true); w.set_dinc(true);
}); });
ch.tr2().write(|w| { ch.tr2().write(|w| {
w.set_dreq(vals::ChTr2Dreq::SOURCEPERIPHERAL); w.set_dreq(vals::Dreq::SOURCEPERIPHERAL);
w.set_reqsel(request); w.set_reqsel(request);
}); });
@ -441,8 +441,8 @@ impl<'a> Transfer<'a> {
}); });
ch.tr2().write(|w| { ch.tr2().write(|w| {
w.set_dreq(match dir { w.set_dreq(match dir {
Dir::MemoryToPeripheral => vals::ChTr2Dreq::DESTINATIONPERIPHERAL, Dir::MemoryToPeripheral => vals::Dreq::DESTINATIONPERIPHERAL,
Dir::PeripheralToMemory => vals::ChTr2Dreq::SOURCEPERIPHERAL, Dir::PeripheralToMemory => vals::Dreq::SOURCEPERIPHERAL,
}); });
w.set_reqsel(request); w.set_reqsel(request);
}); });