#include <m8c.h>
#include "PSoCAPI.h"

void main(void)
{
	BYTE byteInValue;
	int intInValue;
	long longInValue;
	
	M8C_EnableGInt ; // Turn on interrupts
	MBM_InitializeMailbox(); // Init MBM UM
	
	// Set up RAM buffer
	EzI2Cs_SetRamBuffer(sizeof(MBM_MyMailbox), 0x0F, (BYTE *) &MBM_MyMailbox);
	EzI2Cs_Start(); // Turn on I2C
	EzI2Cs_EnableInt();
	
	while(1)
	{
		byteInValue = MBM_MyMailbox.Inbox.byteInValue; //Get Inbox byteInValue
		intInValue = MBM_MyMailbox.Inbox.intInValue; //Get Inbox intInValue
		longInValue = MBM_MyMailbox.Inbox.longInValue; //Get Inbox longInValue
		
		MBM_MyMailbox.Outbox.intOutValue = intInValue * byteInValue; //Send intOutValue variable, multiplied by byteInValue
		MBM_MyMailbox.Outbox.longOutValue = longInValue * byteInValue; //Send longOutValue variable, multiplied by byteInValue
	}
}