Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

uC/OS-II Help Needed

Altera_Forum
Honored Contributor II
1,052 Views

Dear Engineers. 

 

I am working on a project written before using ecos, now I want to run it on NIOS II and I converted the code but I face a problem now, how can we create and deal with Flags. 

for example 

 

cyg_flag_t X_flag; /// For Creating a flag in eCOS 

cyg_flag_value_t to_Y; 

to_Y = cyg_flag_wait( &X_flag, 

0xFFF, 

CYG_FLAG_WAITMODE_OR 

| CYG_FLAG_WAITMODE_CLR); 

 

if (to_Y = 1) 

cyg_flag_setbits (&X_flag, to_Y); 

 

 

The above code is a part of ecos, we can create a flag with it, do some pending, and then setting some valuse. 

If anyone can help me to convert this code to uC/OS-II
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
89 Views

I believe you are looking for the "OSEvent" API's. See Section 2.21 and Chapter 9 of the UCOS-II book.

Altera_Forum
Honored Contributor II
89 Views

 

--- Quote Start ---  

I believe you are looking for the "OSEvent" API's. See Section 2.21 and Chapter 9 of the UCOS-II book. 

--- Quote End ---  

 

 

Yes I saw this, but from eCOS we have just flag and flag value to use for set and wait services, while in uCOS we have flag group, os_flag, node,etc thats why I am confused
Reply