Ws16C48 Programming Reference; Introduction; Function Definitions - WinSystems EBC-LP Operation Manual

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

Advertisement

5
WS16C48 Pro gram ming Ref er ence
5.1
In tro duc tion
This sec tion pro vides ba sic docu men ta tion for the in cluded I/O rou tines. It is in tended that the
ac com pa ny ing source code equip the pro gram mer with a ba sic li brary of I/O func tions for the
WS16C48 or can serve as the ba sis from which ap pli ca tion spe cific code can be de rived.
5.2
Func tion Defi ni tions
This sec tion briefly de scribes each of the func tions con tained in the driver. Where nec es sary, short
ex am ples will be pro vided to il lus trate us age. Any ap pli ca tion mak ing use of any of the driver func tions
should in clude the header file "uio48.h", which in cludes the func tion pro to types and the needed
con stant defi ni tions.
Note that all of the func tions util ize the con cept of "bit_number". The "bit_number" is a value from
1 to 48 (1 to 24 for in ter rupt re lated func tions) that cor re lates to a spe cific I/O pin. Bit_number 1 is port
0 bit 0 and con tin ues through to bit_number 48 at port 5 bit 7.
INIT_IO - Ini tial ize I/O, set all ports to in put
Syn tax
void init_io(un signed io_ad dress);
De scrip tion
This func tion takes a sin gle ar gu ment:
io_ad dress - The I/O ad dress of the WS16C48 chip.
There is no re turn value. This func tion ini tial izes all I/O pins for in put (Sets them high), d is ables all
in ter rupt set tings, and sets the im age val ues.
030530
EBC-LP OPERATIONS MANUAL
Page 5-1

Advertisement

Table of Contents
loading

Table of Contents