HAL_ChibiOS: return zeros in dma.txt on first fetch

This commit is contained in:
Andrew Tridgell 2021-06-01 10:45:16 +10:00 committed by Randy Mackay
parent 819bb2938b
commit 8701932670

View File

@ -235,7 +235,7 @@ void Shared_DMA::dma_info(ExpandingString &str)
// no buffer allocated, start counting
if (_contention_stats == nullptr) {
_contention_stats = new dma_stats[SHARED_DMA_MAX_STREAM_ID+1];
return;
// return zeros on first fetch
}
// a header to allow for machine parsers to determine format