Hi,
can you please explain what the macro "assert" in fsl_edma.c does?
void EDMA_InstallTCD(DMA_Type *base, uint32_t channel, edma_tcd_t *tcd)
{
assert(channel < (uint32_t)FSL_FEATURE_EDMA_MODULE_CHANNEL);
assert(tcd != NULL);
assert(((uint32_t)tcd & 0x1FU) == 0U);
Especially the last one is of interest and what its purpose is.
Thanks
Guenter
解決済! 解決策の投稿を見る。
that last assert ensures that the pointer is pointing to an address of a multiple of 32.
I did not check the details of that DMA implementation, but it is common that things point to a buffer with a multiple size of some kind, so pointing to something with a multiple of 32 (or better: aligned to a multiple-of-32) makes sense.
You would need to check the DMA implementation/data sheet, I'm sure there should be a reference about this somewhere.
I hope this helps,
Erich
that last assert ensures that the pointer is pointing to an address of a multiple of 32.
I did not check the details of that DMA implementation, but it is common that things point to a buffer with a multiple size of some kind, so pointing to something with a multiple of 32 (or better: aligned to a multiple-of-32) makes sense.
You would need to check the DMA implementation/data sheet, I'm sure there should be a reference about this somewhere.
I hope this helps,
Erich