-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firmware: pinout v2: move sunk to uart1, move sunm to pio uart
- Loading branch information
Showing
13 changed files
with
310 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/.pio/libdeps/pico/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h b/.pio/libdeps/pico/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h | ||
index 1d0808c..25b5f95 100644 | ||
--- a/.pio/libdeps/pico/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h | ||
+++ b/.pio/libdeps/pico/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h | ||
@@ -25,6 +25,9 @@ | ||
#ifndef ADAFRUIT_TINYUSB_H_ | ||
#define ADAFRUIT_TINYUSB_H_ | ||
|
||
+#include <Arduino.h> | ||
+extern HardwareSerial *TinyUSB_Serial_Debug; | ||
+ | ||
// Error message for Core that must select TinyUSB via menu | ||
#if !defined(USE_TINYUSB) && ( defined(ARDUINO_ARCH_SAMD) || \ | ||
(defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)) ) | ||
diff --git a/.pio/libdeps/pico/Adafruit TinyUSB Library/src/arduino/ports/rp2040/Adafruit_TinyUSB_rp2040.cpp b/.pio/libdeps/pico/Adafruit TinyUSB Library/src/arduino/ports/rp2040/Adafruit_TinyUSB_rp2040.cpp | ||
index 8af08a4..b0449dd 100644 | ||
--- a/.pio/libdeps/pico/Adafruit TinyUSB Library/src/arduino/ports/rp2040/Adafruit_TinyUSB_rp2040.cpp | ||
+++ b/.pio/libdeps/pico/Adafruit TinyUSB Library/src/arduino/ports/rp2040/Adafruit_TinyUSB_rp2040.cpp | ||
@@ -141,13 +141,14 @@ void TinyUSB_Device_Task(void) { | ||
|
||
// Debug log with Serial1 | ||
#if CFG_TUSB_DEBUG | ||
+HardwareSerial *TinyUSB_Serial_Debug = nullptr; | ||
int serial1_printf(const char *__restrict format, ...) { | ||
char buf[256]; | ||
int len; | ||
va_list ap; | ||
va_start(ap, format); | ||
len = vsnprintf(buf, sizeof(buf), format, ap); | ||
- Serial1.write(buf); | ||
+ if (TinyUSB_Serial_Debug) TinyUSB_Serial_Debug->write(buf); | ||
va_end(ap); | ||
return len; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/cores/rp2040/debug_internal.h b/cores/rp2040/debug_internal.h | ||
index 81026fb..e8b206f 100644 | ||
--- a/cores/rp2040/debug_internal.h | ||
+++ b/cores/rp2040/debug_internal.h | ||
@@ -20,6 +20,9 @@ | ||
|
||
#pragma once | ||
|
||
+typedef int SerialPrintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); | ||
+extern SerialPrintf *DEBUG_RP2040_PRINTF; | ||
+ | ||
#if !defined(DEBUG_RP2040_PORT) | ||
#define DEBUGV(...) do { } while(0) | ||
#define DEBUGCORE(...) do { } while(0) | ||
diff --git a/cores/rp2040/main.cpp b/cores/rp2040/main.cpp | ||
index fb1ed21..a8e98f9 100644 | ||
--- a/cores/rp2040/main.cpp | ||
+++ b/cores/rp2040/main.cpp | ||
@@ -24,6 +24,9 @@ | ||
#include <pico/multicore.h> | ||
#include <reent.h> | ||
|
||
+static int dummyDebugPrintf(const char *, ...) { return -1; } | ||
+SerialPrintf *DEBUG_RP2040_PRINTF = dummyDebugPrintf; | ||
+ | ||
RP2040 rp2040; | ||
extern "C" { | ||
volatile bool __otherCoreIdled = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
#define USB3SUN_PANIC_H | ||
|
||
#include "config.h" | ||
#include "pinout.h" | ||
|
||
#include <Arduino.h> | ||
|
||
|
Oops, something went wrong.