Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino Core for SAMD21 CPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
josc941e
Arduino Core for SAMD21 CPU
Commits
ff8bc899
Commit
ff8bc899
authored
9 years ago
by
Martino Facchin
Committed by
Cristian Maglie
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use different EP for CDC IN and OUT
parent
ffd05f25
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cores/arduino/USB/CDC.cpp
+0
-2
0 additions, 2 deletions
cores/arduino/USB/CDC.cpp
cores/arduino/USB/USBDesc.h
+2
-2
2 additions, 2 deletions
cores/arduino/USB/USBDesc.h
with
2 additions
and
4 deletions
cores/arduino/USB/CDC.cpp
+
0
−
2
View file @
ff8bc899
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
cores/arduino/USB/USBDesc.h
+
2
−
2
View file @
ff8bc899
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment