Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ embedded-hal-02 = { package = "embedded-hal", version = "0.2.7", features = ["un
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
replace_with = { version = "0.1.7", default-features = false, features = ["panic_abort"] }
usbd-serial = "0.2.0"
dap-rs = { version = "0.2.0", features = ["defmt"] }
# dap-rs = { version = "0.2.0", features = ["defmt"] }
dap-rs = { git = "https://github.com/bugadani/dap-rs.git", branch = "jtag" }
git-version = "0.3.5"
pio-proc = "0.2.1"
pio = "0.2.1"
Expand Down
15 changes: 11 additions & 4 deletions src/bin/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ use rusty_probe as _;
#[rtic::app(device = rp2040_hal::pac, dispatchers = [XIP_IRQ, CLOCKS_IRQ])]
mod app {
use core::mem::MaybeUninit;
use dap_rs::usb_device::class_prelude::*;
use dap_rs::{jtag::TapConfig, usb_device::class_prelude::*};
use rp2040_hal::usb::UsbBus;
use rtic_monotonics::rp2040::prelude::*;
use rusty_probe::{
leds::{LedManager, Vtarget},
setup::*,
};
use rp2040_hal::usb::UsbBus;
use rtic_monotonics::rp2040::prelude::*;

#[shared]
struct Shared {
Expand All @@ -31,6 +31,7 @@ mod app {
#[init(local = [
usb_bus: MaybeUninit<UsbBusAllocator<UsbBus>> = MaybeUninit::uninit(),
delay: MaybeUninit<rusty_probe::systick_delay::Delay> = MaybeUninit::uninit(),
scan_chain: [TapConfig; 8] = [TapConfig::INIT; 8],
])]
fn init(cx: init::Context) -> (Shared, Local) {
let (
Expand All @@ -41,7 +42,13 @@ mod app {
translator_power,
target_power,
target_physically_connected,
) = setup(cx.device, cx.core, cx.local.usb_bus, cx.local.delay);
) = setup(
cx.device,
cx.core,
cx.local.usb_bus,
cx.local.delay,
cx.local.scan_chain,
);

voltage_translator_control::spawn().ok();

Expand Down
Loading