Closed sweetlilmre closed 4 months ago
Hi Peter,
Eliminating duplicate code is always a worthy goal.
I like this change, but one suggestion: I think, instead of making pio_set_xy() public, it should be a static function. Leave pio_set_x() and pio_set_y() as actual functions (rather than macros for pio_set_xy()) which call static pio_set_xy() function. Then we can remove the sanity guard too.
If you can make those changes, I'll happily merge it in.
Thanks for your contributions to this project!
Cheers Troy
Hi, I've made the suggested changes, I prefer the #defines over the separate functions (2 calls per invocation over the sanity check), but it's much of a muchness :). Great project, hopefully I'll get around to getting a kit one day to play with.
Small tidy up of the pio_set_x and pio_set_y functions to remove duplication