summaryrefslogtreecommitdiff
path: root/tinyusb/osal
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-01-31 13:11:50 +0700
committerhathach <[email protected]>2013-01-31 13:11:50 +0700
commit1b963f6a7117d754c47e860159ac0aa90d1db6dc (patch)
tree775a8d0a163956a56dc01057545798e11b832efa /tinyusb/osal
parentbef17fb67fc283cdc8cbda068d122c2a95c3b880 (diff)
change cmock ignore to args only
implementing usbh_host.c
Diffstat (limited to 'tinyusb/osal')
-rw-r--r--tinyusb/osal/osal.h9
-rw-r--r--tinyusb/osal/osal_common.h6
-rw-r--r--tinyusb/osal/osal_none.h2
3 files changed, 15 insertions, 2 deletions
diff --git a/tinyusb/osal/osal.h b/tinyusb/osal/osal.h
index 609c660ad..0dfb73686 100644
--- a/tinyusb/osal/osal.h
+++ b/tinyusb/osal/osal.h
@@ -77,11 +77,14 @@
typedef uint32_t osal_timeout_t;
//------------- Task -------------//
+typedef uint32_t osal_task_t;
+#define OSAL_TASK_DEF(name, code, stack_depth, prio) \
+ osal_task_t name
+
#define OSAL_TASK_LOOP
#define OSAL_TASK_LOOP_BEGIN
#define OSAL_TASK_LOOP_END
-typedef uint32_t osal_task_t;
tusb_error_t osal_task_create(osal_task_t *task);
//------------- Semaphore -------------//
@@ -94,6 +97,10 @@ tusb_error_t osal_semaphore_post(osal_semaphore_handle_t const sem_hdl);
//------------- Queue -------------//
typedef uint32_t osal_queue_t;
typedef void* osal_queue_handle_t;
+
+#define OSAL_DEF_QUEUE(name, queue_depth, type) \
+ osal_queue_t name
+
osal_queue_handle_t osal_queue_create(osal_queue_t *queue);
#endif
diff --git a/tinyusb/osal/osal_common.h b/tinyusb/osal/osal_common.h
index 263798b90..62a21ae74 100644
--- a/tinyusb/osal/osal_common.h
+++ b/tinyusb/osal/osal_common.h
@@ -65,6 +65,12 @@ enum
OSAL_TIMEOUT_WAIT_FOREVER = 1
};
+typedef enum {
+ OSAL_PRIO_LOW,
+ OSAL_PRIO_NORMAL,
+ OSAL_PRIO_HIGH
+}osal_prio_t;
+
#ifdef __cplusplus
}
#endif
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h
index 99f145a37..6833ada24 100644
--- a/tinyusb/osal/osal_none.h
+++ b/tinyusb/osal/osal_none.h
@@ -73,7 +73,7 @@ typedef uint32_t osal_timeout_t;
// OSAL_TASK_LOOP_ENG
// }
//--------------------------------------------------------------------+
-#define osal_task_create(code, name, stack_depth, parameters, prio)
+//#define osal_task_create(code, name, stack_depth, parameters, prio)
#define OSAL_TASK_LOOP \
static uint16_t state = 0;\