Skip to content

Commit

Permalink
firmware: Apply suggested style change in fpga_adv_task
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Ling <[email protected]>
  • Loading branch information
mndza and martinling authored Mar 1, 2024
1 parent a4d0c33 commit f411c96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions firmware/src/boards/cynthion_d11/fpga_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ void fpga_adv_init(void)
void fpga_adv_task(void)
{
#ifdef BOARD_HAS_USB_SWITCH
// Take over USB after timeout
if (board_millis() - last_phy_adv < TIMEOUT) return;
take_over_usb();
// Take over USB after timeout
if (board_millis() - last_phy_adv >= TIMEOUT) {
take_over_usb();
}
#endif
}

Expand Down

0 comments on commit f411c96

Please sign in to comment.