Skip to content
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

Add LUFA as submodule #6

Merged
merged 1 commit into from
Jul 20, 2017
Merged

Add LUFA as submodule #6

merged 1 commit into from
Jul 20, 2017

Conversation

iFreilicht
Copy link
Collaborator

Resolves #4.

This PR has been tested to compile the DualSerial example on both Arduino IDE 1.8.3 and the VSCode Arduino extension.

To try it out, pull this PR, and use $ git submodule init; git submodule update to clone LUFA. After that compilation should just work like it did before.

@iFreilicht
Copy link
Collaborator Author

Don't pull this in for now! I can't seem to figure out how to compile a sketch properly that is not in the examples directory!

@iFreilicht iFreilicht closed this Jul 20, 2017
@iFreilicht
Copy link
Collaborator Author

Ok, I resolved the issue, it had nothing to do with this PR. It seems safe to pull. Sorry for the confusion.

@iFreilicht iFreilicht reopened this Jul 20, 2017
@iFreilicht
Copy link
Collaborator Author

iFreilicht commented Jul 20, 2017

Hm, wouldn't that cause macros to be defined that would indicate the device to be both a Device and a Host, even if it was just either? To me the fact that LUFA doesn't have an "include everything" header indicates that this sort of behaviour would not be supported.

Isn't this also what LUFA.c.inc is doing?

In any case, I don't think this influences this particular PR, it would be a separate enhancement to discuss.

@Palatis Palatis merged commit 4db199d into Palatis:master Jul 20, 2017
@Palatis
Copy link
Owner

Palatis commented Jul 20, 2017

the Host specific codes are basically for XMEGA and UC3 MCUs. 8bit AVRs lacks the hardware facilities for Host mode USB.
do we have XMAGArduinos? no, at least not for the past 10 years, and probably wouldn't happen in the next 10 years, either.

but I agree that would become a separated topic.
your commit is probably exactly what I would do if i got to do it myself, thanks in advance.

@Palatis
Copy link
Owner

Palatis commented Jul 20, 2017

LUFA.c.inc is a bit different.

Arduino IDE doesn't compile individual .c / .cpp files inside a library directory (at least it wasn't by the time this lib is published), so I had to make some sort of an "amalgamation" to make it compile, and this file cannot end in "normal valid" source code extension.

that's why there is a LUFA.c in the example just to #include <LUFA.c.inc>.

ref. https://github.com/Palatis/Arduino-Lufa/blob/master/examples/LUFA_DualVirtualSerial/LUFA.c

@Palatis
Copy link
Owner

Palatis commented Jul 20, 2017

you forgot to add yourself as a contributor to the "Credits" section in README.md.

:-P

@iFreilicht
Copy link
Collaborator Author

Oh that's very interesting, good to know!

you forgot to add yourself as a contributor to the "Credits" section in README.md.

Whoops :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants