#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#include "FslTypes.h"

UINT16 au16WaveForm[16] =
{
    2436,
    2388,
    2316,
    2232,
    2148,
    2076,
    2028,
    2010,
    2028,
    2076,
    2148,
    2232,
    2316,
    2388,
    2436,
    2454
};

void main(void) 
{
  EnableInterrupts;
  /* include your code here */

  vfnDACFillBuffer(&au16WaveForm[0]);
  

  for(;;) 
  {
    __RESET_WATCHDOG();	/* feeds the dog */
  } /* loop forever */
  /* please make sure that you never leave main */
}

void vfnDACFillBuffer (UINT16* pu16NewData)
{
  	DACDAT0 = *pu16NewData;
  	pu16NewData ++;
  	DACDAT1 = *pu16NewData;
}
