Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed Namespace Reference
A generic DMA for transfer data without hanging the CPU. More...
Detailed Description
A generic DMA for transfer data without hanging the CPU.
It can be used for m2m, m2p, p2m, m2m transfer It will choose the DMA with the priority you have set. Lower number means higher prority. If no prority is set, it will choose which ever free channel. Example:
// Send the memory data "Hello world" in source address to destination address via DMA // attach a function to swtich LED on when the transfer finish char src[] = "Hello world\r\n"; uint8_t size = sizeof (src); char *dst = (char *) malloc(size); memset (dst, '\0', size); LPC_SC->PCONP |= (1 << 29); // Enable LPC1768 GPDMA clock DMA dma1 (0) ; dma1.source (src,0,1); dma1.destination (dst,0,1); dma1.attach_TC(led_switchon) ; dma1.start(size); dma1.wait(); printf("dst text: %s", dst);
Generated on Sat Jul 16 2022 23:21:49 by
1.7.2