Stub in the DMA bits that aren't yet there.
This commit is contained in:
parent
bf3bc92525
commit
54ada5bae1
4 changed files with 14 additions and 3 deletions
|
@ -1,9 +1,11 @@
|
|||
#![macro_use]
|
||||
|
||||
#[cfg(dma)]
|
||||
#[cfg_attr(dma_v1, path = "v1.rs")]
|
||||
#[cfg_attr(dma_v2, path = "v2.rs")]
|
||||
mod _version;
|
||||
|
||||
#[cfg(dma)]
|
||||
#[allow(unused)]
|
||||
pub use _version::*;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ pub mod adc;
|
|||
pub mod clock;
|
||||
#[cfg(dac)]
|
||||
pub mod dac;
|
||||
#[cfg(dma)]
|
||||
#[cfg(any(dma, dmamux))]
|
||||
pub mod dma;
|
||||
#[cfg(all(eth, feature = "net"))]
|
||||
pub mod eth;
|
||||
|
|
|
@ -21,7 +21,8 @@ impl<'d, T: Instance> Uart<'d, T> {
|
|||
) -> Self {
|
||||
unborrow!(inner, rx, tx);
|
||||
|
||||
T::enable();
|
||||
// Uncomment once we find all of the H7's UART clocks.
|
||||
//T::enable();
|
||||
let pclk_freq = T::frequency();
|
||||
|
||||
// TODO: better calculation, including error checking and OVER8 if possible.
|
||||
|
|
|
@ -58,7 +58,10 @@ fn main() -> ! {
|
|||
w.dbg_stop().set_bit()
|
||||
});
|
||||
|
||||
pp.RCC.ahb1enr.modify(|_, w| w.dma1en().set_bit());
|
||||
pp.RCC.ahb1enr.modify(|_, w| {
|
||||
w.dma1en().set_bit();
|
||||
w
|
||||
});
|
||||
|
||||
pp.RCC.ahb2enr.modify(|_, w| {
|
||||
w.gpioaen().set_bit();
|
||||
|
@ -70,6 +73,11 @@ fn main() -> ! {
|
|||
w
|
||||
});
|
||||
|
||||
pp.RCC.apb1enr1.modify(|_, w| {
|
||||
w.uart4en().set_bit();
|
||||
w
|
||||
});
|
||||
|
||||
pp.RCC.apb2enr.modify(|_, w| {
|
||||
w.syscfgen().set_bit();
|
||||
w
|
||||
|
|
Loading…
Reference in a new issue