Add test/zephyr.h to mock Zephyr functions/defines

This commit is contained in:
Martin Jäger
2020-06-04 16:28:19 +02:00
parent dfde83d8be
commit 3eb70e9a01
11 changed files with 13 additions and 21 deletions
+1 -3
View File
@@ -8,13 +8,11 @@
#include <time.h>
#ifndef UNIT_TEST
#include <zephyr.h>
#endif
uint32_t uptime()
{
#ifndef UNIT_TEST
#ifdef __ZEPHYR__
return k_uptime_get() / 1000;
#else
return time(NULL);