WinSystems EBC-LP Operation Manual page 59

Small, high-performance, embeddable computer system on a single board
Table of Contents

Advertisement

READ_BIT - Reads an I/O port Bit
Syn tax
int read_bit(int bit_number);
De scrip tion
This func tion takes a sin gle ar gu ment:
bit_number - This is a value from 1 to 48 that in di cates the I/O pin to read from.
This func tion re turns the state of the I/O pin. A '1' is re turned if the I/O pin is low and a '0' is re turned
if the pin is high.
WRITE_BIT - Write a 1 or 0 to an I/O pin
Syn tax
void write_bit(int bit_number, int value);
De scrip tion
This func tion takes two ar gu ments
bit_number - This is value from 1 to 48, which is the bit to be acted upon.
Value - is ei ther 1 or 0.
This func tion al lows for writ ing of a sin gle bit to ei ther a '0' or a '1' as speci fied by the sec ond
ar gu ment. There is no re turn value and other bits in the I/O port are not af fected.
Page 5-2
WinSystems - "The Embedded Authority"
EBC-LP OPERATIONS MANUAL
030530

Advertisement

Table of Contents
loading

Table of Contents