replace dcd_edpt_(clear)stall by usbd_edpt_(clear)stall

- remove dcd_edpt_stalled() from dcd porting
This commit is contained in:
hathach
2019-03-27 16:09:49 +07:00
parent 4722376654
commit 1e9848d917
15 changed files with 50 additions and 105 deletions

View File

@@ -182,14 +182,6 @@ void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
_dcd.ep[ep_id][0].stall = 1;
}
bool dcd_edpt_stalled(uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;
uint8_t const ep_id = ep_addr2id(ep_addr);
return _dcd.ep[ep_id][0].stall;
}
void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;

View File

@@ -344,14 +344,6 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
sie_write(SIE_CMDCODE_ENDPOINT_SET_STATUS+ep_id, 1, 0);
}
bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;
uint8_t const ep_state = sie_read(SIE_CMDCODE_ENDPOINT_SELECT + ep_addr2idx(ep_addr));
return (ep_state & SIE_SELECT_ENDPOINT_STALL_MASK) ? true : false;
}
static bool control_xact(uint8_t rhport, uint8_t dir, uint8_t * buffer, uint8_t len)
{
(void) rhport;

View File

@@ -201,14 +201,6 @@ void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
LPC_USB[rhport]->ENDPTCTRL[epnum] |= ENDPTCTRL_MASK_STALL << (dir ? 16 : 0);
}
bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr)
{
uint8_t const epnum = tu_edpt_number(ep_addr);
uint8_t const dir = tu_edpt_dir(ep_addr);
return LPC_USB[rhport]->ENDPTCTRL[epnum] & (ENDPTCTRL_MASK_STALL << (dir ? 16 : 0));
}
void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
{
uint8_t const epnum = tu_edpt_number(ep_addr);