summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-07-29 19:17:48 +0700
committerGitHub <[email protected]>2020-07-29 19:17:48 +0700
commit22100b252fc2eb8f51ed407949645653c4880fd9 (patch)
treeddc10f35c618b462db6785d8b7b3317081088e8e
parent78f1576e933c92d467b36b4fb699e23de67708ab (diff)
parent10a8ef7614b1f154576c6b3cdd14f15d1b18a443 (diff)
Merge pull request #474 from hathach/fix-strict-prototype
fix strict prototype
-rw-r--r--src/portable/espressif/esp32s2/dcd_esp32s2.c3
-rw-r--r--src/portable/st/synopsys/dcd_synopsys.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/portable/espressif/esp32s2/dcd_esp32s2.c b/src/portable/espressif/esp32s2/dcd_esp32s2.c
index b4d869517..755e06701 100644
--- a/src/portable/espressif/esp32s2/dcd_esp32s2.c
+++ b/src/portable/espressif/esp32s2/dcd_esp32s2.c
@@ -78,7 +78,8 @@ static xfer_ctl_t xfer_status[EP_MAX][2];
static uint8_t _allocated_fifos = 1; //FIFO0 is always in use
// Will either return an unused FIFO number, or 0 if all are used.
-static uint8_t get_free_fifo(){
+static uint8_t get_free_fifo(void)
+{
if (_allocated_fifos < EP_FIFO_NUM) return _allocated_fifos++;
return 0;
}
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c
index 7eb63e52f..03c33c598 100644
--- a/src/portable/st/synopsys/dcd_synopsys.c
+++ b/src/portable/st/synopsys/dcd_synopsys.c
@@ -231,6 +231,7 @@ static void bus_reset(uint8_t rhport)
}
// Set turn-around timeout according to link speed
+extern uint32_t SystemCoreClock;
static void set_turnaround(USB_OTG_GlobalTypeDef * usb_otg, tusb_speed_t speed)
{
usb_otg->GUSBCFG &= ~USB_OTG_GUSBCFG_TRDT;
@@ -243,7 +244,6 @@ static void set_turnaround(USB_OTG_GlobalTypeDef * usb_otg, tusb_speed_t speed)
else
{
// Turnaround timeout depends on the MCU clock
- extern uint32_t SystemCoreClock;
uint32_t turnaround;
if ( SystemCoreClock >= 32000000U )