RTEMS Logo

RTEMS 4.8.1 On-Line Library


Console Driver pollRead

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

8.4.1.2: pollRead

The pollRead routine is responsible for reading a single character from the serial device specified by minor. If no character is available, then the routine should return -1.

int pollRead(int minor)
{
   read status of UART
   if status indicates a character is available
     return character
   return -1
}


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2007OAR Corporation