tinyusb
osal_none.h File Reference
#include "osal_common.h"

Go to the source code of this file.

Data Structures

struct  osal_queue_t
 

Macros

#define OSAL_VAR   static
 
#define osal_tick_get   tusb_tick_get
 
#define OSAL_TASK_DEF(code, stack_depth, prio)
 
#define OSAL_TASK_REF
 
#define osal_task_create(x)   TUSB_ERROR_NONE
 
#define OSAL_TASK_FUNCTION(task_func, p_para)   tusb_error_t task_func(void * p_para)
 
#define TASK_RESTART   state = 0
 
#define OSAL_TASK_LOOP_BEGIN
 
#define OSAL_TASK_LOOP_END
 
#define osal_task_delay(msec)
 
#define OSAL_SUBTASK_INVOKED_AND_WAIT(subtask, status)
 
#define OSAL_SUBTASK_BEGIN   OSAL_TASK_LOOP_BEGIN
 
#define OSAL_SUBTASK_END   OSAL_TASK_LOOP_END
 
#define SUBTASK_EXIT(error)
 
#define _SUBTASK_ASSERT_ERROR_HANDLER(error, func_call)   func_call; TASK_RESTART; return error
 
#define SUBTASK_ASSERT_STATUS(sts)
 
#define SUBTASK_ASSERT_STATUS_WITH_HANDLER(sts, func_call)
 
#define SUBTASK_ASSERT(condition)
 
#define SUBTASK_ASSERT_WITH_HANDLER(condition, func_call)
 
#define OSAL_SEM_DEF(name)   osal_semaphore_t name
 
#define OSAL_SEM_REF(name)   &name
 
#define osal_semaphore_wait(sem_hdl, msec, p_error)
 
#define OSAL_MUTEX_DEF(name)   osal_mutex_t name
 
#define OSAL_MUTEX_REF(name)   &name
 
#define osal_mutex_wait   osal_semaphore_wait
 
#define OSAL_QUEUE_DEF(name, queue_depth, type)
 
#define OSAL_QUEUE_REF(name)   (&name)
 
#define osal_queue_receive(queue_hdl, p_data, msec, p_error)
 

Typedefs

typedef volatile uint8_t osal_semaphore_t
 
typedef osal_semaphore_tosal_semaphore_handle_t
 
typedef osal_semaphore_t osal_mutex_t
 
typedef osal_semaphore_handle_t osal_mutex_handle_t
 
typedef osal_queue_tosal_queue_handle_t
 

Functions

uint32_t tusb_tick_get (void)
 
static osal_semaphore_handle_t osal_semaphore_create (osal_semaphore_t *p_sem) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
 
static tusb_error_t osal_semaphore_post (osal_semaphore_handle_t sem_hdl) ATTR_ALWAYS_INLINE
 
static void osal_semaphore_reset (osal_semaphore_handle_t sem_hdl) ATTR_ALWAYS_INLINE
 
static osal_mutex_handle_t osal_mutex_create (osal_mutex_t *p_mutex) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
 
static tusb_error_t osal_mutex_release (osal_mutex_handle_t mutex_hdl) ATTR_ALWAYS_INLINE
 
static void osal_mutex_reset (osal_mutex_handle_t mutex_hdl) ATTR_ALWAYS_INLINE
 
static osal_queue_handle_t osal_queue_create (osal_queue_t *const p_queue) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
 
static tusb_error_t osal_queue_send (osal_queue_handle_t const queue_hdl, void const *data) ATTR_ALWAYS_INLINE
 
static void osal_queue_flush (osal_queue_handle_t const queue_hdl) ATTR_ALWAYS_INLINE
 

Detailed Description

Author
hathach (tinyusb.org)

LICENSE

Software License Agreement (BSD License)

Copyright (c) 2013, hathach (tinyusb.org) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file is part of the tinyusb stack.