MTB CAT1 Peripheral driver library

General Description

Macros

#define CY_PRA_REG32_CLR_SET(regIndex, field, value)   (void)Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_REG32_CLR_SET, (regIndex), ((uint32_t)(~(field ## _Msk))), (_VAL2FLD(field, (value))))
 Provides get-clear-modify-write operations with a name field and value and writes a resulting value to the 32-bit register. More...
 
#define CY_PRA_REG32_SET(regIndex, value)   (void)Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_REG32_SET, (regIndex), (value), 0UL)
 Writes the 32-bit value to the specified register. More...
 
#define CY_PRA_REG32_GET(regIndex)   (uint32_t) Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_REG32_GET, (regIndex), 0UL, 0UL)
 Reads the 32-bit value from the specified register. More...
 
#define CY_PRA_CM0_WAKEUP()   (void)Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_CM0_WAKEUP, (uint16_t) 0U, 0UL, 0UL)
 The request to wake up the Cortex-M0+ core.
 
#define CY_PRA_FUNCTION_CALL_RETURN_PARAM(msgType, funcIndex, param)   Cy_PRA_SendCmd((msgType), (funcIndex), (uint32_t)(param), 0UL)
 Calls the specified function with the provided parameter and returns the execution status. More...
 
#define CY_PRA_FUNCTION_CALL_RETURN_VOID(msgType, funcIndex)   Cy_PRA_SendCmd((msgType), (funcIndex), 0UL, 0UL)
 Calls the specified function without a parameter and returns the execution status. More...
 
#define CY_PRA_FUNCTION_CALL_VOID_PARAM(msgType, funcIndex, param)   (void)Cy_PRA_SendCmd((msgType), (funcIndex), (uint32_t)(param), 0UL)
 Calls the specified function with the provided parameter and returns void. More...
 
#define CY_PRA_FUNCTION_CALL_VOID_VOID(msgType, funcIndex)   (void)Cy_PRA_SendCmd((msgType), (funcIndex), 0UL, 0UL)
 Calls the specified function without a parameter and returns void. More...
 
#define CY_PRA_GET_PIN_PROT_TYPE(base, pinNum)   Cy_PRA_GetPinProtType(base, pinNum)
 Compares the PORT and PIN number with secure PIN list and returns PIN protection type. More...
 
#define CY_PRA_IS_PORT_SECURE(base)   Cy_PRA_IsPortSecure(base)
 Compares the PORT with secure PIN list and returns PORT protection status. More...
 
#define CY_PRA_GET_PORT_REG_INDEX(base, subIndex)   Cy_PRA_GetPortRegIndex(base, subIndex)
 Compares the PORT and PIN number with secure PIN list and returns PORT index. More...
 
#define CY_PRA_GET_HSIOM_REG_INDEX(base, subIndex)   Cy_PRA_GetHsiomRegIndex(base, subIndex)
 Compares the PORT with secure PIN list and returns HSIOM port index. More...
 

Macro Definition Documentation

◆ CY_PRA_REG32_CLR_SET

#define CY_PRA_REG32_CLR_SET (   regIndex,
  field,
  value 
)    (void)Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_REG32_CLR_SET, (regIndex), ((uint32_t)(~(field ## _Msk))), (_VAL2FLD(field, (value))))

Provides get-clear-modify-write operations with a name field and value and writes a resulting value to the 32-bit register.

Note
An attempt to access not-supported registers (not secure and not listed in the TRM) results in an error. The list of the registers that can be accessed by the PRA driver directly is defined in the cy_pra.h file with the CY_PRA_INDX_ prefix.
Parameters
regIndexThe register address index.
fieldThe field to be updated.
valueThe value to write.

◆ CY_PRA_REG32_SET

#define CY_PRA_REG32_SET (   regIndex,
  value 
)    (void)Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_REG32_SET, (regIndex), (value), 0UL)

Writes the 32-bit value to the specified register.

Note
An attempt to access not-supported registers (not secure and not listed in the TRM) results in an error. The list of the registers that can be accessed by the PRA driver directly is defined in the cy_pra.h file with the CY_PRA_INDX_ prefix.
Parameters
regIndexThe register address index.
valueThe value to write.

◆ CY_PRA_REG32_GET

#define CY_PRA_REG32_GET (   regIndex)    (uint32_t) Cy_PRA_SendCmd(CY_PRA_MSG_TYPE_REG32_GET, (regIndex), 0UL, 0UL)

Reads the 32-bit value from the specified register.

Note
An attempt to access not-supported registers (not secure and not listed in the TRM) results in an error. The list of the registers that can be accessed by the PRA driver directly is defined in the cy_pra.h file with the CY_PRA_INDX_ prefix.
Parameters
regIndexThe register address index.
Returns
The read value.

◆ CY_PRA_FUNCTION_CALL_RETURN_PARAM

#define CY_PRA_FUNCTION_CALL_RETURN_PARAM (   msgType,
  funcIndex,
  param 
)    Cy_PRA_SendCmd((msgType), (funcIndex), (uint32_t)(param), 0UL)

Calls the specified function with the provided parameter and returns the execution status.

Parameters
msgTypeThe function type.
funcIndexThe function reference.
paramThe pointer to the function parameter.
Returns
The function execution status.

◆ CY_PRA_FUNCTION_CALL_RETURN_VOID

#define CY_PRA_FUNCTION_CALL_RETURN_VOID (   msgType,
  funcIndex 
)    Cy_PRA_SendCmd((msgType), (funcIndex), 0UL, 0UL)

Calls the specified function without a parameter and returns the execution status.

Parameters
msgTypeThe function type.
funcIndexThe function reference.
Returns
The function execution status.

◆ CY_PRA_FUNCTION_CALL_VOID_PARAM

#define CY_PRA_FUNCTION_CALL_VOID_PARAM (   msgType,
  funcIndex,
  param 
)    (void)Cy_PRA_SendCmd((msgType), (funcIndex), (uint32_t)(param), 0UL)

Calls the specified function with the provided parameter and returns void.

Parameters
msgTypeThe function type.
funcIndexThe function reference.
paramThe pointer to the function parameter.

◆ CY_PRA_FUNCTION_CALL_VOID_VOID

#define CY_PRA_FUNCTION_CALL_VOID_VOID (   msgType,
  funcIndex 
)    (void)Cy_PRA_SendCmd((msgType), (funcIndex), 0UL, 0UL)

Calls the specified function without a parameter and returns void.

Parameters
msgTypeThe function type.
funcIndexThe function reference.

◆ CY_PRA_GET_PIN_PROT_TYPE

#define CY_PRA_GET_PIN_PROT_TYPE (   base,
  pinNum 
)    Cy_PRA_GetPinProtType(base, pinNum)

Compares the PORT and PIN number with secure PIN list and returns PIN protection type.

Parameters
baseGPIO Port address
pinNumGPIO PIN number
Returns
The categories of PIN.

◆ CY_PRA_IS_PORT_SECURE

#define CY_PRA_IS_PORT_SECURE (   base)    Cy_PRA_IsPortSecure(base)

Compares the PORT with secure PIN list and returns PORT protection status.

Parameters
baseGPIO Port address
Returns
true if port is secure otherwise false.

◆ CY_PRA_GET_PORT_REG_INDEX

#define CY_PRA_GET_PORT_REG_INDEX (   base,
  subIndex 
)    Cy_PRA_GetPortRegIndex(base, subIndex)

Compares the PORT and PIN number with secure PIN list and returns PORT index.

Parameters
baseGPIO Port address
subIndexregister index of GPIO PORT
Returns
PRA GPIO PORT register index

◆ CY_PRA_GET_HSIOM_REG_INDEX

#define CY_PRA_GET_HSIOM_REG_INDEX (   base,
  subIndex 
)    Cy_PRA_GetHsiomRegIndex(base, subIndex)

Compares the PORT with secure PIN list and returns HSIOM port index.

Parameters
baseGPIO Port address
subIndexregister index of HSIOM PORT
Returns
PRA HSIOM PORT register index