ITM_SendData

__STATIC_INLINE uint32_t ITM_SendData (uint8_t Channel, uint32_t Data, uint8_t DataSizeInBytes) { assert(Channel < 32); assert(DataSizeInBytes <= 4); /* 1, 2, 4 are valid */ assert((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL); /* ITM enabled */ assert((ITM->TER & (1UL << Channel) ) != 0UL); /* ITM Port enabled? */ /* Wait for the buffer to clear */ while (ITM->PORT[Channel].u32 … Continue reading ITM_SendData

CMSIS_ITM_Send

__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) { if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ { while (ITM->PORT[0].u32 == 0UL) { __NOP(); } ITM->PORT[0].u8 = (uint8_t)ch; } return (ch); }