Update core-lib to v1.1.2

pull/12943/head
Kyle Kearney 2020-04-30 13:58:44 -07:00
parent 7698b34e8c
commit 250ca363a3
3 changed files with 47 additions and 40 deletions

View File

@ -28,13 +28,13 @@
* \addtogroup group_result Result Type * \addtogroup group_result Result Type
* \ingroup group_abstraction * \ingroup group_abstraction
* \{ * \{
\anchor anchor_general_description * \anchor anchor_general_description
* Defines a type and related utilities for function result handling. * \brief Defines a type and related utilities for function result handling.
* *
* The cy_rslt_t type is a structured bitfield which encodes information * 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 * about result type, the originating module, and a code for the specific
* error (or warning etc). In order to extract these individual fields from * 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, * 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: * and @ref CY_RSLT_GET_CODE are provided. For example:
* \code * \code
* cy_rslt_t result = cy_hal_do_operation(arg); * cy_rslt_t result = cy_hal_do_operation(arg);
@ -56,10 +56,10 @@
extern "C" { extern "C" {
#endif #endif
/** /**
* @brief Provides the result of an operation as a structured bitfield. * @brief Provides the result of an operation as a structured bitfield.
* *
* See the \ref anchor_general_description "General Description" * See the \ref anchor_general_description "General Description"
* for more details on structure and usage. * for more details on structure and usage.
*/ */
typedef uint32_t cy_rslt_t; 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. * 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 * @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) #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 * @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) #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) #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. * @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, * @param type one of @ref CY_RSLT_TYPE_INFO, @ref CY_RSLT_TYPE_WARNING,
* @ref CY_RSLT_TYPE_ERROR, @ref CY_RSLT_TYPE_FATAL * @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 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 * @param code a module-defined identifier to identify the specific situation that
* this result describes. * this result describes.
*/ */
#define CY_RSLT_CREATE(type, module, code) \ #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 */ /** @brief The result code is informational-only */
#define CY_RSLT_TYPE_INFO (0U) #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) #define CY_RSLT_TYPE_WARNING (1U)
/** @brief The result code is an error */ /** @brief The result code is an error */
#define CY_RSLT_TYPE_ERROR (2U) #define CY_RSLT_TYPE_ERROR (2U)
@ -148,11 +149,12 @@ typedef uint32_t cy_rslt_t;
/** /**
* \{ * \{
@name Modules * @name Modules
@anchor anchor_modules * @anchor anchor_modules
* Defines codes to identify the module from which an error originated. * Defines codes to identify the module from which an error originated.
* For some large libraries, a range of module codes is defined here; * 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 ****/ /**** DRIVER Module codes: 0x0000 - 0x00FF ****/
/** Base module identifier for peripheral driver library drivers (0x0000 - 0x007F) */ /** 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) */ /** Base module identifier for wireless host driver library modules (0x0080 - 0x00FF) */
#define CY_RSLT_MODULE_DRIVERS_WHD_BASE (0x0080U) #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) #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 */ /** Module identifier for board support package */
#define CY_RSLT_MODULE_ABSTRACTION_BSP (0x0180U) #define CY_RSLT_MODULE_ABSTRACTION_BSP (0x0180U)
/** Module identifier for file system abstraction */ /** 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) #define CY_RSLT_MODULE_BOARD_LIB_RGB_LED (0x01A1U)
/** Module identifier for the Serial Flash Board Library */ /** Module identifier for the Serial Flash Board Library */
#define CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH (0x01A2U) #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) */ /** Base module identifier for Shield Board Libraries (0x01C0 - 0x01FF) */
#define CY_RSLT_MODULE_BOARD_SHIELD_BASE (0x01C0U) #define CY_RSLT_MODULE_BOARD_SHIELD_BASE (0x01C0U)

View File

@ -41,7 +41,7 @@ extern "C" {
/** Halt the processor in the debug state /** Halt the processor in the debug state
*/ */
static inline void CY_HALT() static inline void CY_HALT(void)
{ {
__asm(" bkpt 1"); __asm(" bkpt 1");
} }
@ -122,7 +122,7 @@ static inline void CY_HALT()
#define CY_RAMFUNC_BEGIN __attribute__ ((section(".cy_ramfunc"))) #define CY_RAMFUNC_BEGIN __attribute__ ((section(".cy_ramfunc")))
#define CY_RAMFUNC_END #define CY_RAMFUNC_END
#endif #endif
#define CY_UNUSED __attribute__ ((unused)) #define CY_UNUSED __attribute__ ((unused))
#define CY_NOINLINE __attribute__ ((noinline)) #define CY_NOINLINE __attribute__ ((noinline))
#define CY_ALIGN(align) __ALIGNED(align) #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)))) | \ #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) + 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 * Macro Name: CY_REG32_CLR_SET
****************************************************************************//** ****************************************************************************//**
* *
* Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write * Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write
* operations with a name field and value and writes a resulting value * operations with a name field and value and writes a resulting value
* to the 32-bit register. * 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)))) | \ #define _CLR_SET_FLD16U(reg, field, value) ((uint16_t)(((reg) & ((uint16_t)(~(field ## _Msk)))) | \
((uint16_t)_VAL2FLD(field, value)))) ((uint16_t)_VAL2FLD(field, value))))
/******************************************************************************* /*******************************************************************************
* Macro Name: CY_REG16_CLR_SET * Macro Name: CY_REG16_CLR_SET
****************************************************************************//** ****************************************************************************//**
* *
* Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write * Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write
* operations with a name field and value and writes a resulting value * operations with a name field and value and writes a resulting value
* to the 16-bit register. * 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)))) | \ #define _CLR_SET_FLD8U(reg, field, value) ((uint8_t)(((reg) & ((uint8_t)(~(field ## _Msk)))) | \
((uint8_t)_VAL2FLD(field, value)))) ((uint8_t)_VAL2FLD(field, value))))
/******************************************************************************* /*******************************************************************************
* Macro Name: CY_REG8_CLR_SET * Macro Name: CY_REG8_CLR_SET
****************************************************************************//** ****************************************************************************//**
* *
* Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write * Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write
* operations with a name field and value and writes a resulting value * operations with a name field and value and writes a resulting value
* to the 8-bit register. * to the 8-bit register.
* *
*******************************************************************************/ *******************************************************************************/

View File

@ -0,0 +1 @@
<version>1.1.2.12585</version>