PSoC 6 Peripheral Driver Library

General Description

This set of functions is related to the CTDAC interrupt.

Functions

__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatus (const CTDAC_Type *base)
 Return the interrupt status which gets set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register. More...
 
__STATIC_INLINE void Cy_CTDAC_ClearInterrupt (CTDAC_Type *base)
 Clear the interrupt that was set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register. More...
 
__STATIC_INLINE void Cy_CTDAC_SetInterrupt (CTDAC_Type *base)
 Force the CTDAC interrupt to trigger using software. More...
 
__STATIC_INLINE void Cy_CTDAC_SetInterruptMask (CTDAC_Type *base, uint32_t mask)
 Configure the CTDAC interrupt to be forwarded to the CPU interrupt controller. More...
 
__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptMask (const CTDAC_Type *base)
 Return whether the CTDAC interrupt is forwarded to the CPU interrupt controller as configured by Cy_CTDAC_SetInterruptMask. More...
 
__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatusMasked (const CTDAC_Type *base)
 Return the bitwise AND of Cy_CTDAC_GetInterruptStatus and Cy_CTDAC_SetInterruptMask. More...
 

Function Documentation

◆ Cy_CTDAC_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatus ( const CTDAC_Type base)

Return the interrupt status which gets set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register.

Once set, the CTDAC_VAL_NXT register is ready to accept a new value.

Note
Interrupts are available in all update modes except Direct write.
Parameters
basePointer to structure describing registers
Returns
  • 0: Value not moved from CTDAC_VAL_NXT to CTDAC_VAL
  • 1: Value moved from CTDAC_VAL_NXT to CTDAC_VAL
Function Usage
/* Scenario: The CTDAC has interrupts enabled. Retrieve the interrupt
* status to determine if the CTDAC is ready to accept a new value. */
uint8_t intrStatus;
/* Get the interrupt status for a specific CTDAC instance on the device. */
intrStatus = Cy_CTDAC_GetInterruptStatus(CTDAC0);
/* If the interrupt status is 1, the CTDAC is ready to accept a new value. */
if (1UL == intrStatus)
{
/* Set the next value to output. */
}

◆ Cy_CTDAC_ClearInterrupt()

__STATIC_INLINE void Cy_CTDAC_ClearInterrupt ( CTDAC_Type base)

Clear the interrupt that was set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register.

The interrupt must be cleared with this function so that the hardware can set subsequent interrupts and those interrupts can be forwarded to the interrupt controller, if enabled.

Note
Interrupts are available in all update modes except Direct write.
Parameters
basePointer to structure describing registers
Returns
None

◆ Cy_CTDAC_SetInterrupt()

__STATIC_INLINE void Cy_CTDAC_SetInterrupt ( CTDAC_Type base)

Force the CTDAC interrupt to trigger using software.

Note
Interrupts are available in all update modes except Direct write.
Parameters
basePointer to structure describing registers
Returns
None

◆ Cy_CTDAC_SetInterruptMask()

__STATIC_INLINE void Cy_CTDAC_SetInterruptMask ( CTDAC_Type base,
uint32_t  mask 
)

Configure the CTDAC interrupt to be forwarded to the CPU interrupt controller.

Note
Interrupts are available in all update modes except Direct write.
Parameters
basePointer to structure describing registers
maskThe CTDAC only has one interrupt so the mask is one bit.
  • 0: Disable CTDAC interrupt request (will not be forwarded to CPU interrupt controller)
  • 1: Enable CTDAC interrupt request (will be forwarded to CPU interrupt controller)
Returns
None
Function Usage
/* Scenario: DMA will be used to update the DAC value. Disable the CTDAC interrupt. */

◆ Cy_CTDAC_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptMask ( const CTDAC_Type base)

Return whether the CTDAC interrupt is forwarded to the CPU interrupt controller as configured by Cy_CTDAC_SetInterruptMask.

Note
Interrupts are available in all update modes except Direct write.
Parameters
basePointer to structure describing registers
Returns
The CTDAC only has one interrupt so the return value is either 0 or 1.
  • 0: Interrupt output not forwarded to CPU interrupt controller
  • 1: Interrupt output forwarded to CPU interrupt controller

◆ Cy_CTDAC_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatusMasked ( const CTDAC_Type base)

Return the bitwise AND of Cy_CTDAC_GetInterruptStatus and Cy_CTDAC_SetInterruptMask.

When high, the DAC interrupt is asserted and the interrupt is forwarded to the CPU interrupt controller.

Note
Interrupts are available in all update modes except Direct write.
Parameters
basePointer to structure describing registers
Returns
  • 0: Value not moved from CTDAC_VAL_NXT to CTDAC_VAL or not masked
  • 1: Value moved from CTDAC_VAL_NXT to CTDAC_VAL and masked