hujun260 commented on PR #13018:
URL: https://github.com/apache/nuttx/pull/13018#issuecomment-2298114077

   
   The priority of the irq thread can be configured. If necessary, it needs to 
be used together with other strategies to prevent priority inversion.
   
   Here is a simple example of usage
   
   static int isrhandle(int irq, void *regs, void *arg)
   {
     up_disabled_irq(irq); 
     return IRQ_WAKE_THREAD; 
   }
   static int isrthread(int irq, void *regs, void *arg)
   {
     //irq process
     ...
     //clear irq pending bit
     ...
     up_enabled_irq(irq); 
     return OK;
   }
   
   irq_attach_thread(IRQ,  isrhandle,  isrthread, arg, 253, 2048);


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to