How to use serialEvent ?

serialEventRun() is only called after each execution of loop().

int main(void)
{
	init();

#if defined(USBCON)
	USB.attach();
#endif
	
	setup();
    
	for (;;) {
		loop();
		if (serialEventRun) serialEventRun();
	}

	return 0;
}