CLEON  Version 1
Cloud-Offloaded GPS Receiver
hal_dma.h File Reference

DMA configuration. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HAL_DMA_Init (void)
 Initializing DMA.
 

Detailed Description

DMA configuration.

Definition in file hal_dma.h.

Function Documentation

void HAL_DMA_Init ( void  )

Initializing DMA.

Returns
void
Parameters
void

Definition at line 29 of file hal_dma.c.

{
// External DMA trigger is mapped to P2.1
// Port mapping for P2.1
PMAPKEYID = PMAPKEY;
// P2.1 is mapped to external DMA trigger
P2MAP1 = 0x02;
// Set external input as DMA trigger
DMACTL0 = DMA0TSEL_31;
// Read-modify-write disable
DMACTL4 = DMARMWDIS;
DMA0CTL &= ~DMAIFG;
// DMA destination address will be incremental while DMA source address won't be changed
DMA0CTL = DMADSTINCR_3;
// Enabling DMA transfer till the size of 'SIZE_OF_GPS_DATA_CHUNK_IN_WORDS' reached
// Set DMA source address to base address of P5IN (0x0240)
// Because P5IN and P6IN are adjuscent registers with 1 byte offset,
// P5IN and P6IN will be transferred at a time if accessed with length of word (16 bit)
__data16_write_addr((unsigned short) &DMA0SA,(unsigned long) 0x0240);
// DMA destination address setting : address of 'GPSData' structure
__data16_write_addr((unsigned short) &DMA0DA,(unsigned long) &uniCLEONGPSData);
// Enabling DMA interrupt
DMA0CTL |= DMAIE;
}

Here is the caller graph for this function: