38 #if defined( LDMA_PRESENT ) && ( LDMA_COUNT == 1 )
242 #if defined(LDMA_CH_REQSEL_SIGSEL_ADC0SCAN)
245 #if defined(LDMA_CH_REQSEL_SIGSEL_ADC0SINGLE)
248 #if defined( LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0RD )
251 #if defined( LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0WR )
254 #if defined( LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0XWR )
257 #if defined( LDMA_CH_REQSEL_SIGSEL_CRYPTODATA1RD )
260 #if defined( LDMA_CH_REQSEL_SIGSEL_CRYPTODATA1WR )
263 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA0RD)
264 ldmaPeripheralSignal_CRYPTO0_DATA0RD = LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA0RD | LDMA_CH_REQSEL_SOURCESEL_CRYPTO0,
266 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA0WR)
267 ldmaPeripheralSignal_CRYPTO0_DATA0WR = LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA0WR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO0,
269 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA0XWR)
270 ldmaPeripheralSignal_CRYPTO0_DATA0XWR = LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA0XWR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO0,
272 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA1RD)
273 ldmaPeripheralSignal_CRYPTO0_DATA1RD = LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA1RD | LDMA_CH_REQSEL_SOURCESEL_CRYPTO0,
275 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA1WR)
276 ldmaPeripheralSignal_CRYPTO0_DATA1WR = LDMA_CH_REQSEL_SIGSEL_CRYPTO0DATA1WR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO0,
278 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA0RD)
279 ldmaPeripheralSignal_CRYPTO1_DATA0RD = LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA0RD | LDMA_CH_REQSEL_SOURCESEL_CRYPTO1,
281 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA0WR)
282 ldmaPeripheralSignal_CRYPTO1_DATA0WR = LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA0WR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO1,
284 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA0XWR)
285 ldmaPeripheralSignal_CRYPTO1_DATA0XWR = LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA0XWR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO1,
287 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA1RD)
288 ldmaPeripheralSignal_CRYPTO1_DATA1RD = LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA1RD | LDMA_CH_REQSEL_SOURCESEL_CRYPTO1,
290 #if defined(LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA1WR)
291 ldmaPeripheralSignal_CRYPTO1_DATA1WR = LDMA_CH_REQSEL_SIGSEL_CRYPTO1DATA1WR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO1,
293 #if defined(LDMA_CH_REQSEL_SIGSEL_CSENBSLN)
294 ldmaPeripheralSignal_CSEN_BSLN = LDMA_CH_REQSEL_SIGSEL_CSENBSLN | LDMA_CH_REQSEL_SOURCESEL_CSEN,
296 #if defined(LDMA_CH_REQSEL_SIGSEL_CSENDATA)
297 ldmaPeripheralSignal_CSEN_DATA = LDMA_CH_REQSEL_SIGSEL_CSENDATA | LDMA_CH_REQSEL_SOURCESEL_CSEN,
299 #if defined(LDMA_CH_REQSEL_SIGSEL_I2C0RXDATAV)
302 #if defined(LDMA_CH_REQSEL_SIGSEL_I2C0TXBL)
305 #if defined(LDMA_CH_REQSEL_SIGSEL_I2C1RXDATAV)
306 ldmaPeripheralSignal_I2C1_RXDATAV = LDMA_CH_REQSEL_SIGSEL_I2C1RXDATAV | LDMA_CH_REQSEL_SOURCESEL_I2C1,
308 #if defined(LDMA_CH_REQSEL_SIGSEL_I2C1TXBL)
309 ldmaPeripheralSignal_I2C1_TXBL = LDMA_CH_REQSEL_SIGSEL_I2C1TXBL | LDMA_CH_REQSEL_SOURCESEL_I2C1,
311 #if defined(LDMA_CH_REQSEL_SIGSEL_LESENSEBUFDATAV)
312 ldmaPeripheralSignal_LESENSE_BUFDATAV = LDMA_CH_REQSEL_SIGSEL_LESENSEBUFDATAV | LDMA_CH_REQSEL_SOURCESEL_LESENSE,
314 #if defined(LDMA_CH_REQSEL_SIGSEL_LEUART0RXDATAV)
317 #if defined(LDMA_CH_REQSEL_SIGSEL_LEUART0TXBL)
320 #if defined(LDMA_CH_REQSEL_SIGSEL_LEUART0TXEMPTY)
323 #if defined(LDMA_CH_REQSEL_SIGSEL_MSCWDATA)
326 #if defined(LDMA_CH_REQSEL_SIGSEL_PRSREQ0)
329 #if defined(LDMA_CH_REQSEL_SIGSEL_PRSREQ1)
332 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER0CC0)
335 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER0CC1)
338 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER0CC2)
341 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER0UFOF)
344 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER1CC0)
347 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER1CC1)
350 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER1CC2)
353 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER1CC3)
356 #if defined(LDMA_CH_REQSEL_SIGSEL_TIMER1UFOF)
359 #if defined(LDMA_CH_REQSEL_SIGSEL_USART0RXDATAV)
362 #if defined(LDMA_CH_REQSEL_SIGSEL_USART0TXBL)
365 #if defined(LDMA_CH_REQSEL_SIGSEL_USART0TXEMPTY)
368 #if defined(LDMA_CH_REQSEL_SIGSEL_USART1RXDATAV)
371 #if defined(LDMA_CH_REQSEL_SIGSEL_USART1RXDATAVRIGHT)
374 #if defined(LDMA_CH_REQSEL_SIGSEL_USART1TXBL)
377 #if defined(LDMA_CH_REQSEL_SIGSEL_USART1TXBLRIGHT)
380 #if defined(LDMA_CH_REQSEL_SIGSEL_USART1TXEMPTY)
383 #if defined(LDMA_CH_REQSEL_SIGSEL_USART2RXDATAV)
384 ldmaPeripheralSignal_USART2_RXDATAV = LDMA_CH_REQSEL_SIGSEL_USART2RXDATAV | LDMA_CH_REQSEL_SOURCESEL_USART2,
386 #if defined(LDMA_CH_REQSEL_SIGSEL_USART2TXBL)
387 ldmaPeripheralSignal_USART2_TXBL = LDMA_CH_REQSEL_SIGSEL_USART2TXBL | LDMA_CH_REQSEL_SOURCESEL_USART2,
389 #if defined(LDMA_CH_REQSEL_SIGSEL_USART2TXEMPTY)
390 ldmaPeripheralSignal_USART2_TXEMPTY = LDMA_CH_REQSEL_SIGSEL_USART2TXEMPTY | LDMA_CH_REQSEL_SOURCESEL_USART2,
392 #if defined(LDMA_CH_REQSEL_SIGSEL_USART3RXDATAV)
393 ldmaPeripheralSignal_USART3_RXDATAV = LDMA_CH_REQSEL_SIGSEL_USART3RXDATAV | LDMA_CH_REQSEL_SOURCESEL_USART3,
395 #if defined(LDMA_CH_REQSEL_SIGSEL_USART3RXDATAVRIGHT)
396 ldmaPeripheralSignal_USART3_RXDATAVRIGHT = LDMA_CH_REQSEL_SIGSEL_USART3RXDATAVRIGHT | LDMA_CH_REQSEL_SOURCESEL_USART3,
398 #if defined(LDMA_CH_REQSEL_SIGSEL_USART3TXBL)
399 ldmaPeripheralSignal_USART3_TXBL = LDMA_CH_REQSEL_SIGSEL_USART3TXBL | LDMA_CH_REQSEL_SOURCESEL_USART3,
401 #if defined(LDMA_CH_REQSEL_SIGSEL_USART3TXBLRIGHT)
402 ldmaPeripheralSignal_USART3_TXBLRIGHT = LDMA_CH_REQSEL_SIGSEL_USART3TXBLRIGHT | LDMA_CH_REQSEL_SOURCESEL_USART3,
404 #if defined(LDMA_CH_REQSEL_SIGSEL_USART3TXEMPTY)
405 ldmaPeripheralSignal_USART3_TXEMPTY = LDMA_CH_REQSEL_SIGSEL_USART3TXEMPTY | LDMA_CH_REQSEL_SOURCESEL_USART3,
407 #if defined(LDMA_CH_REQSEL_SIGSEL_VDAC0CH0)
408 ldmaPeripheralSignal_VDAC0_CH0 = LDMA_CH_REQSEL_SIGSEL_VDAC0CH0 | LDMA_CH_REQSEL_SOURCESEL_VDAC0,
410 #if defined(LDMA_CH_REQSEL_SIGSEL_VDAC0CH1)
411 ldmaPeripheralSignal_VDAC0_CH1 = LDMA_CH_REQSEL_SIGSEL_VDAC0CH1 | LDMA_CH_REQSEL_SOURCESEL_VDAC0,
413 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER0CC0)
414 ldmaPeripheralSignal_WTIMER0_CC0 = LDMA_CH_REQSEL_SIGSEL_WTIMER0CC0 | LDMA_CH_REQSEL_SOURCESEL_WTIMER0,
416 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER0CC1)
417 ldmaPeripheralSignal_WTIMER0_CC1 = LDMA_CH_REQSEL_SIGSEL_WTIMER0CC1 | LDMA_CH_REQSEL_SOURCESEL_WTIMER0,
419 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER0CC2)
420 ldmaPeripheralSignal_WTIMER0_CC2 = LDMA_CH_REQSEL_SIGSEL_WTIMER0CC2 | LDMA_CH_REQSEL_SOURCESEL_WTIMER0,
422 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER0UFOF)
423 ldmaPeripheralSignal_WTIMER0_UFOF = LDMA_CH_REQSEL_SIGSEL_WTIMER0UFOF | LDMA_CH_REQSEL_SOURCESEL_WTIMER0,
425 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER1CC0)
426 ldmaPeripheralSignal_WTIMER1_CC0 = LDMA_CH_REQSEL_SIGSEL_WTIMER1CC0 | LDMA_CH_REQSEL_SOURCESEL_WTIMER1,
428 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER1CC1)
429 ldmaPeripheralSignal_WTIMER1_CC1 = LDMA_CH_REQSEL_SIGSEL_WTIMER1CC1 | LDMA_CH_REQSEL_SOURCESEL_WTIMER1,
431 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER1CC2)
432 ldmaPeripheralSignal_WTIMER1_CC2 = LDMA_CH_REQSEL_SIGSEL_WTIMER1CC2 | LDMA_CH_REQSEL_SOURCESEL_WTIMER1,
434 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER1CC3)
435 ldmaPeripheralSignal_WTIMER1_CC3 = LDMA_CH_REQSEL_SIGSEL_WTIMER1CC3 | LDMA_CH_REQSEL_SOURCESEL_WTIMER1,
437 #if defined(LDMA_CH_REQSEL_SIGSEL_WTIMER1UFOF)
438 ldmaPeripheralSignal_WTIMER1_UFOF = LDMA_CH_REQSEL_SIGSEL_WTIMER1UFOF | LDMA_CH_REQSEL_SOURCESEL_WTIMER1
464 uint32_t structType : 2;
465 uint32_t reserved0 : 1;
466 uint32_t structReq : 1;
467 uint32_t xferCnt : 11;
468 uint32_t byteSwap : 1;
469 uint32_t blockSize : 4;
470 uint32_t doneIfs : 1;
471 uint32_t reqMode : 1;
472 uint32_t decLoopCnt : 1;
473 uint32_t ignoreSrec : 1;
477 uint32_t srcAddrMode: 1;
478 uint32_t dstAddrMode: 1;
483 uint32_t linkMode : 1;
485 int32_t linkAddr : 30;
493 uint32_t structType : 2;
494 uint32_t reserved0 : 1;
495 uint32_t structReq : 1;
496 uint32_t xferCnt : 11;
497 uint32_t byteSwap : 1;
498 uint32_t blockSize : 4;
499 uint32_t doneIfs : 1;
500 uint32_t reqMode : 1;
501 uint32_t decLoopCnt : 1;
502 uint32_t ignoreSrec : 1;
506 uint32_t srcAddrMode: 1;
507 uint32_t dstAddrMode: 1;
509 uint32_t syncSet : 8;
510 uint32_t syncClr : 8;
511 uint32_t reserved3 : 16;
512 uint32_t matchVal : 8;
513 uint32_t matchEn : 8;
514 uint32_t reserved4 : 16;
516 uint32_t linkMode : 1;
518 int32_t linkAddr : 30;
524 uint32_t structType : 2;
525 uint32_t reserved0 : 1;
526 uint32_t structReq : 1;
527 uint32_t xferCnt : 11;
528 uint32_t byteSwap : 1;
529 uint32_t blockSize : 4;
530 uint32_t doneIfs : 1;
531 uint32_t reqMode : 1;
532 uint32_t decLoopCnt : 1;
533 uint32_t ignoreSrec : 1;
537 uint32_t srcAddrMode: 1;
538 uint32_t dstAddrMode: 1;
543 uint32_t linkMode : 1;
545 int32_t linkAddr : 30;
586 #define LDMA_INIT_DEFAULT \
588 .ldmaInitCtrlNumFixed = _LDMA_CTRL_NUMFIXED_DEFAULT, \
589 .ldmaInitCtrlSyncPrsClrEn = 0, \
590 .ldmaInitCtrlSyncPrsSetEn = 0, \
591 .ldmaInitIrqPriority = 3 \
598 #define LDMA_TRANSFER_CFG_MEMORY() \
601 false, false, ldmaCfgArbSlotsAs1, \
602 ldmaCfgSrcIncSignPos, ldmaCfgDstIncSignPos, 0 \
609 #define LDMA_TRANSFER_CFG_MEMORY_LOOP(loopCnt) \
612 false, false, ldmaCfgArbSlotsAs1, \
613 ldmaCfgSrcIncSignPos, ldmaCfgDstIncSignPos, \
621 #define LDMA_TRANSFER_CFG_PERIPHERAL(signal) \
623 signal, 0, 0, 0, 0, \
624 false, false, ldmaCfgArbSlotsAs1, \
625 ldmaCfgSrcIncSignPos, ldmaCfgDstIncSignPos, 0 \
632 #define LDMA_TRANSFER_CFG_PERIPHERAL_LOOP(signal, loopCnt) \
634 signal, 0, 0, 0, 0, \
635 false, false, ldmaCfgArbSlotsAs1, \
636 ldmaCfgSrcIncSignPos, ldmaCfgDstIncSignPos, loopCnt \
646 #define LDMA_DESCRIPTOR_SINGLE_M2M_WORD(src, dest, count) \
650 .structType = ldmaCtrlStructTypeXfer, \
652 .xferCnt = ( count ) - 1, \
654 .blockSize = ldmaCtrlBlockSizeUnit1, \
656 .reqMode = ldmaCtrlReqModeAll, \
659 .srcInc = ldmaCtrlSrcIncOne, \
660 .size = ldmaCtrlSizeWord, \
661 .dstInc = ldmaCtrlDstIncOne, \
662 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
663 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
664 .srcAddr = (uint32_t)(src), \
665 .dstAddr = (uint32_t)(dest), \
679 #define LDMA_DESCRIPTOR_SINGLE_M2M_HALF(src, dest, count) \
683 .structType = ldmaCtrlStructTypeXfer, \
685 .xferCnt = ( count ) - 1, \
687 .blockSize = ldmaCtrlBlockSizeUnit1, \
689 .reqMode = ldmaCtrlReqModeAll, \
692 .srcInc = ldmaCtrlSrcIncOne, \
693 .size = ldmaCtrlSizeHalf, \
694 .dstInc = ldmaCtrlDstIncOne, \
695 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
696 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
697 .srcAddr = (uint32_t)(src), \
698 .dstAddr = (uint32_t)(dest), \
712 #define LDMA_DESCRIPTOR_SINGLE_M2M_BYTE(src, dest, count) \
716 .structType = ldmaCtrlStructTypeXfer, \
718 .xferCnt = (count) - 1, \
720 .blockSize = ldmaCtrlBlockSizeUnit1, \
722 .reqMode = ldmaCtrlReqModeAll, \
725 .srcInc = ldmaCtrlSrcIncOne, \
726 .size = ldmaCtrlSizeByte, \
727 .dstInc = ldmaCtrlDstIncOne, \
728 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
729 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
730 .srcAddr = (uint32_t)(src), \
731 .dstAddr = (uint32_t)(dest), \
750 #define LDMA_DESCRIPTOR_LINKABS_M2M_WORD(src, dest, count) \
754 .structType = ldmaCtrlStructTypeXfer, \
756 .xferCnt = (count) - 1, \
758 .blockSize = ldmaCtrlBlockSizeUnit1, \
760 .reqMode = ldmaCtrlReqModeAll, \
763 .srcInc = ldmaCtrlSrcIncOne, \
764 .size = ldmaCtrlSizeWord, \
765 .dstInc = ldmaCtrlDstIncOne, \
766 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
767 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
768 .srcAddr = (uint32_t)(src), \
769 .dstAddr = (uint32_t)(dest), \
770 .linkMode = ldmaLinkModeAbs, \
788 #define LDMA_DESCRIPTOR_LINKABS_M2M_HALF(src, dest, count) \
792 .structType = ldmaCtrlStructTypeXfer, \
794 .xferCnt = (count) - 1, \
796 .blockSize = ldmaCtrlBlockSizeUnit1, \
798 .reqMode = ldmaCtrlReqModeAll, \
801 .srcInc = ldmaCtrlSrcIncOne, \
802 .size = ldmaCtrlSizeHalf, \
803 .dstInc = ldmaCtrlDstIncOne, \
804 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
805 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
806 .srcAddr = (uint32_t)(src), \
807 .dstAddr = (uint32_t)(dest), \
808 .linkMode = ldmaLinkModeAbs, \
826 #define LDMA_DESCRIPTOR_LINKABS_M2M_BYTE(src, dest, count) \
830 .structType = ldmaCtrlStructTypeXfer, \
832 .xferCnt = (count) - 1, \
834 .blockSize = ldmaCtrlBlockSizeUnit1, \
836 .reqMode = ldmaCtrlReqModeAll, \
839 .srcInc = ldmaCtrlSrcIncOne, \
840 .size = ldmaCtrlSizeByte, \
841 .dstInc = ldmaCtrlDstIncOne, \
842 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
843 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
844 .srcAddr = (uint32_t)(src), \
845 .dstAddr = (uint32_t)(dest), \
846 .linkMode = ldmaLinkModeAbs, \
870 #define LDMA_DESCRIPTOR_LINKREL_M2M_WORD(src, dest, count, linkjmp) \
874 .structType = ldmaCtrlStructTypeXfer, \
876 .xferCnt = (count) - 1, \
878 .blockSize = ldmaCtrlBlockSizeUnit1, \
880 .reqMode = ldmaCtrlReqModeAll, \
883 .srcInc = ldmaCtrlSrcIncOne, \
884 .size = ldmaCtrlSizeWord, \
885 .dstInc = ldmaCtrlDstIncOne, \
886 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
887 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
888 .srcAddr = (uint32_t)(src), \
889 .dstAddr = (uint32_t)(dest), \
890 .linkMode = ldmaLinkModeRel, \
892 .linkAddr = (linkjmp) * 4 \
914 #define LDMA_DESCRIPTOR_LINKREL_M2M_HALF(src, dest, count, linkjmp) \
918 .structType = ldmaCtrlStructTypeXfer, \
920 .xferCnt = (count) - 1, \
922 .blockSize = ldmaCtrlBlockSizeUnit1, \
924 .reqMode = ldmaCtrlReqModeAll, \
927 .srcInc = ldmaCtrlSrcIncOne, \
928 .size = ldmaCtrlSizeHalf, \
929 .dstInc = ldmaCtrlDstIncOne, \
930 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
931 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
932 .srcAddr = (uint32_t)(src), \
933 .dstAddr = (uint32_t)(dest), \
934 .linkMode = ldmaLinkModeRel, \
936 .linkAddr = (linkjmp) * 4 \
958 #define LDMA_DESCRIPTOR_LINKREL_M2M_BYTE(src, dest, count, linkjmp) \
962 .structType = ldmaCtrlStructTypeXfer, \
964 .xferCnt = (count) - 1, \
966 .blockSize = ldmaCtrlBlockSizeUnit1, \
968 .reqMode = ldmaCtrlReqModeAll, \
971 .srcInc = ldmaCtrlSrcIncOne, \
972 .size = ldmaCtrlSizeByte, \
973 .dstInc = ldmaCtrlDstIncOne, \
974 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
975 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
976 .srcAddr = (uint32_t)(src), \
977 .dstAddr = (uint32_t)(dest), \
978 .linkMode = ldmaLinkModeRel, \
980 .linkAddr = (linkjmp) * 4 \
991 #define LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(src, dest, count) \
995 .structType = ldmaCtrlStructTypeXfer, \
997 .xferCnt = (count) - 1, \
999 .blockSize = ldmaCtrlBlockSizeUnit1, \
1001 .reqMode = ldmaCtrlReqModeBlock, \
1004 .srcInc = ldmaCtrlSrcIncNone, \
1005 .size = ldmaCtrlSizeByte, \
1006 .dstInc = ldmaCtrlDstIncOne, \
1007 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
1008 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
1009 .srcAddr = (uint32_t)(src), \
1010 .dstAddr = (uint32_t)(dest), \
1024 #define LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(src, dest, count) \
1028 .structType = ldmaCtrlStructTypeXfer, \
1030 .xferCnt = (count) - 1, \
1032 .blockSize = ldmaCtrlBlockSizeUnit1, \
1034 .reqMode = ldmaCtrlReqModeBlock, \
1037 .srcInc = ldmaCtrlSrcIncNone, \
1038 .size = ldmaCtrlSizeByte, \
1039 .dstInc = ldmaCtrlDstIncNone, \
1040 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
1041 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
1042 .srcAddr = (uint32_t)(src), \
1043 .dstAddr = (uint32_t)(dest), \
1057 #define LDMA_DESCRIPTOR_SINGLE_M2P_BYTE(src, dest, count) \
1061 .structType = ldmaCtrlStructTypeXfer, \
1063 .xferCnt = (count) - 1, \
1065 .blockSize = ldmaCtrlBlockSizeUnit1, \
1067 .reqMode = ldmaCtrlReqModeBlock, \
1070 .srcInc = ldmaCtrlSrcIncOne, \
1071 .size = ldmaCtrlSizeByte, \
1072 .dstInc = ldmaCtrlDstIncNone, \
1073 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
1074 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
1075 .srcAddr = (uint32_t)(src), \
1076 .dstAddr = (uint32_t)(dest), \
1095 #define LDMA_DESCRIPTOR_LINKREL_P2M_BYTE(src, dest, count, linkjmp) \
1099 .structType = ldmaCtrlStructTypeXfer, \
1101 .xferCnt = (count) - 1, \
1103 .blockSize = ldmaCtrlBlockSizeUnit1, \
1105 .reqMode = ldmaCtrlReqModeBlock, \
1108 .srcInc = ldmaCtrlSrcIncNone, \
1109 .size = ldmaCtrlSizeByte, \
1110 .dstInc = ldmaCtrlDstIncOne, \
1111 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
1112 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
1113 .srcAddr = (uint32_t)(src), \
1114 .dstAddr = (uint32_t)(dest), \
1115 .linkMode = ldmaLinkModeRel, \
1117 .linkAddr = (linkjmp) * 4 \
1133 #define LDMA_DESCRIPTOR_LINKREL_M2P_BYTE(src, dest, count, linkjmp) \
1137 .structType = ldmaCtrlStructTypeXfer, \
1139 .xferCnt = (count) - 1, \
1141 .blockSize = ldmaCtrlBlockSizeUnit1, \
1143 .reqMode = ldmaCtrlReqModeBlock, \
1146 .srcInc = ldmaCtrlSrcIncOne, \
1147 .size = ldmaCtrlSizeByte, \
1148 .dstInc = ldmaCtrlDstIncNone, \
1149 .srcAddrMode = ldmaCtrlSrcAddrModeAbs, \
1150 .dstAddrMode = ldmaCtrlDstAddrModeAbs, \
1151 .srcAddr = (uint32_t)(src), \
1152 .dstAddr = (uint32_t)(dest), \
1153 .linkMode = ldmaLinkModeRel, \
1155 .linkAddr = (linkjmp) * 4 \
1165 #define LDMA_DESCRIPTOR_SINGLE_WRITE(value, address) \
1169 .structType = ldmaCtrlStructTypeWrite, \
1183 .immVal = (value), \
1184 .dstAddr = (uint32_t)(address), \
1202 #define LDMA_DESCRIPTOR_LINKABS_WRITE(value, address) \
1206 .structType = ldmaCtrlStructTypeWrite, \
1220 .immVal = (value), \
1221 .dstAddr = (uint32_t)(address), \
1222 .linkMode = ldmaLinkModeAbs, \
1239 #define LDMA_DESCRIPTOR_LINKREL_WRITE(value, address, linkjmp) \
1243 .structType = ldmaCtrlStructTypeWrite, \
1257 .immVal = (value), \
1258 .dstAddr = (uint32_t)(address), \
1259 .linkMode = ldmaLinkModeRel, \
1261 .linkAddr = (linkjmp) * 4 \
1273 #define LDMA_DESCRIPTOR_SINGLE_SYNC(set, clr, matchValue, matchEnable) \
1277 .structType = ldmaCtrlStructTypeSync, \
1293 .matchVal = (matchValue), \
1294 .matchEn = (matchEnable), \
1314 #define LDMA_DESCRIPTOR_LINKABS_SYNC(set, clr, matchValue, matchEnable) \
1318 .structType = ldmaCtrlStructTypeSync, \
1334 .matchVal = (matchValue), \
1335 .matchEn = (matchEnable), \
1336 .linkMode = ldmaLinkModeAbs, \
1355 #define LDMA_DESCRIPTOR_LINKREL_SYNC(set, clr, matchValue, matchEnable, linkjmp) \
1359 .structType = ldmaCtrlStructTypeSync, \
1375 .matchVal = (matchValue), \
1376 .matchEn = (matchEnable), \
1377 .linkMode = ldmaLinkModeRel, \
1379 .linkAddr = (linkjmp) * 4 \
1424 LDMA->IEN &= ~flags;
1485 return LDMA->IF & ien;
DMA transfer configuration structure.
#define LDMA_CH_REQSEL_SOURCESEL_TIMER0
#define LDMA_CH_REQSEL_SIGSEL_I2C0TXBL
uint8_t ldmaCtrlSyncPrsSetOn
uint8_t ldmaInitCtrlSyncPrsSetEn
#define LDMA_CH_REQSEL_SIGSEL_LEUART0RXDATAV
#define LDMA_CH_REQSEL_SIGSEL_LEUART0TXEMPTY
uint32_t LDMA_TransferRemainingCount(int ch)
Get number of items remaining in a transfer.
#define LDMA_CH_REQSEL_SIGSEL_TIMER1UFOF
#define _LDMA_CH_CTRL_SRCMODE_RELATIVE
__STATIC_INLINE uint32_t LDMA_IntGetEnabled(void)
Get enabled and pending LDMA interrupt flags. Useful for handling more interrupt sources in the same ...
#define _LDMA_CH_CTRL_SRCINC_TWO
void LDMA_Init(const LDMA_Init_t *init)
Initialize the LDMA controller.
#define _LDMA_CH_CFG_DSTINCSIGN_NEGATIVE
#define _LDMA_CH_CFG_SRCINCSIGN_POSITIVE
#define LDMA_CH_REQSEL_SIGSEL_PRSREQ1
#define _LDMA_CH_CFG_ARBSLOTS_TWO
#define _LDMA_CH_CTRL_BLOCKSIZE_ALL
#define _LDMA_CH_CTRL_DSTMODE_RELATIVE
#define LDMA_CH_REQSEL_SOURCESEL_ADC0
#define LDMA_CH_REQSEL_SIGSEL_USART0TXEMPTY
#define LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0WR
#define LDMA_CH_REQSEL_SIGSEL_ADC0SCAN
#define _LDMA_CH_CFG_ARBSLOTS_ONE
#define _LDMA_CH_CTRL_SRCINC_NONE
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT6
#define _LDMA_CH_CTRL_DSTINC_NONE
#define _LDMA_CH_CTRL_SIZE_WORD
uint8_t ldmaCtrlSyncPrsClrOn
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _LDMA_CH_CTRL_SRCINC_FOUR
#define LDMA_CH_REQSEL_SIGSEL_USART1TXBLRIGHT
#define _LDMA_CH_CFG_DSTINCSIGN_POSITIVE
#define LDMA_CH_REQSEL_SOURCESEL_TIMER1
#define LDMA_CH_REQSEL_SIGSEL_USART1RXDATAV
#define LDMA_CH_REQSEL_SIGSEL_MSCWDATA
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT1024
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT8
#define LDMA_CH_REQSEL_SIGSEL_CRYPTODATA1WR
void LDMA_StartTransfer(int ch, const LDMA_TransferCfg_t *transfer, const LDMA_Descriptor_t *descriptor)
Start a DMA transfer.
#define LDMA_CH_REQSEL_SIGSEL_I2C0RXDATAV
uint8_t ldmaCfgDstIncSign
No peripheral selected for DMA triggering.
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT16
void LDMA_StopTransfer(int ch)
Stop a DMA transfer.
#define _LDMA_CH_LINK_LINKMODE_ABSOLUTE
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT512
#define LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0XWR
#define LDMA_CH_REQSEL_SIGSEL_LEUART0TXBL
#define LDMA_CH_REQSEL_SIGSEL_USART0RXDATAV
void LDMA_DeInit(void)
De-initialize the LDMA controller.
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT128
#define LDMA_CH_REQSEL_SIGSEL_PRSREQ0
#define _LDMA_CH_CTRL_DSTINC_TWO
#define LDMA_CH_REQSEL_SOURCESEL_I2C0
#define LDMA_CH_REQSEL_SIGSEL_TIMER1CC3
#define _LDMA_CH_CTRL_SRCINC_ONE
#define LDMA_CH_REQSEL_SIGSEL_ADC0SINGLE
#define _LDMA_CH_CTRL_STRUCTTYPE_WRITE
uint8_t ldmaInitCtrlSyncPrsClrEn
#define LDMA_CH_REQSEL_SIGSEL_TIMER1CC0
__STATIC_INLINE void LDMA_IntClear(uint32_t flags)
Clear one or more pending LDMA interrupts.
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT256
__STATIC_INLINE void LDMA_IntEnable(uint32_t flags)
Enable one or more LDMA interrupts.
#define _LDMA_CH_CTRL_SRCMODE_ABSOLUTE
#define _LDMA_CH_CTRL_REQMODE_ALL
#define _LDMA_CH_CTRL_STRUCTTYPE_SYNCHRONIZE
uint8_t ldmaCtrlSyncPrsClrOff
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT2
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT64
__STATIC_INLINE void LDMA_IntDisable(uint32_t flags)
Disable one or more LDMA interrupts.
#define LDMA_CH_REQSEL_SIGSEL_USART0TXBL
#define _LDMA_CH_CFG_ARBSLOTS_FOUR
__STATIC_INLINE void LDMA_IntSet(uint32_t flags)
Set one or more pending LDMA interrupts.
#define LDMA_CH_REQSEL_SIGSEL_TIMER0CC1
bool LDMA_TransferDone(int ch)
Check if a DMA transfer has completed.
uint8_t ldmaCtrlSyncPrsSetOff
#define LDMA_CH_REQSEL_SIGSEL_CRYPTODATA1RD
#define LDMA_CH_REQSEL_SOURCESEL_USART1
#define _LDMA_CH_CTRL_DSTINC_ONE
#define LDMA_CH_REQSEL_SIGSEL_TIMER1CC1
#define LDMA_CH_REQSEL_SIGSEL_USART1TXBL
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT32
LDMA initialization configuration structure.
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT4
#define LDMA_CH_REQSEL_SOURCESEL_NONE
uint8_t ldmaInitCtrlNumFixed
#define LDMA_CH_REQSEL_SOURCESEL_MSC
__STATIC_INLINE uint32_t LDMA_IntGet(void)
Get pending LDMA interrupt flags.
#define LDMA_CH_REQSEL_SIGSEL_USART1TXEMPTY
uint8_t ldmaInitIrqPriority
#define LDMA_CH_REQSEL_SIGSEL_USART1RXDATAVRIGHT
#define LDMA_CH_REQSEL_SOURCESEL_USART0
#define _LDMA_CH_CTRL_DSTMODE_ABSOLUTE
#define LDMA_CH_REQSEL_SIGSEL_TIMER0CC0
Trig on USART1_RXDATAVRIGHT.
#define _LDMA_CH_CTRL_REQMODE_BLOCK
#define LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0RD
#define _LDMA_CH_CTRL_STRUCTTYPE_TRANSFER
#define _LDMA_CH_CTRL_SIZE_BYTE
Trig on USART1_TXBLRIGHT.
#define _LDMA_CH_CTRL_SIZE_HALFWORD
uint8_t ldmaCfgSrcIncSign
#define LDMA_CH_REQSEL_SOURCESEL_PRS
#define _LDMA_CH_LINK_LINKMODE_RELATIVE
#define _LDMA_CH_CFG_ARBSLOTS_EIGHT
#define LDMA_CH_REQSEL_SIGSEL_TIMER0CC2
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT1
#define LDMA_CH_REQSEL_SOURCESEL_LEUART0
#define LDMA_CH_REQSEL_SIGSEL_TIMER0UFOF
#define _LDMA_CH_CTRL_BLOCKSIZE_UNIT3
#define LDMA_CH_REQSEL_SOURCESEL_CRYPTO
void LDMA_EnableChannelRequest(int ch, bool enable)
Enable or disable a LDMA channel request.
#define _LDMA_CH_CTRL_DSTINC_FOUR
#define _LDMA_CH_CFG_SRCINCSIGN_NEGATIVE
#define LDMA_CH_REQSEL_SIGSEL_TIMER1CC2