mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
Merge pull request #1061 from hathach/samd-compliance
Update SAMD to pass USBCV
This commit is contained in:
commit
e2175f6ed1
@ -35,7 +35,7 @@
|
|||||||
#define LED_PIN 17
|
#define LED_PIN 17
|
||||||
#define LED_STATE_ON 1
|
#define LED_STATE_ON 1
|
||||||
|
|
||||||
// Button
|
// Button: D5
|
||||||
#define BUTTON_PIN 15
|
#define BUTTON_PIN 15
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
#define LED_PIN 16
|
#define LED_PIN 16
|
||||||
#define LED_STATE_ON 1
|
#define LED_STATE_ON 1
|
||||||
|
|
||||||
// Button
|
// Button: D5
|
||||||
#define BUTTON_PIN (32+14) // D5
|
#define BUTTON_PIN (32+14)
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
// UART
|
// UART
|
||||||
|
@ -230,10 +230,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
|
|||||||
if ( dir == TUSB_DIR_OUT )
|
if ( dir == TUSB_DIR_OUT )
|
||||||
{
|
{
|
||||||
ep->EPCFG.bit.EPTYPE0 = desc_edpt->bmAttributes.xfer + 1;
|
ep->EPCFG.bit.EPTYPE0 = desc_edpt->bmAttributes.xfer + 1;
|
||||||
|
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0 | USB_DEVICE_EPSTATUSCLR_DTGLOUT; // clear stall & dtoggle
|
||||||
ep->EPINTENSET.bit.TRCPT0 = true;
|
ep->EPINTENSET.bit.TRCPT0 = true;
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
ep->EPCFG.bit.EPTYPE1 = desc_edpt->bmAttributes.xfer + 1;
|
ep->EPCFG.bit.EPTYPE1 = desc_edpt->bmAttributes.xfer + 1;
|
||||||
|
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1 | USB_DEVICE_EPSTATUSCLR_DTGLIN; // clear stall & dtoggle
|
||||||
ep->EPINTENSET.bit.TRCPT1 = true;
|
ep->EPINTENSET.bit.TRCPT1 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user