/*
 * IPC_example_main.c
 *
 *  Created on: Dec 1, 2011
 *      Author: x0144789
 */
#include <c6x.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <ti/csl/csl_chip.h>
#include <ti/csl/src/intc/csl_intc.h>
#include <ti/csl/csl_cpintcAux.h>

#include "ipc_interrupt.h"

void main()
{
	uint32_t i;
	uint32_t coreID = CSL_chipReadReg (CSL_CHIP_DNUM);


	TSCL = 0;
	intcInit();  //init the intc CSL global data structures, enable global ISR
	registerInterrupt(); //register the Host interrupt with the event

	for (i=0; i<1000; i++)
		asm (" NOP 5");

	if (0 == coreID)
	{
		IssueInterruptToNextCore();
	}

	while(1)
	{
		asm(" NOP 9");
	};
}
