diff options
| author | hathach <[email protected]> | 2018-04-10 00:09:24 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-04-10 00:09:24 +0700 |
| commit | 166982bd9e0f0de51397fddfb0090ae90704b3ec (patch) | |
| tree | 29874b7096b068e4411c142180536c207886ae28 /tinyusb/common | |
| parent | a74b2d34e5467d913d86abf3331eab2ccd2def92 (diff) | |
clean up
Diffstat (limited to 'tinyusb/common')
| -rw-r--r-- | tinyusb/common/tusb_fifo.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tinyusb/common/tusb_fifo.h b/tinyusb/common/tusb_fifo.h index 1c524f3a5..8054f315c 100644 --- a/tinyusb/common/tusb_fifo.h +++ b/tinyusb/common/tusb_fifo.h @@ -55,9 +55,16 @@ #if CFG_FIFO_MUTEX
-/*Mutex port for newt*/
-#include "os/os_mutex.h"
+#include "osal/osal.h"
+#if TUSB_CFG_OS == TUSB_OS_NONE
+// Since all fifo read/write is done in thread mode, there should be
+// no conflict except for osal queue which will be address seperatedly.
+// Therefore there may be no need for mutex with internal use of fifo
+
+#define _ff_mutex_def(mutex)
+
+#else
#define fifo_mutex_t struct os_mutex
#define fifo_mutex_lock(m) os_mutex_pend(m, OS_TIMEOUT_NEVER)
@@ -66,6 +73,8 @@ /* Internal use only */
#define _mutex_declare(m) .mutex = m
+#endif
+
#else
#define _mutex_declare(m)
|
