From 7d3260428930f02eaae18093961bdb53f3a9ea56 Mon Sep 17 00:00:00 2001 From: jan schunke Date: Sun, 3 Jan 2021 20:19:55 +0100 Subject: [PATCH 1/2] added STM32F407 info in driver.c --- drivers/STM32F4xx/Src/driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/STM32F4xx/Src/driver.c b/drivers/STM32F4xx/Src/driver.c index f5833c32..eb6af179 100644 --- a/drivers/STM32F4xx/Src/driver.c +++ b/drivers/STM32F4xx/Src/driver.c @@ -1374,6 +1374,8 @@ bool driver_init (void) hal.info = "STM32F446"; #elif defined(STM32F411xE) hal.info = "STM32F411"; +#elif defined(STM32F407xx) + hal.info = "STM32F407"; #else hal.info = "STM32F401CC"; #endif From 7148490352ad1c1f24583153ed4df35c7e155ce4 Mon Sep 17 00:00:00 2001 From: Adam Solchenberger Date: Wed, 6 Jan 2021 08:28:49 -0600 Subject: [PATCH 2/2] SerialUSB needs to be called, not Serial --- drivers/SAMD21/grblHAL_MKRZERO/src/usb_serial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/SAMD21/grblHAL_MKRZERO/src/usb_serial.cpp b/drivers/SAMD21/grblHAL_MKRZERO/src/usb_serial.cpp index a50550cd..09940a6c 100644 --- a/drivers/SAMD21/grblHAL_MKRZERO/src/usb_serial.cpp +++ b/drivers/SAMD21/grblHAL_MKRZERO/src/usb_serial.cpp @@ -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;