Add ATmega328P Xplained Mini board. The board is an official
development kit from MCHP based on the Arduino UNO, reduced
hardware, with a xplainedmini debugger and CDC ACM serial
converter.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This test checks if the function works when the timeout is smaller than XTIMER_BACKOFF and the mutex is already locked.
This means the timer will spin and the timer will shoot before the mutex lock was called.
Then the mutex lock gets called and the timer will not remove the thread from the mutex.
Checking if this case is handled correctly.
Two Functions cmd_test_xtimer_mutex_lock_timeout_low_prio_thread and thread_low_prio_test are added.
This testfunction will test xtimer_mutex_lock_timeout with two threads (main thread and lower prio than main thread).
The main thread creates another thread and sleeps. While the main thread sleeps the other thread takes the mutex
and wakes the main thread up.
Then the main thread calls xtimer_mutex_lock_timeout and the second thread unlocks the mutex and
the main thread gets it and waits for the created thread to end.
Has test messages showing the thread count. To make sure the created thread ends.
(test messages may be removed in the future)
New test function cmd_test_xtimer_mutex_lock_timeout_long_locked.
In this test the mutex is locked and the timeout is long.
When it works the thread continues running and stops waiting for the mutex and
the function will return that it did not get the mutex.
Adding a first normal test case where the mutex is unlocked and the timeout is long.
The timer will not trigger in this test and instead wil be removed after getting the mutex.