hackndev / zinc

The bare metal stack for rust
zinc.rs
Apache License 2.0
1k stars 100 forks source link

Fix DR pins on lpc17xx #372

Closed richo closed 8 years ago

richo commented 8 years ago

Splitting out some of my earlier work to get it upstreamed.

I'm a little concerned by this- has this code been tested on hardware? I've been working on zinc (using an older snapshot compiler) and having issues getting code running on an lpc17xx board.

farcaller commented 8 years ago

Nope, I don't think ADC got to the point where it was tested — this is very old ioregs code there. Thanks for a fix though.

richo commented 8 years ago

Is there a canonical example of what newer ioregs code should look like? I spent a fair bit of time debugging this on hardware last weekend, it looks like the ISR vectors wind up looking valid-ish-but-not-actually-valid (it winds up with pc in the middle of the "Attempted to call unwrap on None" string) which I assume is related to all interrupts being wired to panic!

farcaller commented 8 years ago

k20 had all the new shiny stuff I think: https://github.com/hackndev/zinc/blob/master/src/hal/k20/pin.rs#L208