mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
remove dcd_get_frame_number()
This commit is contained in:
parent
852abba918
commit
4722376654
@ -94,9 +94,6 @@ void dcd_set_address(uint8_t rhport, uint8_t dev_addr);
|
||||
// Receive Set Config request
|
||||
void dcd_set_config (uint8_t rhport, uint8_t config_num);
|
||||
|
||||
// Get current frame number
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Endpoint API
|
||||
* - open : Configure endpoint's registers
|
||||
|
@ -114,12 +114,6 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num)
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
return USB->DEVICE.FNUM.bit.FNUM;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* DCD Endpoint port
|
||||
*------------------------------------------------------------------*/
|
||||
|
@ -119,12 +119,6 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num)
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
return USB->DEVICE.FNUM.bit.FNUM;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* DCD Endpoint port
|
||||
*------------------------------------------------------------------*/
|
||||
|
@ -209,12 +209,6 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num)
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
return NRF_USBD->FRAMECNTR;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Endpoint API
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -153,13 +153,6 @@ void dcd_set_address(uint8_t rhport, uint8_t dev_addr)
|
||||
LPC_USB->DEVCMDSTAT |= dev_addr;
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
||||
return LPC_USB->INFO & (TU_BIT(11) - 1);
|
||||
}
|
||||
|
||||
bool dcd_init(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
@ -217,12 +217,6 @@ void dcd_set_config(uint8_t rhport, uint8_t config_num)
|
||||
sie_write(SIE_CMDCODE_CONFIGURE_DEVICE, 1, 1);
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
return (uint32_t) sie_read(SIE_CMDCODE_READ_FRAME_NUMBER);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// CONTROL HELPER
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -163,11 +163,6 @@ void dcd_set_config(uint8_t rhport, uint8_t config_num)
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
return LPC_USB[rhport]->FRINDEX_D >> 3;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// HELPER
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -57,10 +57,6 @@ void dcd_set_address(uint8_t rhport, uint8_t dev_addr)
|
||||
void dcd_set_config (uint8_t rhport, uint8_t config_num)
|
||||
{}
|
||||
|
||||
// Get current frame number
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{ return 0; }
|
||||
|
||||
bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
|
||||
{
|
||||
return false;
|
||||
|
@ -196,15 +196,6 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num)
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
uint32_t dcd_get_frame_number(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
||||
USB_OTG_DeviceTypeDef * dev = DEVICE_BASE;
|
||||
|
||||
return (dev->DSTS & USB_OTG_DSTS_FNSOF_Msk) >> USB_OTG_DSTS_FNSOF_Pos;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* DCD Endpoint port
|
||||
*------------------------------------------------------------------*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user