non_periodic constant has been moved out of the Event class and
made static within the events namespace so that it is available
both internally within the class and externally.
The MBED_ASSERT has been changed to MBED_WARNING.
The greentea test has been updated:
1) timings reduced to make the test cases run faster
2) The call handler simplified
The period method currently allows any ms value positive, negative
and zero. A negative value means dispatch a non periodic event
ie just once. 0 is unspecified behaviour. This commit forces the
user to use either positive periods or a new constant non_periodic
and should any other value be provided will default to
non_periodic.
A Greentea test case is also provided to check this works as
expected.
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`.
Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
Add license identifier to files which Arm owns the copyright to,
and contain either BSD-3 or Apache-2.0 licenses. This is to address
license errors raised by scancode analysis.
Shifting negative numbers right is implementation-defined, and shifting
positive signed numbers left and exceeding positive range is undefined.
Take care to make sure we always shift unsigned values.
Improves code quality by adding MBED_ASSERT to UserAllocatedEvent::delay
and UserAllocatedEvent::period function. This prevent changing already posted event.
When a Doxygen group has been defined (created), all its needed to add
documentation to that group is `\addtogroup`. Since all the information
about the group is preserved, it is not necessary to mention the group
hierarchy again with `\ingroup`. This PR removes unnecessary Doxygen lines
across the `drivers`, `events`, `platform` and `rtos` directories.
It also ensures that new groups are created with `\defgroup` once and
referenced with `\addtogroup` whenever documentation needs to be added to
an existing group.
UserAllocatedEvent provides mechanism for event posting and dispatching without
utilization of queue internal memory. UserAllocatedEvent embeds all underlying
event data and doesn't require any memory allocation while posting and dispatching.
All of these makes it cannot fail due to memory exhaustion while posting.