/* UIO48.C
Copyright 1996 by WinSystems Inc.
Permission is hereby granted to the purchaser of the WinSystems
UIO cards and CPU products incorporating the UIO device, to distribute
any binary file or files compiled using this source code directly or
in any work derived by the user from this file. In no case may the
source code, original or derived from this file, be distributed to any
third party except by explicit permission of WinSystems. This file is
distributed on an "As-is" basis and no warranty as to performance,
fitness of purposes, or any other warranty is expressed or implied.
In no case shall WinSystems be liable for any direct or indirect loss
or damage, real or consequential resulting from the usage of this
source code. It is the user's sole responsibility to determine
fitness for any considered purpose.
*/
/**************************************************************************
*
Name
: uio48.c
*
*
Project
: PCM-UIO48 Software Samples/Examples
*
*
Date
: October 30, 1996
*
*
Revision: 1.00
*
*
Author
: Steve Mottin
*
****************************************************************************
*
*
Changes :
*
*
Date
Revision Description
*
________ ________ ______________________________________________
*
10/30/96 1.00
Created
*
*****************************************************************************
*/
#include <dos.h>
/* This global holds the base address of the UIO chip */
unsigned base_port;
/* This global array holds the image values of the last write to each I/O
ports. This allows bit manipulation routines to work without having to
actually do a read-modify-write to the I/O port.
*/
unsigned port_images[6];
/*===========================================================================
* INIT_IO
*
* This function take a single argument :
*
*
* io_address : This is the base I/O address of the 16C48 UIO Chip
*
on the board.
*
*
* This function initializes all I/O pins for input, disables all interrupt
* sensing, and sets the image values.
*
*===========================================================================*/
void init_io(unsigned io_address)
{
int x;
/* Save the specified address for later use */
base_port = io_address;
/* Clear all of the I/O ports. This also makes them inputs */
for(x=0; x < 7; x++)
outportb(bax, 0);
/* Clear our image values as well */
for(x=0; x < 6; x++)
port_images[x] = 0;
/* Set page 2 access, for interrupt enables */
outportb(ba7,0x80);
/* Clear all interrupt enables */
outportb(ba8,0);
outportb(ba9,0);
outportb(ba0x0a,0);
/* Restore normal page 0 register access */
outportb(ba7,0);
Содержание LBC- 486Plus
Страница 81: ...8 APPENDIX C LBC Plus Parts Placement Guide Top 991206 OPERATIONS MANUAL LBC Plus Page 8 1 ...
Страница 83: ...9 APPENDIX D LBC PLUS Mechanical Drawing ...
Страница 84: ......
Страница 85: ...10 APPENDIX E WS16C48 I O Routines and Sample Program Listings ...