summaryrefslogtreecommitdiff
path: root/src/osal/osal_none.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-03-21 00:54:42 +0700
committerhathach <[email protected]>2019-03-21 00:54:42 +0700
commit3574688d264b92ae7082725076f0f0bc7c3534c2 (patch)
tree08f0072bed3000934b67b43f566b930bed5c9d83 /src/osal/osal_none.h
parenta37bc90eccf3de8e7211d1be64bdced4652e3011 (diff)
more with mynewt
Diffstat (limited to 'src/osal/osal_none.h')
-rw-r--r--src/osal/osal_none.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/osal/osal_none.h b/src/osal/osal_none.h
index b389a0956..17a802ed8 100644
--- a/src/osal/osal_none.h
+++ b/src/osal/osal_none.h
@@ -164,6 +164,16 @@ static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
return (osal_queue_t) qdef;
}
+// non blocking
+static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
+{
+ _osal_q_lock(qhdl);
+ bool success = tu_fifo_read(&qhdl->ff, data);
+ _osal_q_unlock(qhdl);
+
+ return success;
+}
+
static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, bool in_isr)
{
if (!in_isr) {
@@ -186,16 +196,6 @@ static inline void osal_queue_reset(osal_queue_t const qhdl)
// tusb_hal_int_enable_all();
}
-// non blocking
-static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
-{
- _osal_q_lock(qhdl);
- bool success = tu_fifo_read(&qhdl->ff, data);
- _osal_q_unlock(qhdl);
-
- return success;
-}
-
#ifdef __cplusplus
}
#endif