Modified for BG96
Fork of mbed-dev by
Diff: hal/itm_api.h
- Revision:
- 187:0387e8f68319
- Parent:
- 184:08ed48f1de7f
diff -r 707f6e361f3e -r 0387e8f68319 hal/itm_api.h --- a/hal/itm_api.h Fri Jun 22 16:45:37 2018 +0100 +++ b/hal/itm_api.h Thu Sep 06 13:40:20 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