110425
OPERATIONS MANUAL PCM-UIO48B
16
mask = (1 << (bit_number % 8));
/* Check whether the request was to set or clear and mask accordingly */
if(val)
/* If the bit is to be set */
temp = temp | mask;
else
temp = temp & ~mask;
/* Update the image value with the value we’re about to write */
port_images[bit_number / 8] = temp;
/* Now actually update the port. Only the specified bit is affected */
outportb(port,temp);
}
/*================================================================
===========
* SET_BIT
*
*
* This function takes a single argument :
*
* bit_number : The bit number to set.
*
* This function sets the specified bit.
*
*=================================================================
==========*/
void set_bit(int bit_number)
{
write_bit(bit_number,1);
}
/*================================================================
===========
* CLR_BIT
*
*
* This function takes a single argument :
*
* bit_number : The bit number to clear.
*
* This function clears the specified bit.
*
*=================================================================
==========*/
void clr_bit(int bit_number)
{
write_bit(bit_number,0);
}
/*================================================================
===========
*
* ENAB_INT
*