add standard request

This commit is contained in:
Martin Mueller
2010-11-04 00:41:49 +01:00
committed by Martin Mueller
parent 6e090ccee1
commit d6eacce827
11 changed files with 755 additions and 68 deletions

View File

@@ -116,7 +116,22 @@ void usbd_ep_stall(u8 addr)
if(addr & 0x80)
USB_SET_EP_TX_STAT(addr, USB_EP_TX_STAT_STALL);
else
USB_SET_EP_RX_STAT(addr & 0x7F, USB_EP_RX_STAT_STALL);
USB_SET_EP_RX_STAT(addr&0x7F, USB_EP_RX_STAT_STALL);
}
u8 usbd_get_ep_stall(u8 addr)
{
if(addr == 0)
if ((*USB_EP_REG(addr) & USB_EP_TX_STAT) == USB_EP_TX_STAT_STALL)
return 1;
if(addr & 0x80) {
if ((*USB_EP_REG(addr) & USB_EP_TX_STAT) == USB_EP_TX_STAT_STALL)
return 1;
} else {
if ((*USB_EP_REG(addr&0x7F) & USB_EP_RX_STAT) == USB_EP_RX_STAT_STALL)
return 1;
}
return 0;
}
/** Copy a data buffer to Packet Memory.