The difference between an embos interrupt and a zero latency interrupt

Source: Internet
Author: User

The difference between an embos interrupt and a zero latency interrupt are the interrupt priority level and the usage of OS _enterinterrupt ()/os_leaveinterrupt () or Os_enternestableinterrupt ()/os_leavenestableinterrupt ().

Example of an embos interrupt function:

 void  Os_com_isrhandler (void   int   Dummy;  Os_enternestableinterrupt ();       Dummy  = Us_rhr;  //  call Embos API functions here  Span style= "color: #000000;" > Os_leavenestableinterrupt ();}  void  Uart_init (void   * os_arm_isrsetprio (                         140); Set prio >    Os_arm_enableisr (Isr_id_usart);}  

Example of a Zero latency interrupt function:

void Os_com_isrhandler (void) {  int  Dummy;   = us_rhr;        // never call Embos API functions here }void uart_init (void) {  Os_arm_installisrhandler (Isr_id_usart, (OS_ISR _handler*) os_com_isrhandler);  Os_arm_isrsetprio (  );                      Set Prio <  Os_arm_enableisr (Isr_id_usart);}

The difference between an embos interrupt and a zero latency interrupt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.