Closed iFreilicht closed 7 years ago
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!
Ok, I resolved the issue, it had nothing to do with this PR. It seems safe to pull. Sorry for the confusion.
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.
the Host specific codes are basically for XMEGA and UC3 MCUs. 8bit AVRs lacks the hardware facilities for Host mode USB.
do we have XMAGArduino
s? 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.
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
you forgot to add yourself as a contributor to the "Credits" section in README.md
.
:-P
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
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.