probe-rs / hs-probe-firmware

A CMSIS-DAP implementation in pure Rust.
https://probe.rs
Apache License 2.0
76 stars 14 forks source link

Always make reset pin an open-drain output. Fixes #4. #5

Closed adamgreig closed 4 years ago

adamgreig commented 4 years ago

This is one potential fix, otherwise we could also leave it in input mode most of the time but swap to output when we get a DAP_SWJ_Pins command to drive it low.

Since it's always in open-drain mode and starts high, the effect is the same. To enter 'high-impedance' mode we just drive it high again.

Yatekii commented 4 years ago

LGTM, thanks for the fix!