|
发表于 2015-12-1 12:17:34
|
显示全部楼层
Section 22. Direct Memory Access (DMA),
DS70348C 41~42页,
unsigned int BufferA[8];
unsigned int BufferB[8];
DMA0CON = 0x2001; // One-Shot, Post-Increment, RAM-to-Peripheral
DMA0CNT = 7; // Eight DMA requests
DMA0REQ = 0x001F; // Select UART2 transmitter
DMA0PAD = (volatile unsigned int) &U2TXREG;
DMA0STAL = __builtin_dmaoffset(BufferA);
DMA0STAH = 0x0000;
IFS0bits.DMA0IF = 0; // Clear DMA Interrupt Flag
IEC0bits.DMA0IE = 1; // Enable DMA interrup
并没有专门修饰__attribute__((space(dma))); |
|