mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-22 01:21:20 +00:00
Merge pull request #474 from hathach/fix-strict-prototype
fix strict prototype
This commit is contained in:
commit
22100b252f
@ -78,7 +78,8 @@ static xfer_ctl_t xfer_status[EP_MAX][2];
|
|||||||
static uint8_t _allocated_fifos = 1; //FIFO0 is always in use
|
static uint8_t _allocated_fifos = 1; //FIFO0 is always in use
|
||||||
|
|
||||||
// Will either return an unused FIFO number, or 0 if all are used.
|
// 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++;
|
if (_allocated_fifos < EP_FIFO_NUM) return _allocated_fifos++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -231,6 +231,7 @@ static void bus_reset(uint8_t rhport)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set turn-around timeout according to link speed
|
// 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)
|
static void set_turnaround(USB_OTG_GlobalTypeDef * usb_otg, tusb_speed_t speed)
|
||||||
{
|
{
|
||||||
usb_otg->GUSBCFG &= ~USB_OTG_GUSBCFG_TRDT;
|
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
|
else
|
||||||
{
|
{
|
||||||
// Turnaround timeout depends on the MCU clock
|
// Turnaround timeout depends on the MCU clock
|
||||||
extern uint32_t SystemCoreClock;
|
|
||||||
uint32_t turnaround;
|
uint32_t turnaround;
|
||||||
|
|
||||||
if ( SystemCoreClock >= 32000000U )
|
if ( SystemCoreClock >= 32000000U )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user