chap 03-2019F.pdf - Getting Started with \u03bcC\/OS-III Chapter 3 Introduction \u03bcC\/OS-III provides services to application code in the form of a set of

chap 03-2019F.pdf - Getting Started with μC/OS-III Chapter...

This preview shows page 1 - 5 out of 10 pages.

Getting Started with μ C/OS-III Chapter 3
Image of page 1
Introduction μ C/OS-III provides services to application code in the form of a set of functions that perform specific operations. to manage tasks, semaphores, message queues, mutual exclusion semaphores and more. As far as the application is concerned, it calls the μ C/OS-III functions as if they were any other functions. In other words, the application now has access to a library of approximately 70 new functions. In this chapter, the reader will appreciate how easy it is to start using μ C/OS-III. Refer to Appendix A, “ μ C/OS-III API Reference,” for the full description of several of the μ C/OS-III services presented in this chapter. Fall 2019 Getting Started with C/OS-III μ 2
Image of page 2
Ex1 – Single task application Fall 2019 Getting Started with C/OS-III μ 3 /* *********************************************************************************************** * INCLUDE FILES *********************************************************************************************** */ #include <app_cfg.h> (1) #include <bsp.h> #include <os.h> /* *********************************************************************************************** * LOCAL GLOBAL VARIABLES *********************************************************************************************** */ static OS_TCB AppTaskStartTCB; (2) static CPU_STK AppTaskStartStk[APP_TASK_START_STK_SIZE]; (3) /* *********************************************************************************************** * FUNCTION PROTOTYPES *********************************************************************************************** */ static void AppTaskStart (void *p_arg); (4) app.c
Image of page 3
Fall 2019 Getting Started with C/OS-III μ 4 void main (void) { OS_ERR err; BSP_IntDisAll(); (1) OSInit(&err); (2) if (err != OS_ERR_NONE) { /* Something didn’t get initialized correctly ... */ /* ... check os.h for the meaning of the error code, see OS_ERR_xxxx */
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 10 pages?

  • Fall '19
  • kim

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors