/* Tries to receive a character. If a character is unavailable the function returns -1.  */
static int ug_raw_getc(void)
/* Tries to receive a character. If a character is unavailable the function returns -1.  */
static int ug_raw_getc(void)
{
	u32 data = ug_io_transaction(0xa0000000);
	if (data & 0x08000000)
		return (data >> 16) & 0xff;
	else
		return -1;
}