summaryrefslogtreecommitdiff
path: root/src/osal
diff options
context:
space:
mode:
authorWini-Buh <[email protected]>2021-06-22 23:49:24 +0200
committerWini-Buh <[email protected]>2021-06-22 23:49:24 +0200
commit51c6444e1d8be85d5f4c8b4ebf7e48db7f589bc2 (patch)
tree848f493bcec479ab80497c5589b2a1008c87a7d3 /src/osal
parentc5f6b57755052284e2fec8aa79b93272e757b297 (diff)
final clean up
Diffstat (limited to 'src/osal')
-rw-r--r--src/osal/osal_freertos.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/osal/osal_freertos.h b/src/osal/osal_freertos.h
index ec33b317d..66070c273 100644
--- a/src/osal/osal_freertos.h
+++ b/src/osal/osal_freertos.h
@@ -51,7 +51,6 @@ static inline void osal_task_delay(uint32_t msec)
typedef StaticSemaphore_t osal_semaphore_def_t;
typedef SemaphoreHandle_t osal_semaphore_t;
-#if (configSUPPORT_STATIC_ALLOCATION == 1) //FIXME Only static API supported
static inline osal_semaphore_t osal_semaphore_create(osal_semaphore_def_t* semdef)
{
return xSemaphoreCreateBinaryStatic(semdef);
@@ -77,7 +76,6 @@ static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl, bool in_isr)
return res != 0;
}
}
-#endif
static inline bool osal_semaphore_wait (osal_semaphore_t sem_hdl, uint32_t msec)
{
@@ -98,12 +96,7 @@ typedef SemaphoreHandle_t osal_mutex_t;
static inline osal_mutex_t osal_mutex_create(osal_mutex_def_t* mdef)
{
-#if (configSUPPORT_STATIC_ALLOCATION == 0) //FIXME Only static API supported
- (void)mdef;
- return xSemaphoreCreateMutex();
-#else
return xSemaphoreCreateMutexStatic(mdef);
-#endif
}
static inline bool osal_mutex_lock (osal_mutex_t mutex_hdl, uint32_t msec)
@@ -138,11 +131,7 @@ typedef QueueHandle_t osal_queue_t;
static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
{
-#if defined(__Tx36V5_Maincard__)
- return xQueueCreate(qdef->depth, qdef->item_sz);
-#else
return xQueueCreateStatic(qdef->depth, qdef->item_sz, (uint8_t*) qdef->buf, &qdef->sq);
-#endif
}
static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
@@ -150,19 +139,6 @@ static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
return xQueueReceive(qhdl, data, portMAX_DELAY);
}
-#if defined(__Tx36V5_Maincard__)
-extern BaseType_t UsbTaskWoken;
-static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr)
-{
- if (!in_isr) {
- return(xQueueSendToBack(qhdl, data, OSAL_TIMEOUT_WAIT_FOREVER));
-
- } else {
- BaseType_t res = xQueueSendToBackFromISR(qhdl, data, &UsbTaskWoken);
- return(res != 0);
- }
-}
-#else
static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr)
{
if ( !in_isr )
@@ -183,7 +159,6 @@ static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in
return res != 0;
}
}
-#endif
static inline bool osal_queue_empty(osal_queue_t qhdl)
{