Lines Matching refs:descriptor
63 cy_en_dmac_status_t Cy_DMAC_Descriptor_Init(cy_stc_dmac_descriptor_t * descriptor, const cy_stc_dma… in Cy_DMAC_Descriptor_Init() argument
67 if ((NULL != descriptor) && (NULL != config)) in Cy_DMAC_Descriptor_Init()
79 descriptor->ctl = in Cy_DMAC_Descriptor_Init()
91 descriptor->src = (uint32_t)config->srcAddress; in Cy_DMAC_Descriptor_Init()
95 Cy_DMAC_Descriptor_SetDstAddress(descriptor, config->dstAddress); in Cy_DMAC_Descriptor_Init()
100 Cy_DMAC_Descriptor_SetXloopDataCount(descriptor, config->xCount); in Cy_DMAC_Descriptor_Init()
103 Cy_DMAC_Descriptor_SetNextDescriptor(descriptor, config->nextDescriptor); in Cy_DMAC_Descriptor_Init()
111 descriptor->xIncr = _VAL2FLD(DMAC_CH_V2_DESCR_X_INCR_SRC_X, config->srcXincrement) | in Cy_DMAC_Descriptor_Init()
117 Cy_DMAC_Descriptor_SetYloopDataCount(descriptor, config->yCount); in Cy_DMAC_Descriptor_Init()
122 descriptor->yIncr = _VAL2FLD(DMAC_CH_V2_DESCR_Y_INCR_SRC_Y, config->srcYincrement) | in Cy_DMAC_Descriptor_Init()
146 void Cy_DMAC_Descriptor_DeInit(cy_stc_dmac_descriptor_t * descriptor) in Cy_DMAC_Descriptor_DeInit() argument
148 descriptor->ctl = 0UL; in Cy_DMAC_Descriptor_DeInit()
149 descriptor->src = 0UL; in Cy_DMAC_Descriptor_DeInit()
150 descriptor->dst = 0UL; in Cy_DMAC_Descriptor_DeInit()
151 descriptor->xSize = 0UL; in Cy_DMAC_Descriptor_DeInit()
152 descriptor->xIncr = 0UL; in Cy_DMAC_Descriptor_DeInit()
153 descriptor->ySize = 0UL; in Cy_DMAC_Descriptor_DeInit()
154 descriptor->yIncr = 0UL; in Cy_DMAC_Descriptor_DeInit()
155 descriptor->nextPtr = 0UL; in Cy_DMAC_Descriptor_DeInit()
186 … != base) && (CY_DMAC_IS_CH_NR_VALID(channel)) && (NULL != config) && (NULL != config->descriptor)) in Cy_DMAC_Channel_Init()
191 DMAC_CH_CURR(base, channel) = (uint32_t)config->descriptor; in Cy_DMAC_Channel_Init()
257 uint32_t Cy_DMAC_Descriptor_GetXloopDataCount(cy_stc_dmac_descriptor_t const * descriptor) in Cy_DMAC_Descriptor_GetXloopDataCount() argument
260 … cy_en_dmac_descriptor_type_t locDescriptorType = Cy_DMAC_Descriptor_GetDescriptorType(descriptor); in Cy_DMAC_Descriptor_GetXloopDataCount()
267 …L(DMAC_CH_V2_DESCR_X_SIZE_X_COUNT, ((cy_stc_dmac_dscr_scatter_t const*)descriptor)->xSize) + 1UL) … in Cy_DMAC_Descriptor_GetXloopDataCount()
272 retVal = _FLD2VAL(DMAC_CH_V2_DESCR_X_SIZE_X_COUNT, descriptor->xSize) + 1UL; in Cy_DMAC_Descriptor_GetXloopDataCount()
303 void Cy_DMAC_Descriptor_SetXloopDataCount(cy_stc_dmac_descriptor_t * descriptor, uint32_t xCount) in Cy_DMAC_Descriptor_SetXloopDataCount() argument
305 … cy_en_dmac_descriptor_type_t locDescriptorType = Cy_DMAC_Descriptor_GetDescriptorType(descriptor); in Cy_DMAC_Descriptor_SetXloopDataCount()
313 …((cy_stc_dmac_dscr_scatter_t*)descriptor)->xSize = _VAL2FLD(DMAC_CH_V2_DESCR_X_SIZE_X_COUNT, (xCou… in Cy_DMAC_Descriptor_SetXloopDataCount()
319 descriptor->xSize = _VAL2FLD(DMAC_CH_V2_DESCR_X_SIZE_X_COUNT, xCount - 1UL); in Cy_DMAC_Descriptor_SetXloopDataCount()
348 void Cy_DMAC_Descriptor_SetNextDescriptor(cy_stc_dmac_descriptor_t * descriptor, cy_stc_dmac_descri… in Cy_DMAC_Descriptor_SetNextDescriptor() argument
350 CY_ASSERT_L1(NULL != descriptor); in Cy_DMAC_Descriptor_SetNextDescriptor()
352 switch((cy_en_dmac_descriptor_type_t)_FLD2VAL(DMAC_CH_V2_DESCR_CTL_DESCR_TYPE, descriptor->ctl)) in Cy_DMAC_Descriptor_SetNextDescriptor()
357 ((cy_stc_dmac_dscr_single_t*)descriptor)->nextPtr = (uint32_t)nextDescriptor; in Cy_DMAC_Descriptor_SetNextDescriptor()
361 ((cy_stc_dmac_dscr_memcpy_t*)descriptor)->nextPtr = (uint32_t)nextDescriptor; in Cy_DMAC_Descriptor_SetNextDescriptor()
365 ((cy_stc_dmac_dscr_1d_t*)descriptor)->nextPtr = (uint32_t)nextDescriptor; in Cy_DMAC_Descriptor_SetNextDescriptor()
369 ((cy_stc_dmac_dscr_2d_t*)descriptor)->nextPtr = (uint32_t)nextDescriptor; in Cy_DMAC_Descriptor_SetNextDescriptor()
402 …ac_descriptor_t * Cy_DMAC_Descriptor_GetNextDescriptor(cy_stc_dmac_descriptor_t const * descriptor) in Cy_DMAC_Descriptor_GetNextDescriptor() argument
406 switch((cy_en_dmac_descriptor_type_t)_FLD2VAL(DMAC_CH_V2_DESCR_CTL_DESCR_TYPE, descriptor->ctl)) in Cy_DMAC_Descriptor_GetNextDescriptor()
411 retVal = ((cy_stc_dmac_dscr_single_t const*)descriptor)->nextPtr; in Cy_DMAC_Descriptor_GetNextDescriptor()
415 retVal = ((cy_stc_dmac_dscr_memcpy_t const*)descriptor)->nextPtr; in Cy_DMAC_Descriptor_GetNextDescriptor()
419 retVal = ((cy_stc_dmac_dscr_1d_t const*)descriptor)->nextPtr; in Cy_DMAC_Descriptor_GetNextDescriptor()
423 retVal = ((cy_stc_dmac_dscr_2d_t const*)descriptor)->nextPtr; in Cy_DMAC_Descriptor_GetNextDescriptor()
459 void Cy_DMAC_Descriptor_SetDescriptorType(cy_stc_dmac_descriptor_t * descriptor, cy_en_dmac_descrip… in Cy_DMAC_Descriptor_SetDescriptorType() argument
463 …if (descriptorType != Cy_DMAC_Descriptor_GetDescriptorType(descriptor)) /* Do not perform if the t… in Cy_DMAC_Descriptor_SetDescriptorType()
466 …_stc_dmac_descriptor_t const *locNextDescriptor = Cy_DMAC_Descriptor_GetNextDescriptor(descriptor); in Cy_DMAC_Descriptor_SetDescriptorType()
468 uint32_t locXcount = Cy_DMAC_Descriptor_GetXloopDataCount(descriptor); in Cy_DMAC_Descriptor_SetDescriptorType()
470 CY_REG32_CLR_SET(descriptor->ctl, DMAC_CH_V2_DESCR_CTL_DESCR_TYPE, descriptorType); in Cy_DMAC_Descriptor_SetDescriptorType()
472 Cy_DMAC_Descriptor_SetXloopDataCount(descriptor, locXcount); in Cy_DMAC_Descriptor_SetDescriptorType()
474 Cy_DMAC_Descriptor_SetNextDescriptor(descriptor, locNextDescriptor); in Cy_DMAC_Descriptor_SetDescriptorType()