Skip to content

Commit

Permalink
[PCE] Fixup mouse support
Browse files Browse the repository at this point in the history
  • Loading branch information
darthcloud committed Aug 9, 2022
1 parent 864134b commit 8bd6dae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main/wired/pce_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,18 @@ static void pce_mouse_task(void) {
}

static unsigned pce_mouse_oe_isr(unsigned cause) {
uint32_t cur_in1 = GPIO.in1.val;
cycle = 0;
++frame_cnt;
++mouse_cnt;
if (cur_in1 & P1_SEL_MASK) {
if (mouse_cnt) {
GPIO.out = axes[mouse_cnt - 1];
}
}
else {
GPIO.out = map[0][2];
}
GPIO.status_w1tc = P1_OE_MASK;
return 0;
}
Expand Down

0 comments on commit 8bd6dae

Please sign in to comment.