#ifndef	MAIN_H
#define	MAIN_H

#define	ERROR			-1
#define	OFF				0
#define	ON				1
#define	TOGGLE			2

#define	OSC_FREQ		48000000		// 48 MHz
#define	FREQUENCY		OSC_FREQ / 4	// 12 MHz
#define	BUTTON_INPUT	TRISB = TRISB | 0x01
#define	BUTTON_PRESSED	(~PORTB & 0x01)

struct Sony_Code
{
	unsigned char Data:7;
	unsigned char Address:5;
};

void YourHighPriorityISRCode();

void DelayMs (volatile unsigned int Ms);

void System_Init (void);

void GPIO_Init (void);

void Clock_Init (void);

void Timer1_Init (void);

void Receiver_Init (void);

#endif