NathanY3G / rp2040-pio-emulator

RP2040 emulator for the testing and debugging of PIO programs
Apache License 2.0
44 stars 7 forks source link

Implement `out, ISR` #57

Closed aaronjamt closed 1 year ago

aaronjamt commented 1 year ago

These methods were already implemented so I just added them to the list of out, ... destinations.

NathanY3G commented 1 year ago

Thank you @aaronjamt! I have just seen your MR and will look at it soon :slightly_smiling_face:

aaronjamt commented 1 year ago

I fixed the merge conflict, should be ready now. LGTM

NathanY3G commented 1 year ago

@aaronjamt I hope to finish reviewing your PR soon. I have added and merged a test for OUT PC and will add one for OUT ISR next.

NathanY3G commented 1 year ago

@aaronjamt During testing I discovered a lovely gem within the RP2040 Datasheet (section 3.4.5.2):

(OUT) ISR (also sets ISR shift counter to Bit count)

Consequently, the OUT ISR implementation requires a little bit more work but your OUT PC change is good to go :slightly_smiling_face: Therefore, I have git cherry-pick-ed your change for OUT PC so you keep the fame and glory!

Would you like to take a look at changing this or would you prefer adding type-hints?

NathanY3G commented 1 year ago

I have added a test to test_out.py which should hopefully help. It is currently disabled to prevent build failures on main.

aaronjamt commented 1 year ago

I'll try to sort this out first and then I can help with type hints if that still needs work

aaronjamt commented 1 year ago

Fixed now, I ran the tests and it works. I've also included a commit to re-enable the OUT ISR tests