Closed arrowcircle closed 2 years ago
@arrowcircle You can get the delay in RTIC from core:
#[init]
fn init(cx: init::Context) -> init::LateResources {
let dp = cx.device;
let core = cx.core;
//clocks and other peripherals defined here
let mut delay = Delay::new(core.SYST, clocks);
Here's an example with a different I2C device:
https://github.com/jamwaffles/ssd1306/blob/master/examples/rtic_dvd.rs
@nebelgrau77 I already tried this thing, but it does not work.
no field `SYST` on type `rtic::Peripherals`
OK, here's my repo that works:
https://github.com/nebelgrau77/sensor_data_forwarder_Rust
You need to get SYST from cx.core, not cx.device.
@nebelgrau77 I use bluepill and it looks like there are no SYST in cx.core of F1.
I see... hmmm, try asking in RTIC channel here: https://app.element.io/#/room/#rtic:matrix.org - I didn't realize it might be a board/MCU specific issue.
...it's strange, though: that first example I indicated, the SSD1306, is for the F1xx. Weird...
Hi! I am struggling to use this driver with RTIC because of delay provider. What is the best way to use this library with RTIC?