This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On Sat, 22 Mar 1997, Kurt Van Delden wrote: > I know this is not the primary topic of the mailing list, but here it goes. Since there is currently no dedicated rtems list, this is as good a place as any. :) > I have rtems 3.60 & newlib 1.70 setup as follows: > target: i386-go32-rtems > host: i586-unknown-linux > It works.... > I can compile the examples. In addition I have constructed a serial > driver from various sources. My current difficulty is detecting if a key > stroke is available.. I don't know if newlib has a "kbhit" equivalent. I > can link libpc.a in, yet this doesn't seem to help,. kbhit nor > bioskey(0x01) do the trick. If I use scanf, rtems doesn't deschedule the > process voluntarily. Scanf seems to poll for keys, and only gets > descheduled when the time-slice is up. Does RTEMS have it's own kb > handler, or does it use djgpp's/dos' ? The place to look is in c/src/lib/libbsp/i386/go32/console. In the console driver, you will see that read boils down to a call to inbyte() which in turn calls a routine _IBMPC_inch(). This polls for a character to become available using the _IBMPC_chrdy() call. The driver appears to provide it's own ISR handler but has no mechanism to block in terms of OS services until a keystroke is available. It polls for the availability of a character in the ISR buffer or until "kbhit()" retuns 1. We would like to merge your serial driver into the source and if you are so inclined to provide blocking keyboard input, let me know. I may be able to cut down on the work required to do this. --joel Joel Sherrill Sr. Computer Scientist joel@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (205) 722-9985