lpc17xx add dcd_edpt_stalled

This commit is contained in:
hathach 2018-11-29 20:09:02 +07:00
parent 3fe392414d
commit 15e4b97e36
1 changed files with 4 additions and 2 deletions

View File

@ -350,8 +350,10 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;
// TODO implement later
return false;
uint32_t const ep_state = sie_read(SIE_CMDCODE_ENDPOINT_SELECT + ep_addr2idx(ep_addr), 1);
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)