mirror of https://github.com/ARMmbed/mbed-os.git
Update core-lib to v1.1.2
parent
7698b34e8c
commit
250ca363a3
|
@ -28,13 +28,13 @@
|
|||
* \addtogroup group_result Result Type
|
||||
* \ingroup group_abstraction
|
||||
* \{
|
||||
\anchor anchor_general_description
|
||||
* Defines a type and related utilities for function result handling.
|
||||
*
|
||||
* The cy_rslt_t type is a structured bitfield which encodes information
|
||||
* about result type, the originating module, and a code for the specific
|
||||
* error (or warning etc). In order to extract these individual fields from
|
||||
* a cy_rslt_t value, the utility macros @ref CY_RSLT_GET_TYPE, @ref CY_RSLT_GET_MODULE,
|
||||
* \anchor anchor_general_description
|
||||
* \brief Defines a type and related utilities for function result handling.
|
||||
*
|
||||
* The @ref cy_rslt_t type is a structured bitfield which encodes information
|
||||
* about result type, the originating module, and a code for the specific
|
||||
* error (or warning etc). In order to extract these individual fields from
|
||||
* a @ref cy_rslt_t value, the utility macros @ref CY_RSLT_GET_TYPE, @ref CY_RSLT_GET_MODULE,
|
||||
* and @ref CY_RSLT_GET_CODE are provided. For example:
|
||||
* \code
|
||||
* cy_rslt_t result = cy_hal_do_operation(arg);
|
||||
|
@ -56,10 +56,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Provides the result of an operation as a structured bitfield.
|
||||
*
|
||||
* See the \ref anchor_general_description "General Description"
|
||||
/**
|
||||
* @brief Provides the result of an operation as a structured bitfield.
|
||||
*
|
||||
* See the \ref anchor_general_description "General Description"
|
||||
* for more details on structure and usage.
|
||||
*/
|
||||
typedef uint32_t cy_rslt_t;
|
||||
|
@ -99,13 +99,13 @@ typedef uint32_t cy_rslt_t;
|
|||
* Utility macros for constructing result values and extracting individual fields from existing results.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Get the value of the result type field
|
||||
/**
|
||||
* @brief Get the value of the result type field
|
||||
* @param x the @ref cy_rslt_t value from which to extract the result type
|
||||
*/
|
||||
#define CY_RSLT_GET_TYPE(x) (((x) >> CY_RSLT_TYPE_POSITION) & CY_RSLT_TYPE_MASK)
|
||||
/**
|
||||
* @brief Get the value of the module identifier field
|
||||
/**
|
||||
* @brief Get the value of the module identifier field
|
||||
* @param x the @ref cy_rslt_t value from which to extract the module id
|
||||
*/
|
||||
#define CY_RSLT_GET_MODULE(x) (((x) >> CY_RSLT_MODULE_POSITION) & CY_RSLT_MODULE_MASK)
|
||||
|
@ -115,12 +115,12 @@ typedef uint32_t cy_rslt_t;
|
|||
*/
|
||||
#define CY_RSLT_GET_CODE(x) (((x) >> CY_RSLT_CODE_POSITION) & CY_RSLT_CODE_MASK)
|
||||
|
||||
/**
|
||||
* @brief Create a new @ref cy_rslt_t value that encodes the specified type, module, and result code.
|
||||
* @param type one of @ref CY_RSLT_TYPE_INFO, @ref CY_RSLT_TYPE_WARNING,
|
||||
* @ref CY_RSLT_TYPE_ERROR, @ref CY_RSLT_TYPE_FATAL
|
||||
* @param module Identifies the module where this result originated; see @ref anchor_modules "Modules".
|
||||
* @param code a module-defined identifier to identify the specific situation that
|
||||
/**
|
||||
* @brief Create a new @ref cy_rslt_t value that encodes the specified type, module, and result code.
|
||||
* @param type one of @ref CY_RSLT_TYPE_INFO, @ref CY_RSLT_TYPE_WARNING,
|
||||
* @ref CY_RSLT_TYPE_ERROR, @ref CY_RSLT_TYPE_FATAL
|
||||
* @param module Identifies the module where this result originated; see @ref anchor_modules "Modules".
|
||||
* @param code a module-defined identifier to identify the specific situation that
|
||||
* this result describes.
|
||||
*/
|
||||
#define CY_RSLT_CREATE(type, module, code) \
|
||||
|
@ -132,12 +132,13 @@ typedef uint32_t cy_rslt_t;
|
|||
|
||||
/**
|
||||
* \{
|
||||
*@name Result Types
|
||||
* @name Result Types
|
||||
* Defines codes to identify the type of result.
|
||||
*/
|
||||
|
||||
/** @brief The result code is informational-only */
|
||||
#define CY_RSLT_TYPE_INFO (0U)
|
||||
/** @brief The result code is a warning */
|
||||
/** @brief The result code is warning of a problem but will proceed */
|
||||
#define CY_RSLT_TYPE_WARNING (1U)
|
||||
/** @brief The result code is an error */
|
||||
#define CY_RSLT_TYPE_ERROR (2U)
|
||||
|
@ -148,11 +149,12 @@ typedef uint32_t cy_rslt_t;
|
|||
|
||||
/**
|
||||
* \{
|
||||
@name Modules
|
||||
@anchor anchor_modules
|
||||
* @name Modules
|
||||
* @anchor anchor_modules
|
||||
* Defines codes to identify the module from which an error originated.
|
||||
* For some large libraries, a range of module codes is defined here;
|
||||
* see the library documentation for values corresonding to individual modules.
|
||||
* see the library documentation for values corresponding to individual modules.
|
||||
* Valid range is 0x0000-0x4000.
|
||||
*/
|
||||
/**** DRIVER Module codes: 0x0000 - 0x00FF ****/
|
||||
/** Base module identifier for peripheral driver library drivers (0x0000 - 0x007F) */
|
||||
|
@ -160,8 +162,10 @@ typedef uint32_t cy_rslt_t;
|
|||
/** Base module identifier for wireless host driver library modules (0x0080 - 0x00FF) */
|
||||
#define CY_RSLT_MODULE_DRIVERS_WHD_BASE (0x0080U)
|
||||
|
||||
/** Base module identifier for HAL drivers (0x0100 - 0x017F) */
|
||||
/** Deprecated. Use \ref CY_RSLT_MODULE_ABSTRACTION_HAL */
|
||||
#define CY_RSLT_MODULE_ABSTRACTION_HAL_BASE (0x0100U)
|
||||
/** Module identifier for the Hardware Abstraction Layer */
|
||||
#define CY_RSLT_MODULE_ABSTRACTION_HAL (0x0100U)
|
||||
/** Module identifier for board support package */
|
||||
#define CY_RSLT_MODULE_ABSTRACTION_BSP (0x0180U)
|
||||
/** Module identifier for file system abstraction */
|
||||
|
@ -181,6 +185,8 @@ typedef uint32_t cy_rslt_t;
|
|||
#define CY_RSLT_MODULE_BOARD_LIB_RGB_LED (0x01A1U)
|
||||
/** Module identifier for the Serial Flash Board Library */
|
||||
#define CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH (0x01A2U)
|
||||
/** Module identifier for the WiFi Host Driver + Board Support Integration Library */
|
||||
#define CY_RSLT_MODULE_BOARD_LIB_WHD_INTEGRATION (0x01A3U)
|
||||
|
||||
/** Base module identifier for Shield Board Libraries (0x01C0 - 0x01FF) */
|
||||
#define CY_RSLT_MODULE_BOARD_SHIELD_BASE (0x01C0U)
|
||||
|
|
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
|
||||
/** Halt the processor in the debug state
|
||||
*/
|
||||
static inline void CY_HALT()
|
||||
static inline void CY_HALT(void)
|
||||
{
|
||||
__asm(" bkpt 1");
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ static inline void CY_HALT()
|
|||
#define CY_RAMFUNC_BEGIN __attribute__ ((section(".cy_ramfunc")))
|
||||
#define CY_RAMFUNC_END
|
||||
#endif
|
||||
|
||||
|
||||
#define CY_UNUSED __attribute__ ((unused))
|
||||
#define CY_NOINLINE __attribute__ ((noinline))
|
||||
#define CY_ALIGN(align) __ALIGNED(align)
|
||||
|
@ -215,7 +215,7 @@ static inline void CY_HALT()
|
|||
*******************************************************************************/
|
||||
#define CY_GET_REG24(addr) (((uint32_t) (*((const volatile uint8_t *)(addr)))) | \
|
||||
(((uint32_t) (*((const volatile uint8_t *)(addr) + 1))) << 8U) | \
|
||||
(((uint32_t) (*((const volatile uint8_t *)(addr) + 2))) << 16U))
|
||||
(((uint32_t) (*((const volatile uint8_t *)(addr) + 2))) << 16U))
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -284,8 +284,8 @@ static inline void CY_HALT()
|
|||
* Macro Name: CY_REG32_CLR_SET
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write
|
||||
* operations with a name field and value and writes a resulting value
|
||||
* Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write
|
||||
* operations with a name field and value and writes a resulting value
|
||||
* to the 32-bit register.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
@ -303,14 +303,14 @@ static inline void CY_HALT()
|
|||
*******************************************************************************/
|
||||
#define _CLR_SET_FLD16U(reg, field, value) ((uint16_t)(((reg) & ((uint16_t)(~(field ## _Msk)))) | \
|
||||
((uint16_t)_VAL2FLD(field, value))))
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Macro Name: CY_REG16_CLR_SET
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write
|
||||
* operations with a name field and value and writes a resulting value
|
||||
* Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write
|
||||
* operations with a name field and value and writes a resulting value
|
||||
* to the 16-bit register.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
@ -328,14 +328,14 @@ static inline void CY_HALT()
|
|||
*******************************************************************************/
|
||||
#define _CLR_SET_FLD8U(reg, field, value) ((uint8_t)(((reg) & ((uint8_t)(~(field ## _Msk)))) | \
|
||||
((uint8_t)_VAL2FLD(field, value))))
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Macro Name: CY_REG8_CLR_SET
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write
|
||||
* operations with a name field and value and writes a resulting value
|
||||
* Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write
|
||||
* operations with a name field and value and writes a resulting value
|
||||
* to the 8-bit register.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<version>1.1.2.12585</version>
|
Loading…
Reference in New Issue