Skip to content

Commit

Permalink
Wait for EXI probe timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Nov 28, 2023
1 parent c3f1bfb commit f99fef8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions libogc/usbgecko.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ int usb_isgeckoalive(s32 chn)
s32 ret;
u16 val;

while (EXI_ProbeEx(chn) == 0);

if (EXI_GetID(chn, EXI_DEVICE_0, &id) == 0)
return 0;

Expand Down
8 changes: 5 additions & 3 deletions lwip/netif/enc28j60if.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,11 @@ static bool enc28j60_init(struct netif *netif)
for (s32 chan = EXI_CHANNEL_0; chan < EXI_CHANNEL_MAX; chan++) {
u32 id;

if (sdgecko_isInitialized(chan))
continue;
if (chan < EXI_CHANNEL_2 && !EXI_Attach(chan, ExtHandler))
if (chan < EXI_CHANNEL_2) {
while (!EXI_ProbeEx(chan));
if (!EXI_Attach(chan, ExtHandler))
continue;
} else if (sdgecko_isInitialized(chan))
continue;

u32 level = IRQ_Disable();
Expand Down

0 comments on commit f99fef8

Please sign in to comment.