mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/sema: add test for sema_wait_timed_ztimer()
This commit is contained in:
parent
b339e91e18
commit
4cd9e96066
@ -1,5 +1,7 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
USEMODULE += sema
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += ztimer_usec
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "msg.h"
|
||||
#include "sema.h"
|
||||
#include "thread.h"
|
||||
#include "xtimer.h"
|
||||
|
||||
#define TEST_TIME_US 1000
|
||||
#define TEST_ITERATIONS 4
|
||||
@ -79,6 +78,11 @@ int main(void)
|
||||
printf("MAIN ERROR: sema_wait_timed()");
|
||||
return 1;
|
||||
}
|
||||
if (sema_wait_timed_ztimer(&test_sema, ZTIMER_USEC, TEST_TIME_US)
|
||||
!= -ETIMEDOUT) {
|
||||
printf("MAIN_ERROR: sema_wait_timed_ztimer()");
|
||||
return 1;
|
||||
}
|
||||
|
||||
thread_create(stack,
|
||||
sizeof(stack),
|
||||
|
Loading…
Reference in New Issue
Block a user