A more readable way of creating the bitmask:
What the mask does depends on how you configured the pins and which function. For example if a GPIO is configured as input there is no effect if you try to set that GPIO low or high with gpio_put_mask(). It doesn't matter if you initialized GPIOs individually or with mask. You can mix.
Code:
// You can also use the shifts directly if you prefer.#define BIT(n) (1u<<(n))uint32_t gpio_bitmask = BIT(22) | BIT(21) | BIT(16) | BIT(15) | BIT(14);
Statistics: Posted by pica200 — Mon Jun 10, 2024 11:28 pm