The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
170:e95d10626187
Parent:
165:d1b4690b3f8b
Child:
172:65be27845400
--- a/hal/itm_api.h	Fri Jun 22 15:38:59 2018 +0100
+++ b/hal/itm_api.h	Thu Sep 06 13:39:34 2018 +0100
@@ -22,6 +22,7 @@
 #if defined(DEVICE_ITM)
 
 #include <stdint.h>
+#include <stddef.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,15 +39,15 @@
 
 /**
  * @brief      Target specific initialization function.
- *             This function is responsible for initializing and configuring 
- *             the debug clock for the ITM and setting up the SWO pin for 
+ *             This function is responsible for initializing and configuring
+ *             the debug clock for the ITM and setting up the SWO pin for
  *             debug output.
- *             
+ *
  *             The only Cortex-M register that should be modified is the clock
  *             prescaler in TPI->ACPR.
- *             
- *             The generic mbed_itm_init initialization function will setup: 
- *             
+ *
+ *             The generic mbed_itm_init initialization function will setup:
+ *
  *                  ITM->LAR
  *                  ITM->TPR
  *                  ITM->TCR
@@ -54,7 +55,7 @@
  *                  TPI->SPPR
  *                  TPI->FFCR
  *                  DWT->CTRL
- *                  
+ *
  *             for SWO output on stimulus port 0.
  */
 void itm_init(void);
@@ -68,12 +69,26 @@
  * @brief      Send data over ITM stimulus port.
  *
  * @param[in]  port  The stimulus port to send data over.
- * @param[in]  data  The data to send.
+ * @param[in]  data  The 32-bit data to send.
+ *
+ * The data is written as a single 32-bit write to the port.
  *
  * @return     value of data sent.
  */
 uint32_t mbed_itm_send(uint32_t port, uint32_t data);
 
+/**
+ * @brief      Send a block of data over ITM stimulus port.
+ *
+ * @param[in]  port  The stimulus port to send data over.
+ * @param[in]  data  The block of data to send.
+ * @param[in]  len   The number of bytes of data to send.
+ *
+ * The data is written using multiple appropriately-sized port accesses for
+ * efficient transfer.
+ */
+void mbed_itm_send_block(uint32_t port, const void *data, size_t len);
+
 /**@}*/
 
 #ifdef __cplusplus