void taskf(void *arg)
{
RT_INTR intr;
- rt_printf("success creation: %d\n", rt_intr_create(&intr, "lpt1 handler", LPT1IRQ, I_PROPAGATE));
+ rt_intr_create(&intr, "lpt1 handler", LPT1IRQ, I_PROPAGATE);
while(1){
- rt_printf("Waiting for interrupt\n");
rt_intr_wait(&intr, TM_INFINITE);
- rt_printf("Setting bit to 0\n");
- outb(inb(0x378) & 0xEF, 0x378);
- rt_printf("Setting bit to 1\n");
+ outb(inb(0x378) & 0xFE, 0x378);
outb(inb(0x378) | 0x01, 0x378);
}
}
mlockall(MCL_CURRENT | MCL_FUTURE);
ioperm(0x37A, 1, 1);
+ outb(inb(0x37A) | 0x10, 0x37A);
ioperm(0x378, 1, 1);
- outb(inb(0x37A) | 0x01, 0x37A);
-// outb(inb(0x378) | 0x01, 0x378);
+ outb(inb(0x378) | 0x01, 0x378);
rt_task_create(&task, "task", 0, 50, 0);
rt_task_start(&task, &taskf, 0);