RTOS Abstraction (abstraction-rtos)
Common

General Description

General types and defines for working with the RTOS abstraction layer.

API Reference

 RTOS Specific Types and Defines
 The following defines and types have values that are specific to each RTOS port.
 

Functions

cy_rtos_error_t cy_rtos_last_error (void)
 Return the last error from the RTOS. More...
 
#define CY_RSLT_SUCCESS   ((cy_rslt_t)0x00000000U)
 Return value indicating success.
 
#define CY_RTOS_NEVER_TIMEOUT   ( (uint32_t)0xffffffffUL )
 Used with RTOS calls that require a timeout. More...
 
#define CY_RTOS_TIMEOUT    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 0)
 Requested operation did not complete in the specified time.
 
#define CY_RTOS_NO_MEMORY    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 1)
 The RTOS could not allocate memory for the specified operation.
 
#define CY_RTOS_GENERAL_ERROR    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 2)
 An error occured in the RTOS.
 
#define CY_RTOS_BAD_PARAM    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 5)
 A bad argument was passed into the APIs.
 
#define CY_RTOS_ALIGNMENT_ERROR    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 6)
 A memory alignment issue was detected. More...
 
#define CY_RTOS_UNSUPPORTED    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 7)
 Requested operation not supported with this RTOS.
 

Macro Definition Documentation

◆ CY_RTOS_NEVER_TIMEOUT

#define CY_RTOS_NEVER_TIMEOUT   ( (uint32_t)0xffffffffUL )

Used with RTOS calls that require a timeout.

This implies the call will never timeout.

◆ CY_RTOS_ALIGNMENT_ERROR

#define CY_RTOS_ALIGNMENT_ERROR    CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_OS, 6)

A memory alignment issue was detected.

Ensure memory provided is aligned per CY_RTOS_ALIGNMENT_MASK

Function Documentation

◆ cy_rtos_last_error()

cy_rtos_error_t cy_rtos_last_error ( void  )

Return the last error from the RTOS.

The functions in the RTOS abstraction layer adhere to the Infineon return results calling convention. The underlying RTOS implementations will not but rather will have their own error code conventions. This function is provided as a service to the developer, mostly for debugging, and returns the underlying RTOS error code from the last RTOS abstraction layer that returned CY_RTOS_GENERAL_ERROR.

Returns
RTOS specific error code.