/* Read a single byte from the serial port. Returns 1 on success, 0 otherwise. When the function is succesfull, the character read is written into its argument c.  */
int serial_getc(void)
/* Read a single byte from the serial port. Returns 1 on success, 0 otherwise. When the function is succesfull, the character read is written into its argument c.  */
int serial_getc(void)
{
	while (IO_SYSFLG1 & SYSFLG1_URXFE);
	return IO_UARTDR1 & 0xff;
}