rp-rs / rp2040-pac

A Rust PAC for the RP2040 Microcontroller
142 stars 28 forks source link

Added all possible variants for DREQ #59

Closed jounathaen closed 2 years ago

jounathaen commented 2 years ago

I don't know why the svd only contains the timers here as triggers, but this is the full enum which can also be used in general in hals. This can e.g. replace/improve the dreq_value function in the rp2040 hal

jounathaen commented 2 years ago

I hope I rebased it correctly. Unfortunately, svdtools fails at my machine with an TypeError: Argument must be bytes or unicode, got 'int', but it also does so on the main branch. Guess "I'm holding it wrong".

9names commented 2 years ago

Might be the wrong version of svdtools? Once we switch to the rust-based version that problem should be less common. CI is happy, so I think you've done it right.

jounathaen commented 2 years ago

Alright, then I have nothing more to add here :slightly_smiling_face:

jounathaen commented 2 years ago

OK, I did have something more: A changelog entry. But now....

jannic commented 1 year ago

Strange that the datasheet has most of these values in 2.5.3.1 table 119 and the timer ones in 2.5.7 table 124. LGTM, thanks for the PR

I guess the reason is that the timers are part of the DMA peripheral (which RP probably just imported from an existing IP block), and the DREQ ones are external, so different hardware designs could use different assignments.

That could also explain why the values are missing from the SVD: It may also be just copied in from some existing file for the DMA peripheral.