/* Routine: rx51_kp_getc Description: Get last pressed key (from buffer).  */
int rx51_kp_getc(struct stdio_dev *sdev)
/* Routine: rx51_kp_getc Description: Get last pressed key (from buffer).  */
int rx51_kp_getc(struct stdio_dev *sdev)
{
	keybuf_head %= KEYBUF_SIZE;
	while (!rx51_kp_tstc(sdev))
		WATCHDOG_RESET();
	return keybuf[keybuf_head++];
}