adding mynewt to osal
This commit is contained in:
@@ -61,13 +61,48 @@ enum
|
||||
typedef void (*osal_task_func_t)( void * );
|
||||
|
||||
#if CFG_TUSB_OS == OPT_OS_NONE
|
||||
#include "osal_none.h"
|
||||
|
||||
#define OSAL_TASK_BEGIN
|
||||
#define OSAL_TASK_END
|
||||
|
||||
#include "osal_none.h"
|
||||
#else
|
||||
#if CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||
/* RTOS Porting API
|
||||
*
|
||||
* uint32_t tusb_hal_millis(void)
|
||||
*
|
||||
* Task
|
||||
* osal_task_def_t
|
||||
* bool osal_task_create(osal_task_def_t* taskdef)
|
||||
* void osal_task_delay(uint32_t msec)
|
||||
*
|
||||
* Queue
|
||||
* osal_queue_def_t, osal_queue_t
|
||||
* osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
|
||||
* osal_queue_receive (osal_queue_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error)
|
||||
* bool osal_queue_send_isr(osal_queue_t const queue_hdl, void const * data)
|
||||
* bool osal_queue_send(osal_queue_t const queue_hdl, void const * data)
|
||||
* osal_queue_flush() TODO remove
|
||||
*
|
||||
* Semaphore
|
||||
* osal_semaphore_def_t, osal_semaphore_t
|
||||
* osal_semaphore_t osal_semaphore_create(osal_semaphore_def_t* semdef)
|
||||
* bool osal_semaphore_post_isr(osal_semaphore_t sem_hdl)
|
||||
* bool osal_semaphore_post(osal_semaphore_t sem_hdl)
|
||||
* void osal_semaphore_wait(osal_semaphore_t sem_hdl, uint32_t msec, tusb_error_t *p_error)
|
||||
* void osal_semaphore_reset_isr(osal_semaphore_t const sem_hdl)
|
||||
*
|
||||
* Mutex
|
||||
* osal_mutex_t
|
||||
* osal_mutex_create()
|
||||
* bool osal_mutex_release(osal_mutex_t mutex_hdl)
|
||||
* void osal_mutex_wait(osal_mutex_t mutex_hdl, uint32_t msec, tusb_error_t *p_error)
|
||||
*/
|
||||
|
||||
#if CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||
#include "osal_freertos.h"
|
||||
#elif CFG_TUSB_OS == OPT_OS_MYNEWT
|
||||
#include "osal_mynewt.h"
|
||||
#else
|
||||
#error CFG_TUSB_OS is not defined or OS is not supported yet
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user