Skip to content

Conversation

@lurch
Copy link
Contributor

@lurch lurch commented Aug 7, 2025

Inspired by comments on #2616

I wasn't sure which parts of this PR are necessary, so I split it into 3 commits to make it easier to chop & change 🙂

@kilograham kilograham added this to the 2.2.1 milestone Aug 13, 2025
check_pio_param(pio);
check_sm_param(sm);
#if PICO_PIO_USE_GPIO_BASE
invalid_params_if(HARDWARE_PIO, in_base < pio_get_gpio_base(pio));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note all of these tests (well the ones i looked at) are unnecessary since the value being subtracted from is unsigned, so the following < 32 check will fail (as a negative result will be a large positive result)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah neat - that's a subtlety that I hadn't realised. Being more of a Python programmer, I keep forgetting about the tricks that you can do with unsigned ints in C 😉

@lurch lurch force-pushed the check_pio_underflow branch from abe69a6 to 96f5b94 Compare January 7, 2026 11:42
@lurch
Copy link
Contributor Author

lurch commented Jan 7, 2026

PR updated and force-pushed.

@lurch
Copy link
Contributor Author

lurch commented Jan 7, 2026

@armandomontanez Bazel CI checks are failing because
Error in download_and_extract: java.io.IOException: Error downloading [https://storage.googleapis.com/pigweed-bazel-tarballs/rules_libusb-8720113729935528369-7f91dc339a79292ab8aa5ca127572e54b0b586e8.tar.gz] to /home/runner/.bazel/external/rules_libusb+/temp17088008685940951848/rules_libusb-8720113729935528369-7f91dc339a79292ab8aa5ca127572e54b0b586e8.tar.gz: GET returned 403 Forbidden
😢

@armandomontanez
Copy link
Contributor

I'll look into that today, sorry about the friction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants