Improved USB-Serial
Now the buffer can even shrink down to 2 bytes. Not sure why 1 bytes gives problems. Also a buffer with USB_EP_SIZE is now also possible.
This commit is contained in:
parent
691befadf4
commit
889623a83b
2 changed files with 2 additions and 2 deletions
|
|
@ -314,6 +314,7 @@ Version History
|
|||
* USB-Serial now fully reprogrammable
|
||||
* Easy USB-Core selection via Tools->USB-Core
|
||||
* Added Arduino as ISP fix for 32u4 (u2 Series doesn't work at the moment)
|
||||
* Updated USB-Serial
|
||||
|
||||
2.0 Release (29.11.2014)
|
||||
* Added HoodLoader2
|
||||
|
|
|
|||
|
|
@ -33,11 +33,10 @@ void loop() {
|
|||
|
||||
// Serial -> USB
|
||||
if (Serial1.available()) {
|
||||
Serial.flush();
|
||||
// send maximum one EP_SIZE to give the usb some time to flush the buffer
|
||||
uint8_t buff[USB_EP_SIZE - 1];
|
||||
int i = 0;
|
||||
for (i = 0; i < USB_EP_SIZE - 1; i++) {
|
||||
for (i = 0; i < sizeof(buff); i++) {
|
||||
if (Serial1.available())
|
||||
buff[i] = Serial1.read();
|
||||
else break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue