USB CDC demo working.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2725 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
3c6e54a52e
commit
400bb2ae04
|
@ -361,6 +361,7 @@ size_t usbReadPacketI(USBDriver *usbp, usbep_t ep,
|
||||||
if (usbp->ep[ep]->receiving)
|
if (usbp->ep[ep]->receiving)
|
||||||
return USB_ENDPOINT_BUSY;
|
return USB_ENDPOINT_BUSY;
|
||||||
|
|
||||||
|
usbp->ep[ep]->receiving = TRUE;
|
||||||
return usb_lld_read_packet(usbp, ep, buf, n);;
|
return usb_lld_read_packet(usbp, ep, buf, n);;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,6 +388,7 @@ size_t usbWritePacketI(USBDriver *usbp, usbep_t ep,
|
||||||
if (usbp->ep[ep]->transmitting)
|
if (usbp->ep[ep]->transmitting)
|
||||||
return USB_ENDPOINT_BUSY;
|
return USB_ENDPOINT_BUSY;
|
||||||
|
|
||||||
|
usbp->ep[ep]->transmitting = TRUE;
|
||||||
usb_lld_write_packet(usbp, ep, buf, n);
|
usb_lld_write_packet(usbp, ep, buf, n);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue