home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_12
/
8n12037b
< prev
next >
Wrap
Text File
|
1990-10-14
|
573b
|
27 lines
/* set bits 0,3, and 7 in the data direction register */
/* to make those lines (connected to devices 2,1, and 3, */
/* respectively) output lines in the general purpose I/O */
/* register */
#include "mfp_defs.h" /* MFP address definitions */
#include "mfp_macs.h" /* MFP macro definitions */
#define BIT_MASK 0x89 /* mask for setting bits 0,3, and 7 */
devs_out()
{
/* set them one at a time */
BIT_SET(DDR,DEVICE_1);
BIT_SET(DDR,DEVICE_2);
BIT_SET(DDR,DEVICE_3);
/* set all three at once */
SET_BITS(DDR,BIT_MASK);
}