RTEMS Logo

RTEMS 4.10.1 On-Line Library


Discrete Driver Read from a Particular Discrete Bitfield

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

19.6: Read from a Particular Discrete Bitfield

This corresponds to the driver read call. After validating the minor number and arguments, this call reads the indicated bitfield. A discrete I/O devices may have to store the last value written to a discrete output. If the bitfield is output only, saving the last written value gives the appearance that it can be read from also. If the bitfield is input, then it is sampled.

NOTE: Many discrete inputs have a tendency to bounce. The application may have to take account for bounces.

The value returned is an unsigned32 number representing the bitfield read. This value is stored in the argument_block passed in to the call.

NOTE: Some discrete I/O drivers have a special minor number used to access all discrete I/O bits on the board. If this special minor is used, then the area pointed to by argument_block must be the correct size.


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2008 OAR Corporation