-
Notifications
You must be signed in to change notification settings - Fork 136
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
Enable library for Arduino SAMD based on USBCON #163
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ extern "C" { | |
#define CFG_TUSB_MCU OPT_MCU_SAMD21 | ||
#endif | ||
|
||
#ifdef USE_TINYUSB | ||
#if defined(USE_TINYUSB) || !defined(USBCON) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you explain again, why putting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my proposed changes to the Arduino SAMD core USBCON would not longer be defined as you have said. I don't add USE_TINYUSB because it would be a library specific change to the Arduino core and I think the team would be less likely to accept it. Also, if USE_TINYUSB was added, the logic for defining Serial would need updated as it would conflict with the Arduino SAMD core's definition. This is another reason why I chose this route. I agree that not explicitly specifying USE_TINYUSB is not ideal but you've said yourself that Arduino team probably would not want to do it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from Arduino core pov, Therefore I don't think you could persuade Arduino team to use lack of it as mean for TinyUSB, especially Arduino goal is having consistent API across other cores and libraries. Asking them to add menu for other usb stack has a better standing ground IMHO. But let wait to see if I am wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense. I haven't looked much at the AVR core so I didn't have that experience for reference. I figured USBCON had a more important use but like you said it wasn't obvious within the SAMD core. If they aren't comfortable with it, a different defiine can be created to disable the built-in USB core. Ideally a menu option could be added for TinyUSB but we'll see. |
||
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE | ||
#else | ||
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_NONE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert, since this PR is about samd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I'll fix it.