Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #183 from ASolchen/master
Browse files Browse the repository at this point in the history
SerialUSB needs to be called, not Serial
  • Loading branch information
terjeio authored Jan 7, 2021
2 parents 267c8e5 + 7148490 commit 0ab9987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/SAMD21/grblHAL_MKRZERO/src/usb_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ void usb_serialWriteS (const char *s)

while(txbuf.length) {

if((avail = Serial.availableForWrite()) > 10) {
if((avail = SerialUSB.availableForWrite()) > 10) {

length = avail < txbuf.length ? avail : txbuf.length;

Serial.write((uint8_t *)txbuf.s, length); // doc is wrong - does not return bytes sent!
SerialUSB.write((uint8_t *)txbuf.s, length); // doc is wrong - does not return bytes sent!

txbuf.length -= length;
txbuf.s += length;
Expand Down

0 comments on commit 0ab9987

Please sign in to comment.