generated from Embedded_Projects/Fire_RT1052_Pro_Template
47 lines
1.9 KiB
C
47 lines
1.9 KiB
C
/***************************************************************************//**
|
|
* \file cyabs_rtos_impl.h
|
|
*
|
|
* \brief
|
|
* Defines the Cypress RTOS Interface. Provides prototypes for functions that
|
|
* allow Cypress libraries to use RTOS resources such as threads, mutexes & timing
|
|
* functions in an abstract way. The APIs are implemented
|
|
* in the Port Layer RTOS interface which is specific to the RTOS in use.
|
|
*
|
|
********************************************************************************
|
|
* \copyright
|
|
* Copyright 2018-2019 Cypress Semiconductor Corporation
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*******************************************************************************/
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
/* RTOS thread priority, some priorities are aliases since we don't have that much levels */
|
|
typedef enum {
|
|
CY_RTOS_PRIORITY_MIN = 0,
|
|
CY_RTOS_PRIORITY_LOW = 0,
|
|
CY_RTOS_PRIORITY_BELOWNORMAL = 1,
|
|
CY_RTOS_PRIORITY_NORMAL = 1,
|
|
CY_RTOS_PRIORITY_ABOVENORMAL = 1,
|
|
CY_RTOS_PRIORITY_HIGH = 2,
|
|
CY_RTOS_PRIORITY_REALTIME = 2,
|
|
CY_RTOS_PRIORITY_MAX = 3,
|
|
} cy_thread_priority_t;
|
|
|
|
typedef void* cy_semaphore_t; /** RTOS definition of a semaphore */
|
|
typedef void* cy_thread_t; /** Note: This is equivelent to TaskHandle_t */
|
|
typedef int32_t cy_rtos_error_t; /** RTOS definition of a error status */
|
|
typedef uint32_t cy_time_t;
|
|
typedef void* cy_thread_arg_t;
|