add missing asserts to UserAllocatedEvent class

Improves code quality by adding MBED_ASSERT to UserAllocatedEvent::delay
and UserAllocatedEvent::period function. This prevent changing already posted event.
pull/11446/head
Maciej Bocianski 2019-09-10 09:42:58 +02:00
parent 1800632655
commit f5f174474b
1 changed files with 2 additions and 0 deletions

View File

@ -215,6 +215,7 @@ public:
*/
void delay(int delay)
{
MBED_ASSERT(!_post_ref);
equeue_event_delay(&_e + 1, delay);
}
@ -224,6 +225,7 @@ public:
*/
void period(int period)
{
MBED_ASSERT(!_post_ref);
equeue_event_period(&_e + 1, period);
}