Lines Matching refs:tcd

91 void EDMA_InstallTCD(DMA_Type *base, uint32_t channel, edma_tcd_t *tcd)  in EDMA_InstallTCD()  argument
94 assert(tcd != NULL); in EDMA_InstallTCD()
95 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_InstallTCD()
98 base->CH[channel].TCD_SADDR = tcd->SADDR; in EDMA_InstallTCD()
99 base->CH[channel].TCD_SOFF = tcd->SOFF; in EDMA_InstallTCD()
100 base->CH[channel].TCD_ATTR = tcd->ATTR; in EDMA_InstallTCD()
101 base->CH[channel].TCD_NBYTES_MLOFFNO = tcd->NBYTES; in EDMA_InstallTCD()
102 base->CH[channel].TCD_SLAST_SDA = tcd->SLAST; in EDMA_InstallTCD()
103 base->CH[channel].TCD_DADDR = tcd->DADDR; in EDMA_InstallTCD()
104 base->CH[channel].TCD_DOFF = tcd->DOFF; in EDMA_InstallTCD()
105 base->CH[channel].TCD_CITER_ELINKNO = tcd->CITER; in EDMA_InstallTCD()
106 base->CH[channel].TCD_DLAST_SGA = tcd->DLAST_SGA; in EDMA_InstallTCD()
109 base->CH[channel].TCD_CSR = tcd->CSR; in EDMA_InstallTCD()
110 base->CH[channel].TCD_BITER_ELINKNO = tcd->BITER; in EDMA_InstallTCD()
441 void EDMA_TcdReset(edma_tcd_t *tcd) in EDMA_TcdReset() argument
443 assert(tcd != NULL); in EDMA_TcdReset()
444 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdReset()
447 tcd->SADDR = 0U; in EDMA_TcdReset()
448 tcd->SOFF = 0U; in EDMA_TcdReset()
449 tcd->ATTR = 0U; in EDMA_TcdReset()
450 tcd->NBYTES = 0U; in EDMA_TcdReset()
451 tcd->SLAST = 0U; in EDMA_TcdReset()
452 tcd->DADDR = 0U; in EDMA_TcdReset()
453 tcd->DOFF = 0U; in EDMA_TcdReset()
454 tcd->CITER = 0U; in EDMA_TcdReset()
455 tcd->DLAST_SGA = 0U; in EDMA_TcdReset()
457 tcd->CSR = DMA_TCD_CSR_DREQ(true); in EDMA_TcdReset()
458 tcd->BITER = 0U; in EDMA_TcdReset()
491 void EDMA_TcdSetTransferConfig(edma_tcd_t *tcd, const edma_transfer_config_t *config, edma_tcd_t *n… in EDMA_TcdSetTransferConfig() argument
493 assert(tcd != NULL); in EDMA_TcdSetTransferConfig()
494 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetTransferConfig()
502 tcd->SADDR = MEMORY_ConvertMemoryMapAddress(config->srcAddr, kMEMORY_Local2DMA); in EDMA_TcdSetTransferConfig()
504 tcd->DADDR = MEMORY_ConvertMemoryMapAddress(config->destAddr, kMEMORY_Local2DMA); in EDMA_TcdSetTransferConfig()
506 tcd->SADDR = config->srcAddr; in EDMA_TcdSetTransferConfig()
508 tcd->DADDR = config->destAddr; in EDMA_TcdSetTransferConfig()
511tcd->ATTR = DMA_TCD_ATTR_SSIZE(config->srcTransferSize) | DMA_TCD_ATTR_DSIZE(config->destTransferS… in EDMA_TcdSetTransferConfig()
513 tcd->SOFF = (uint16_t)config->srcOffset; in EDMA_TcdSetTransferConfig()
515 tcd->DOFF = (uint16_t)config->destOffset; in EDMA_TcdSetTransferConfig()
517 tcd->NBYTES = config->minorLoopBytes; in EDMA_TcdSetTransferConfig()
519 tcd->CITER = (uint16_t)config->majorLoopCounts; in EDMA_TcdSetTransferConfig()
521 tcd->BITER = (uint16_t)config->majorLoopCounts; in EDMA_TcdSetTransferConfig()
526 tcd->DLAST_SGA = MEMORY_ConvertMemoryMapAddress((uint32_t)nextTcd, kMEMORY_Local2DMA); in EDMA_TcdSetTransferConfig()
528 tcd->DLAST_SGA = (uint32_t)nextTcd; in EDMA_TcdSetTransferConfig()
539 tcd->CSR = (tcd->CSR | (uint16_t)DMA_TCD_CSR_ESG_MASK) & ~(uint16_t)DMA_TCD_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()
566 tcd->NBYTES = tmpreg; in EDMA_TcdSetMinorOffsetConfig()
587 void EDMA_TcdSetChannelLink(edma_tcd_t *tcd, edma_channel_link_type_t type, uint32_t linkedChannel) in EDMA_TcdSetChannelLink() argument
589 assert(tcd != NULL); in EDMA_TcdSetChannelLink()
590 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetChannelLink()
598 tcd->CITER |= DMA_TCD_CITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
599 tcd->BITER |= DMA_TCD_BITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
601 tmpreg = tcd->CITER & (~(uint16_t)DMA_TCD_CITER_ELINKYES_LINKCH_MASK); in EDMA_TcdSetChannelLink()
603 tcd->CITER = tmpreg; in EDMA_TcdSetChannelLink()
604 tmpreg = tcd->BITER & (~(uint16_t)DMA_TCD_BITER_ELINKYES_LINKCH_MASK); in EDMA_TcdSetChannelLink()
606 tcd->BITER = tmpreg; in EDMA_TcdSetChannelLink()
613 tcd->CSR |= DMA_TCD_CSR_MAJORELINK_MASK; in EDMA_TcdSetChannelLink()
615 tmpreg = tcd->CSR & (~(uint16_t)DMA_TCD_CSR_MAJORLINKCH_MASK); in EDMA_TcdSetChannelLink()
616 tcd->CSR = tmpreg | DMA_TCD_CSR_MAJORLINKCH(linkedChannel); in EDMA_TcdSetChannelLink()
620 tcd->CITER &= ~(uint16_t)DMA_TCD_CITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
621 tcd->BITER &= ~(uint16_t)DMA_TCD_BITER_ELINKYES_ELINK_MASK; in EDMA_TcdSetChannelLink()
622 tcd->CSR &= ~(uint16_t)DMA_TCD_CSR_MAJORELINK_MASK; in EDMA_TcdSetChannelLink()
639 void EDMA_TcdSetModulo(edma_tcd_t *tcd, edma_modulo_t srcModulo, edma_modulo_t destModulo) in EDMA_TcdSetModulo() argument
641 assert(tcd != NULL); in EDMA_TcdSetModulo()
642 assert(((uint32_t)tcd & 0x1FU) == 0U); in EDMA_TcdSetModulo()
646 tmpreg = tcd->ATTR & (~(uint16_t)(DMA_TCD_ATTR_SMOD_MASK | DMA_TCD_ATTR_DMOD_MASK)); in EDMA_TcdSetModulo()
647 tcd->ATTR = tmpreg | DMA_TCD_ATTR_DMOD(destModulo) | DMA_TCD_ATTR_SMOD(srcModulo); in EDMA_TcdSetModulo()
657 void EDMA_TcdEnableInterrupts(edma_tcd_t *tcd, uint32_t mask) in EDMA_TcdEnableInterrupts() argument
659 assert(tcd != NULL); in EDMA_TcdEnableInterrupts()
664 tcd->CSR |= DMA_TCD_CSR_INTMAJOR_MASK; in EDMA_TcdEnableInterrupts()
670 tcd->CSR |= DMA_TCD_CSR_INTHALF_MASK; in EDMA_TcdEnableInterrupts()
681 void EDMA_TcdDisableInterrupts(edma_tcd_t *tcd, uint32_t mask) in EDMA_TcdDisableInterrupts() argument
683 assert(tcd != NULL); in EDMA_TcdDisableInterrupts()
688 tcd->CSR &= ~(uint16_t)DMA_TCD_CSR_INTMAJOR_MASK; in EDMA_TcdDisableInterrupts()
694 tcd->CSR &= ~(uint16_t)DMA_TCD_CSR_INTHALF_MASK; in EDMA_TcdDisableInterrupts()