Skip to content

Commit 8420774

Browse files
committed
Mapping gpios correctly for the flash board
1 parent 9e95399 commit 8420774

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hw/arm/stm32_flashboard.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ static void gpiob_irq_handler(void *opaque, int n, int level)
219219
int64_t frac = (now % 1000000000) / 10000;
220220

221221
int gpio = (int) opaque;
222+
switch (gpio)
223+
{
224+
case 4: gpio = 7; break;
225+
case 5: gpio = 6; break;
226+
case 6: gpio = 5; break;
227+
case 7: gpio = 4; break;
228+
}
222229

223230
/* Assume that the IRQ is only triggered if the LED has changed state.
224231
* If this is not correct, we may get multiple LED Offs or Ons in a row.

0 commit comments

Comments
 (0)