Hi,
I am writing my project in C language and using gcc.
The code is compiled ok, there are linker errors.
I am trying to use interrupts that's why there is used request_irq function which is in linux/sched.h .
I am using KDEVELOP!!!
Do I need to use some additional library?
The piece of code is:
int xinit_module(void){
int ret;
outb_p(0, SERPORT + 3); // reset DLAB
outb_p(0, SERPORT + 1);
ret = request_irq(4, &handler, SA_INTERRUPT, "/dev/ttyS0", NULL);
if (ret) {
printf ("##### error requesting irq 4: returned %d\n", ret);
}
enable_irq(4);
outb_p(0, SERPORT + 3);
outb_p(0xC7, SERPORT + 2);
outb_p(0x0B, SERPORT + 4);
// Bit 3 Enable Modem Status Interrupt
// Bit 2 Enable Receiver Line Status Interrupt
outb_p(0x0C, SERPORT + 1);
return 0;
}
Error from linker is:
comport.o(.text+0x361): In function `xinit_module':
: undefined reference to `request_irq'
I hope someone can help me
BYE