This is the mail archive of the
ecos-bugs@sources.redhat.com
mailing list for the eCos project.
[Bug 1000109] New: How to handle hardware interrupts?
- From: bugzilla at ecoscentric dot com
- To: ecos-bugs at sources dot redhat dot com
- Date: Mon, 2 Aug 2004 18:49:43 +0100 (BST)
- Subject: [Bug 1000109] New: How to handle hardware interrupts?
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000109
Summary: How to handle hardware interrupts?
Product: eCos
Version: 2.0
Platform: pc (i386 PC target)
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: normal
Component: Kernel
AssignedTo: jifl@ecoscentric.com
ReportedBy: ksobolev@nm.ru
QAContact: ecos-bugs@sources.redhat.com
How to handle hardware interrupts?
I have pc with connected via ISA bus hardware board.
ISA board generate INT 5 interrupt.
How I can handle it ?
Here?s my source code :
static cyg_uint32 isr0(cyg_vector_t vector, cyg_addrword_t data)
{
CYG_UNUSED_PARAM(cyg_addrword_t, data);
jj++;
return CYG_ISR_HANDLED|CYG_ISR_CALL_DSR;
}
static void dsr0(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
{
CYG_UNUSED_PARAM(cyg_vector_t, vector);
CYG_UNUSED_PARAM(cyg_ucount32, count);
CYG_UNUSED_PARAM(cyg_addrword_t, data);
cyg_interrupt_acknowledge(vector);
printf("dsr0!\n");
}
static void simple_prog(CYG_ADDRESS data)
{
while(1){
........
}
}
void cyg_user_start(void)
{
cyg_vector_t lvl1 = CYGNUM_HAL_INTERRUPT_IRQ5;
int in_use;
cyg_thread_create(4, simple_prog, (cyg_addrword_t) 0, "serial",
(void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
// Make sure the chosen levels are not already in use.
HAL_INTERRUPT_IN_USE( lvl1, in_use );
intr0 = 0;
if (!in_use){
printf("Creating interrupt routine ...\n");
cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_IRQ5
, 99,
(cyg_addrword_t)777, isr0, dsr0,
&intr0, &intr_obj[0]);
}
if (intr0){
printf("Attaching interrupt ...\n");
cyg_interrupt_attach(intr0);
}
cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_IRQ5);
cyg_interrupt_enable();
cyg_thread_resume(thread[0]);
cyg_scheduler_start();
}
this code generates NO interrupt :(
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.