00001 00007 /* Embedded XINU, Copyright (C) 2007. All rights reserved. */ 00008 00009 #include <kernel.h> 00010 #include <device.h> 00011 #include <tty.h> 00012 00018 devcall ttyGetChar(device *pdev) 00019 { 00020 uchar ch; 00021 long len; 00022 00023 len = ttyRead(pdev, (char *)&ch, 1); 00024 /* Check for EOF or SYSERR */ 00025 if (len < 0) 00026 { return len; } 00027 return ch; 00028 }