Event Flags API Changes
The table below shows the API for event-flag management.
µC/OS-II (os_flag.c) | µC/OS-III (os_flag.c) | Note |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(1) In µC/OS-III, there is no “accept” API. This feature is actually built-in the OSFlagPend() by specifying the OS_OPT_PEND_NON_BLOCKING option.
(2) In µC/OS-II, OSFlagCreate() returns the address of an OS_FLAG_GRP, which is used as the “handle” to the event-flag group. In µC/OS-III, the application must allocate storage for an OS_FLAG_GRP, which serves the same purpose as the OS_EVENT. The benefit in µC/OS-III is that it is not necessary to predetermine the number of event flags at compile time.
(3) In µC/OS-II, the user may assign a name to an event-flag group after the group is created. This functionality is built-into OSFlagCreate() for µC/OS-III.
(4) µC/OS-III does not provide query services, as they were rarely used in µC/OS-II.