8259 PIC: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
m Changed "unsigned char" to "uint8_t"
Line 86: Line 86:
#define PIC_EOI 0x20 /* End-of-interrupt command code */
#define PIC_EOI 0x20 /* End-of-interrupt command code */


void PIC_sendEOI(unsigned char irq)
void PIC_sendEOI(uint8_t irq)
{
{
if(irq >= 8)
if(irq >= 8)
Line 125: Line 125:
void PIC_remap(int offset1, int offset2)
void PIC_remap(int offset1, int offset2)
{
{
unsigned char a1, a2;
uint8_t a1, a2;
a1 = inb(PIC1_DATA); // save masks
a1 = inb(PIC1_DATA); // save masks
Line 167: Line 167:
Here is an example of how to mask an IRQ:
Here is an example of how to mask an IRQ:
<source lang="C">
<source lang="C">
void IRQ_set_mask(unsigned char IRQline) {
void IRQ_set_mask(uint8_t IRQline) {
uint16_t port;
uint16_t port;
uint8_t value;
uint8_t value;
Line 181: Line 181:
}
}


void IRQ_clear_mask(unsigned char IRQline) {
void IRQ_clear_mask(uint8_t IRQline) {
uint16_t port;
uint16_t port;
uint8_t value;
uint8_t value;