pass a handle to udma_global to i2c init

This commit is contained in:
bunnie 2024-12-06 03:33:39 +08:00
parent 76ffbf6e27
commit c8e4392a95

View file

@ -300,7 +300,9 @@ pub fn early_init() -> u32 {
};
#[cfg(any(feature = "board-baosec", feature = "board-baosor"))]
let mut i2c = unsafe { cramium_hal::udma::I2c::new_with_ifram(i2c_channel, 400_000, perclk, i2c_ifram) };
let mut i2c = unsafe {
cramium_hal::udma::I2c::new_with_ifram(i2c_channel, 400_000, perclk, i2c_ifram, &udma_global)
};
// setup PMIC
#[cfg(any(feature = "board-baosec", feature = "board-baosor"))]
{