Lines Matching refs:tcd

88 void EDMA_InstallTCD(DMA_Type *base, uint32_t channel, edma_tcd_t *tcd)  in EDMA_InstallTCD()  argument
91 assert(tcd != NULL); in EDMA_InstallTCD()
92 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_InstallTCD()
95 base->TCD[channel].SADDR = tcd->SADDR; in EDMA_InstallTCD()
96 base->TCD[channel].SOFF = tcd->SOFF; in EDMA_InstallTCD()
97 base->TCD[channel].ATTR = tcd->ATTR; in EDMA_InstallTCD()
98 base->TCD[channel].NBYTES_MLNO = tcd->NBYTES; in EDMA_InstallTCD()
99 base->TCD[channel].SLAST = (int32_t)tcd->SLAST; in EDMA_InstallTCD()
100 base->TCD[channel].DADDR = tcd->DADDR; in EDMA_InstallTCD()
101 base->TCD[channel].DOFF = tcd->DOFF; in EDMA_InstallTCD()
102 base->TCD[channel].CITER_ELINKNO = tcd->CITER; in EDMA_InstallTCD()
103 base->TCD[channel].DLAST_SGA = (int32_t)tcd->DLAST_SGA; in EDMA_InstallTCD()
106 base->TCD[channel].CSR = tcd->CSR; in EDMA_InstallTCD()
107 base->TCD[channel].BITER_ELINKNO = tcd->BITER; in EDMA_InstallTCD()
445 void EDMA_TcdReset(edma_tcd_t *tcd) in EDMA_TcdReset() argument
447 assert(tcd != NULL); in EDMA_TcdReset()
448 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdReset()
451 tcd->SADDR = 0U; in EDMA_TcdReset()
452 tcd->SOFF = 0U; in EDMA_TcdReset()
453 tcd->ATTR = 0U; in EDMA_TcdReset()
454 tcd->NBYTES = 0U; in EDMA_TcdReset()
455 tcd->SLAST = 0U; in EDMA_TcdReset()
456 tcd->DADDR = 0U; in EDMA_TcdReset()
457 tcd->DOFF = 0U; in EDMA_TcdReset()
458 tcd->CITER = 0U; in EDMA_TcdReset()
459 tcd->DLAST_SGA = 0U; in EDMA_TcdReset()
461 tcd->CSR = DMA_CSR_DREQ(1U); in EDMA_TcdReset()
462 tcd->BITER = 0U; in EDMA_TcdReset()
492 void EDMA_TcdSetTransferConfig(edma_tcd_t *tcd, const edma_transfer_config_t *config, edma_tcd_t *n… in EDMA_TcdSetTransferConfig() argument
494 assert(tcd != NULL); in EDMA_TcdSetTransferConfig()
495 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetTransferConfig()
503 tcd->SADDR = MEMORY_ConvertMemoryMapAddress(config->srcAddr, kMEMORY_Local2DMA); in EDMA_TcdSetTransferConfig()
505 tcd->DADDR = MEMORY_ConvertMemoryMapAddress(config->destAddr, kMEMORY_Local2DMA); in EDMA_TcdSetTransferConfig()
507 tcd->SADDR = config->srcAddr; in EDMA_TcdSetTransferConfig()
509 tcd->DADDR = config->destAddr; in EDMA_TcdSetTransferConfig()
512 tcd->ATTR = DMA_ATTR_SSIZE(config->srcTransferSize) | DMA_ATTR_DSIZE(config->destTransferSize); in EDMA_TcdSetTransferConfig()
514 tcd->SOFF = (uint16_t)config->srcOffset; in EDMA_TcdSetTransferConfig()
516 tcd->DOFF = (uint16_t)config->destOffset; in EDMA_TcdSetTransferConfig()
518 tcd->NBYTES = config->minorLoopBytes; in EDMA_TcdSetTransferConfig()
520 tcd->CITER = (uint16_t)config->majorLoopCounts; in EDMA_TcdSetTransferConfig()
522 tcd->BITER = (uint16_t)config->majorLoopCounts; in EDMA_TcdSetTransferConfig()
527 tcd->DLAST_SGA = MEMORY_ConvertMemoryMapAddress((uint32_t)nextTcd, kMEMORY_Local2DMA); in EDMA_TcdSetTransferConfig()
529 tcd->DLAST_SGA = (uint32_t)nextTcd; in EDMA_TcdSetTransferConfig()
540 tcd->CSR = (tcd->CSR | (uint16_t)DMA_CSR_ESG_MASK) & ~(uint16_t)DMA_CSR_DREQ_MASK; in EDMA_TcdSetTransferConfig()
553 void EDMA_TcdSetMinorOffsetConfig(edma_tcd_t *tcd, const edma_minor_offset_config_t *config) in EDMA_TcdSetMinorOffsetConfig() argument
555 assert(tcd != NULL); in EDMA_TcdSetMinorOffsetConfig()
556 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetMinorOffsetConfig()
560 tmpreg = tcd->NBYTES & in EDMA_TcdSetMinorOffsetConfig()
565 tcd->NBYTES = tmpreg; in EDMA_TcdSetMinorOffsetConfig()
577 void EDMA_TcdSetMajorOffsetConfig(edma_tcd_t *tcd, int32_t sourceOffset, int32_t destOffset) in EDMA_TcdSetMajorOffsetConfig() argument
579 assert(tcd != NULL); in EDMA_TcdSetMajorOffsetConfig()
580 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetMajorOffsetConfig()
582 tcd->SLAST = (uint32_t)sourceOffset; in EDMA_TcdSetMajorOffsetConfig()
583 tcd->DLAST_SGA = (uint32_t)destOffset; in EDMA_TcdSetMajorOffsetConfig()
601 void EDMA_TcdSetChannelLink(edma_tcd_t *tcd, edma_channel_link_type_t linkType, uint32_t linkedChan… in EDMA_TcdSetChannelLink() argument
603 assert(tcd != NULL); in EDMA_TcdSetChannelLink()
604 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetChannelLink()
612 tcd->CITER |= DMA_CITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
613 tcd->BITER |= DMA_BITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
615 tmpreg = tcd->CITER & (~(uint16_t)DMA_CITER_ELINKYES_LINKCH_MASK); in EDMA_TcdSetChannelLink()
617 tcd->CITER = tmpreg; in EDMA_TcdSetChannelLink()
618 tmpreg = tcd->BITER & (~(uint16_t)DMA_BITER_ELINKYES_LINKCH_MASK); in EDMA_TcdSetChannelLink()
620 tcd->BITER = tmpreg; in EDMA_TcdSetChannelLink()
627 tcd->CSR |= DMA_CSR_MAJORELINK_MASK; in EDMA_TcdSetChannelLink()
629 tmpreg = tcd->CSR & (~(uint16_t)DMA_CSR_MAJORLINKCH_MASK); in EDMA_TcdSetChannelLink()
630 tcd->CSR = tmpreg | DMA_CSR_MAJORLINKCH(linkedChannel); in EDMA_TcdSetChannelLink()
634 tcd->CITER &= ~(uint16_t)DMA_CITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
635 tcd->BITER &= ~(uint16_t)DMA_BITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
636 tcd->CSR &= ~(uint16_t)DMA_CSR_MAJORELINK_MASK; in EDMA_TcdSetChannelLink()
651 void EDMA_TcdSetModulo(edma_tcd_t *tcd, edma_modulo_t srcModulo, edma_modulo_t destModulo) in EDMA_TcdSetModulo() argument
653 assert(tcd != NULL); in EDMA_TcdSetModulo()
654 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetModulo()
658 tmpreg = tcd->ATTR & (~(uint16_t)(DMA_ATTR_SMOD_MASK | DMA_ATTR_DMOD_MASK)); in EDMA_TcdSetModulo()
659 tcd->ATTR = tmpreg | DMA_ATTR_DMOD(destModulo) | DMA_ATTR_SMOD(srcModulo); in EDMA_TcdSetModulo()
669 void EDMA_TcdEnableInterrupts(edma_tcd_t *tcd, uint32_t mask) in EDMA_TcdEnableInterrupts() argument
671 assert(tcd != NULL); in EDMA_TcdEnableInterrupts()
676 tcd->CSR |= DMA_CSR_INTMAJOR_MASK; in EDMA_TcdEnableInterrupts()
682 tcd->CSR |= DMA_CSR_INTHALF_MASK; in EDMA_TcdEnableInterrupts()
693 void EDMA_TcdDisableInterrupts(edma_tcd_t *tcd, uint32_t mask) in EDMA_TcdDisableInterrupts() argument
695 assert(tcd != NULL); in EDMA_TcdDisableInterrupts()
700 tcd->CSR &= ~(uint16_t)DMA_CSR_INTMAJOR_MASK; in EDMA_TcdDisableInterrupts()
706 tcd->CSR &= ~(uint16_t)DMA_CSR_INTHALF_MASK; in EDMA_TcdDisableInterrupts()