Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: drivers/SerialWireOutput.h
- Revision:
- 187:0387e8f68319
- Parent:
- 186:707f6e361f3e
- Child:
- 188:bcfe06ba3d64
--- a/drivers/SerialWireOutput.h Fri Jun 22 16:45:37 2018 +0100
+++ b/drivers/SerialWireOutput.h Thu Sep 06 13:40:20 2018 +0100
@@ -20,7 +20,7 @@
#include "platform/FileHandle.h"
namespace mbed {
-
+
class SerialWireOutput : public FileHandle {
public:
@@ -33,12 +33,8 @@
virtual ssize_t write(const void *buffer, size_t size)
{
- const unsigned char *buf = static_cast<const unsigned char *>(buffer);
+ mbed_itm_send_block(ITM_PORT_SWO, buffer, size);
- /* Send buffer one character at a time over the ITM SWO port */
- for (size_t i = 0; i < size; i++) {
- mbed_itm_send(ITM_PORT_SWO, buf[i]);
- }
return size;
}
@@ -71,7 +67,7 @@
return 0;
}
};
-
+
} // namespace mbed
#endif


