- Fri Dec 11, 2015 3:48 pm
#36238
I got the second UART running and am able to have debug output there.
There is still some debug output on the UART0 (some of it comes from ROM bootloader), but at least I am able to have the debugf not interfere with UART0.
I actually feel a bit ashamed about the way I got it running- I merged in HardwareSerial plus some other small bits from esp8266/Arduino.
Adding a 2nd fully functional UART to Sming would involve rewriting Sming's HardwareSerial anyway because the current version depends on UartDev in ROM, and I didn't see an easy way to access second UART the same way.
Anyway, my code is here:
https://github.com/festlv/Sming/commit/ ... ac93fca201Beware, there are definitely rough edges and it's not 100% compatible with Sming's HardwareSerial (namely, CommandExecutor and Delegate parts, which I don't care about).
Usage:
Code: Select allvoid init() {
Serial1.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
Serial.begin(57600);
Serial.systemDebugOutput(false);
Serial1.systemDebugOutput(true);
debugf("This now goes out to GPIO2");
}