output stream library using SYS_WRITEC(0x03).
Embed:
(wiki syntax)
Show/hide line numbers
SWDSerial.cpp
00001 #include "mbed_interface.h" 00002 #include "SWDSerial.h" 00003 00004 #define SYS_WRITEC 0x03 00005 00006 namespace mbed { 00007 int readable() { return 0;} 00008 int writeable() { return 1; } 00009 int SWDSerial::_getc() { 00010 return 0; 00011 } 00012 00013 int SWDSerial::_putc(int c) { 00014 if (!mbed_interface_connected()) { 00015 return c; 00016 } 00017 return __semihost(SYS_WRITEC, &c); 00018 } 00019 00020 } // namespace mbed
Generated on Wed Aug 3 2022 03:14:00 by 1.7.2