110425
OPERATIONS MANUAL PCM-UIO48B
19
}
/*================================================================
==========
*
* CLR_INT
*
* This function takes a single argument :
*
* bit_number : This argument specifies the bit interrupt to clear. Range
* is 1 to 24.
*
*
* This function is use to clear a bit interrupt once it has been recognized.
* The interrupt left enabled.
*
*=================================================================
==========*/
void clr_int(int bit_number)
{
unsigned port;
unsigned temp;
unsigned mask;
/* Adjust for 0 based numbering */
--bit_number;
/* Calculate the correct I/O address for our enable register */
port = (bit_number / 8) + bas 8;
/* Calculate a bit mask for this bit number */
mask = (1 << (bit_number % 8));
/* Set access to page 2 for the enable register */
outportb(ba7,0x80);
/* Get current state of the enable register */
temp = inportb(port);
/* Temporarily clear only OUR enable. This clears the interrupt */
temp = temp & ~mask;
/* clear the enable for this bit */
/* Write out the temporary value */
outportb(port,temp);
/* Re-enable our interrupt bit */
temp = temp | mask;
/* Write it out */
outportb(port,temp);
/* Set access back to page 0 */