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 >
Text File  |  1990-10-14  |  573b  |  27 lines

  1.  
  2.     /* set bits 0,3, and 7 in the data direction register */
  3.     /* to make those lines (connected to devices 2,1, and 3, */
  4.     /* respectively) output lines in the general purpose I/O */
  5.     /* register */ 
  6.  
  7.  
  8. #include "mfp_defs.h"        /* MFP address definitions */
  9. #include "mfp_macs.h"        /* MFP macro definitions */
  10.  
  11. #define BIT_MASK  0x89        /* mask for setting bits 0,3, and 7 */
  12.  
  13.  
  14. devs_out()
  15. {
  16.         /* set them one at a time */
  17.     BIT_SET(DDR,DEVICE_1);
  18.     BIT_SET(DDR,DEVICE_2);
  19.     BIT_SET(DDR,DEVICE_3);
  20.  
  21.         /* set all three at once */
  22.     SET_BITS(DDR,BIT_MASK);
  23. }
  24.  
  25.  
  26.  
  27.