Skip to content

PluggableUSB complete port #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Oct 12, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use different EP for CDC IN and OUT
  • Loading branch information
facchinm authored and cmaglie committed Sep 9, 2015
commit ff8bc8996a43f8c628d84671b36262e5cf054654
2 changes: 0 additions & 2 deletions cores/arduino/USB/CDC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,9 @@ int Serial_::available(void)
{
ring_buffer *buffer = &cdc_rx_buffer;
if (buffer->full) {
USB->DEVICE.DeviceEndpoint[2].EPINTENSET.reg = ~USB_DEVICE_EPINTENCLR_RXSTP;
return CDC_SERIAL_BUFFER_SIZE;
}
if (buffer->head == buffer->tail) {
USB->DEVICE.DeviceEndpoint[2].EPINTENSET.reg = USB_DEVICE_EPINTENCLR_RXSTP;
USB->DEVICE.DeviceEndpoint[2].EPINTENSET.reg = USB_DEVICE_EPINTENCLR_TRCPT(1);
}
return (uint32_t)(CDC_SERIAL_BUFFER_SIZE + buffer->head - buffer->tail) % CDC_SERIAL_BUFFER_SIZE;
Expand Down
4 changes: 2 additions & 2 deletions cores/arduino/USB/USBDesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
#define CDC_DATA_INTERFACE 1 // CDC Data
#define CDC_ENDPOINT_ACM 1
#define CDC_ENDPOINT_OUT 2
#define CDC_ENDPOINT_IN 2
#define CDC_ENDPOINT_IN 3

// HID
#define HID_INTERFACE 2 // HID
#define HID_ENDPOINT_INT 3
#define HID_ENDPOINT_INT 4

// Defined string description
#define IMANUFACTURER 1
Expand Down