WinSystems EBC-LP Operation Manual page 78

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

Advertisement

outportb(port,temp);
/* Set access back to Page 0 */
outportb(base_port+7,0x0);
}
/*===========================================================================
*
*
*
* This function takes a single argument :
*
* bit_number : Specifies the bit number to act upon. Range is from 1 to 48.
*
* This function shuts off the interrupt enabled for the specified bit.
*
*===========================================================================*/
void disab_int(int bit_number)
{
unsigned port;
unsigned temp;
unsigned mask;
/* Adjust the bit_number for 0 based numbering */
--bit_number;
/* Calculate the I/O Address for the enable port */
port = (bit_number / 8) + base_port + 8;
/* Calculate the proper bit mask for this bit number */
mask = (1 << (bit_number % 8));
/* Turn on access to page 2 registers */
outportb(base_port+7,0x80);
/* Get the current state of the enable register */
temp = inportb(port);
/* Clear the enable bit int the image for our bit number */
temp = temp & ~mask;
/* Update the enable register with the new information */
outportb(port,temp);
/* Set access back to page 0 */
outportb(base_port+7,0x0);
}
DISAB_INT

Advertisement

Table of Contents
loading

Table of Contents