8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 733052f commit 57f4cabCopy full SHA for 57f4cab
ports/rp2/machine_pin.c
@@ -86,6 +86,7 @@ typedef struct _machine_pin_irq_obj_t {
86
} machine_pin_irq_obj_t;
87
88
static const mp_irq_methods_t machine_pin_irq_methods;
89
+static const int num_intr_regs = sizeof(iobank0_hw->intr) / sizeof(iobank0_hw->intr[0]);
90
91
// Mask with "1" indicating that the corresponding pin is in simulated open-drain mode.
92
uint64_t machine_pin_open_drain_mask;
@@ -99,7 +100,7 @@ static inline bool is_ext_pin(__unused const machine_pin_obj_t *self) {
99
100
#endif
101
102
static void gpio_irq(void) {
- for (int i = 0; i < 4; ++i) {
103
+ for (int i = 0; i < num_intr_regs; ++i) {
104
uint32_t intr = iobank0_hw->intr[i];
105
if (intr) {
106
for (int j = 0; j < 8; ++j) {
0 commit comments