-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example without Embassy dependency #4
Comments
Hi, I am going to assume that you are talking about the blue-pill example since it showcases the The driver relies on the HAL's specific implementation of the embedded-hal-1.0.0 Traits (DelayNs and I2c). In this case, Nonetheless, I'm going to check again if cortex-m has implemented support for embedded-hal-1.0.0 and update the examples accordingly. |
It's both of the examples. Essentially, I'm writing a fairly simple rp2040-hal example to start with (using the rp-pico BSP) and I'm trying to follow your example for instantiating the driver via the UninitBMP180 builder. I'm good with creating and passing the i2c device, but for the Delay timer I don't know what to create and pass through. |
have you tried? #![no_std]
#![no_main]
use panic_halt as _;
use rp2040_hal::pac;
#[link_section = ".boot2"]
#[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
const XTAL_FREQ_HZ: u32 = 12_000_000u32;
#[rp2040_hal::entry]
fn main() -> ! {
let mut pac = pac::Peripherals::take().unwrap();
let mut watchdog = rp2040_hal::Watchdog::new(pac.WATCHDOG);
let clocks = rp2040_hal::clocks::init_clocks_and_plls(
XTAL_FREQ_HZ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,
pac.PLL_USB,
&mut pac.RESETS,
&mut watchdog,
)
.unwrap();
let timer = rp2040_hal::Timer::new(pac.TIMER, &mut pac.RESETS, &clocks);
loop {}
} |
Thanks for your help. I see now, it's a matter that Thanks. I really appreciate your taking the time to help give me some more breadcrumbs to follow. |
I got it figured out. Your advice was correct, but I had included the |
Glad to hear that! |
Hi, I'm trying to follow the example to use the driver, but the initialization depends on the
embassy_time
's definition of a Delay trait. It would be nice to see how to do it with the lower-levelembedded-hal
API.The text was updated successfully, but these errors were encountered: