<div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;color:rgb(11,83,148)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif">Hello, </span><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">In my RTEMS app, I want to connect a function which is called when a hardware interrupt occurs. I looked for that in the RTEMS's cpukit and I found the function rtems_interrupt_handler_install. I used it like this </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">rtems_status_code installstatus = rtems_interrupt_handler_install(31, "PL_IRQ",RTEMS_INTERRUPT_UNIQUE,(rtems_interrupt_handler) my_handler, NULL) { };</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">The handler I created for this is (it basically clears the interrupt) :</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><div>rtems_isr my_handler(void *arg)</div><div>{</div><div> volatile unsigned long c= 0;</div><div><span class="" style="white-space:pre"> </span>BASE_IRQ = c;</div><div><span class="" style="white-space:pre"> </span>printf("interrupt cleared \n");</div><div><span class="" style="white-space:pre"> </span>return;</div><div>}</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">Please tell me if this function and the handler can be used like I did ? And what is the difference with rtems_interrupt_catch function ? It's a little bit confusing. </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">Thank you</div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="verdana, sans-serif" color="#073763">________<br></font></div><div><font face="verdana, sans-serif" color="#073763"><br></font></div><font face="verdana, sans-serif" color="#073763"><b>Badr EL HIOUEL</b> </font><div><div><br></div><div><br></div></div></div></div></div></div></div></div>
</div>