summaryrefslogtreecommitdiff
path: root/src/osal/osal_mynewt.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-13 13:49:09 +0700
committerhathach <[email protected]>2018-12-13 13:49:09 +0700
commitbc46dc6edf3ff4bb72fb36e74b8a7d3da447d2d4 (patch)
treefc8042f6113d6dc224543d00578759eb6a0c60f4 /src/osal/osal_mynewt.h
parentb562fa741b5a8bb47d4e32c0a0f2600b72993b9a (diff)
osal clean up
remove OSAL_TASK_DEF, osal_task_create. Applicaton should create a task and call tinyusb_task(). This make API consistent with NO OS.
Diffstat (limited to 'src/osal/osal_mynewt.h')
-rw-r--r--src/osal/osal_mynewt.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/osal/osal_mynewt.h b/src/osal/osal_mynewt.h
index 62b5b45e8..d63ea731d 100644
--- a/src/osal/osal_mynewt.h
+++ b/src/osal/osal_mynewt.h
@@ -46,27 +46,6 @@
//--------------------------------------------------------------------+
// TASK API
//--------------------------------------------------------------------+
-#define OSAL_TASK_DEF(_name, _str, _func, _prio, _stack_sz) \
- static os_stack_t _name##_##buf[_stack_sz]; \
- osal_task_def_t _name = { .func = _func, .prio = _prio, .stack_sz = _stack_sz, .buf = _name##_##buf, .strname = _str };
-
-typedef struct
-{
- struct os_task mynewt_task;
- osal_task_func_t func;
-
- uint16_t prio;
- uint16_t stack_sz;
- void* buf;
- const char* strname;
-}osal_task_def_t;
-
-static inline bool osal_task_create(osal_task_def_t* taskdef)
-{
- return OS_OK == os_task_init(&taskdef->mynewt_task, taskdef->strname, taskdef->func, NULL, taskdef->prio, OS_WAIT_FOREVER,
- (os_stack_t*) taskdef->buf, taskdef->stack_sz);
-}
-
static inline void osal_task_delay(uint32_t msec)
{
os_time_delay( os_time_ms_to_ticks32(msec) );