I'm currently trying to set up Spi using the DMA however I am encountering a problem with using __data16_write_addr(). The function that I am using is:
void SetupDMA0( volatile uint8_t *SourceAddress, uint8_t NumberOfBytes ) { __data16_write_addr( (unsigned short) &DMA0SA, (unsigned long) SourceAddress ); /* Source address */ __data16_write_addr( (unsigned short) &DMA0DA, (unsigned long) &UCB0TXBUF ); /* Destination Block address */ DMACTL0 = DMA0TSEL_19; /* Set USCIA0 Transmit, DMA0TSEL_17 as the trigger */ DMA0CTL = DMASRCINCR_3 | DMASBDB | DMADT_0 | DMALEVEL | DMAIE; /* Single Transfer Mode, Source Address Incremented */ /* Destination Address Fixed, Source Byte to Destination Byte, */ /* Edge (Rising) Sensitive Triggers, DMA1 Disabled */ /* Interrupt Enabled, DMALEVEL too */ DMA0SZ = NumberOfBytes; /* Block Size */ }
however upon compiling I am getting a waring informing me that __data16_write_addr() is being declared implicitly. This presumably means that I'm not including a required file, however when looking at example code the only file include at the top is "msp430.h" which I am also including. I also tried including "intrinsics.h" specifically but that didn't help either.
Does anyone have any ideas what might be going wrong?