MTB CAT1 Peripheral driver library

General Description

API Reference

 DAC functions
 
 Comparator functions
 

Functions

cy_rslt_t Cy_HPPASS_CSG_Init (const cy_stc_hppass_csg_t *csgCfg)
 Loads the CSG configuration. More...
 
void Cy_HPPASS_CSG_DeInit (void)
 De-initializes the CSG block, returns register values to default.
 
cy_en_hppass_status_t Cy_HPPASS_CSG_SliceConfig (uint8_t sliceIdx, const cy_stc_hppass_slice_t *slice)
 Configures comparator and DAC for the specified CSG slice. More...
 
cy_en_hppass_status_t Cy_HPPASS_CSG_LoadWaveform (uint8_t lutIdx, uint8_t dataIdx, uint8_t numSamples, const uint16_t *waveform)
 Sets waveform data for the specified LUT. More...
 
__STATIC_INLINE uint32_t Cy_HPPASS_DAC_GetInterruptStatus (void)
 Gets the interrupt register status for the specified DAC. More...
 
__STATIC_INLINE void Cy_HPPASS_DAC_ClearInterrupt (uint32_t interrupt)
 Clears the interrupt for the specified DAC. More...
 
__STATIC_INLINE void Cy_HPPASS_DAC_SetInterrupt (uint32_t interrupt)
 Sets a software interrupt request for the specified DAC. More...
 
__STATIC_INLINE void Cy_HPPASS_DAC_SetInterruptMask (uint32_t interrupt)
 Enables the interrupt for the specified DAC. More...
 
__STATIC_INLINE uint32_t Cy_HPPASS_DAC_GetInterruptMask (void)
 Gets the interrupt mask for the specified DAC. More...
 
__STATIC_INLINE uint32_t Cy_HPPASS_DAC_GetInterruptStatusMasked (void)
 Gets all DACs interrupt masked status. More...
 
__STATIC_INLINE uint32_t Cy_HPPASS_Comp_GetInterruptStatus (void)
 Gets the interrupt register status for the specified comparator. More...
 
__STATIC_INLINE void Cy_HPPASS_Comp_ClearInterrupt (uint32_t interrupt)
 Clears the interrupt for the specified comparator. More...
 
__STATIC_INLINE void Cy_HPPASS_Comp_SetInterrupt (uint32_t interrupt)
 Sets a software interrupt request for the specified comparator. More...
 
__STATIC_INLINE void Cy_HPPASS_Comp_SetInterruptMask (uint32_t interrupt)
 Enables the interrupt for the specified comparator. More...
 
__STATIC_INLINE uint32_t Cy_HPPASS_Comp_GetInterruptMask (void)
 Gets the interrupt mask for the specified comparator. More...
 
__STATIC_INLINE uint32_t Cy_HPPASS_Comp_GetInterruptStatusMasked (void)
 Gets all comparators interrupt masked status. More...
 

Function Documentation

◆ Cy_HPPASS_CSG_Init()

cy_rslt_t Cy_HPPASS_CSG_Init ( const cy_stc_hppass_csg_t csgCfg)

Loads the CSG configuration.

Can be used after the Cy_HPPASS_Init function to update the CSG settings.

Note
If AC is running the initialization of GSC block is not allowed (CY_HPPASS_AC_INVALID_STATE will be returned).
Since the 'block ready' status is combined SAR and CSG, this particular CSG function cannot be protected from reinitialization during active operation, so it is on user's responsibility when and from where to call this function to reinitialize the CSG block.
Parameters
csgCfgPointer to the CSG configuration structure cy_stc_hppass_csg_t. The pointer cannot be NULL.
Returns
The combined status of all the configured slices initialization, cy_en_hppass_status_t.

◆ Cy_HPPASS_CSG_SliceConfig()

cy_en_hppass_status_t Cy_HPPASS_CSG_SliceConfig ( uint8_t  sliceIdx,
const cy_stc_hppass_slice_t slice 
)

Configures comparator and DAC for the specified CSG slice.

Note
If AC is running this configuration is not allowed (CY_HPPASS_AC_INVALID_STATE will be returned).
If the DAC block is currently busy this configuration is not allowed (CY_HPPASS_CSG_INVALID_STATE will be returned).
Since the 'block ready' status is combined SAR and CSG, this particular CSG function cannot be protected from reinitialization during active operation, so it is on user's responsibility when and from where to call this function to reinitialize the CSG Slice.
Parameters
sliceIdxThe CSG slice. Valid range: 0..4.
slicePointer to the CSG slice configuration structure cy_stc_hppass_slice_t. The pointer cannot be NULL.
Returns
Status of initialization, cy_en_hppass_status_t.

◆ Cy_HPPASS_CSG_LoadWaveform()

cy_en_hppass_status_t Cy_HPPASS_CSG_LoadWaveform ( uint8_t  lutIdx,
uint8_t  dataIdx,
uint8_t  numSamples,
const uint16_t *  waveform 
)

Sets waveform data for the specified LUT.

Parameters
lutIdxThe LUT index. Valid range: 0..1.
dataIdxStart index of the waveform in the lookup table. Valid range: 0..127.
numSamplesNumber of samples for the waveform. Valid range: 1..128.
Note
numSamples is not greater than the waveform array size.
The sum of dataIdx and numSamples should be less or equal to 128.
Parameters
waveformThe pointer to LUT data array, max size is 128. The pointer cannot be NULL.
Returns
Status of initialization, cy_en_hppass_status_t.

◆ Cy_HPPASS_DAC_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_HPPASS_DAC_GetInterruptStatus ( void  )

Gets the interrupt register status for the specified DAC.

Returns
The status of combined interrupt requests for the DAC DAC Interrupt Masks.

◆ Cy_HPPASS_DAC_ClearInterrupt()

__STATIC_INLINE void Cy_HPPASS_DAC_ClearInterrupt ( uint32_t  interrupt)

Clears the interrupt for the specified DAC.

Parameters
interruptThe mask of interrupts to clear. Each bit of this mask is responsible for clearing of the particular interrupt in the DAC DAC Interrupt Masks.

◆ Cy_HPPASS_DAC_SetInterrupt()

__STATIC_INLINE void Cy_HPPASS_DAC_SetInterrupt ( uint32_t  interrupt)

Sets a software interrupt request for the specified DAC.

Parameters
interruptThe mask of interrupts to set. Each bit of this mask is responsible for triggering of the particular interrupt in the DAC DAC Interrupt Masks.

◆ Cy_HPPASS_DAC_SetInterruptMask()

__STATIC_INLINE void Cy_HPPASS_DAC_SetInterruptMask ( uint32_t  interrupt)

Enables the interrupt for the specified DAC.

Parameters
interruptThe mask of interrupts allowable for activation. Each bit of this mask allows triggering of the particular interrupt in the DAC DAC Interrupt Masks.

◆ Cy_HPPASS_DAC_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_HPPASS_DAC_GetInterruptMask ( void  )

Gets the interrupt mask for the specified DAC.

Returns
The mask of the interrupts allowable for activation DAC Interrupt Masks.

◆ Cy_HPPASS_DAC_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_HPPASS_DAC_GetInterruptStatusMasked ( void  )

Gets all DACs interrupt masked status.

Returns
The masked status of combined interrupt requests for the DAC DAC Interrupt Masks.

◆ Cy_HPPASS_Comp_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_HPPASS_Comp_GetInterruptStatus ( void  )

Gets the interrupt register status for the specified comparator.

Returns
The status of combined interrupt requests for the Comparator Comparator Interrupt Masks.

◆ Cy_HPPASS_Comp_ClearInterrupt()

__STATIC_INLINE void Cy_HPPASS_Comp_ClearInterrupt ( uint32_t  interrupt)

Clears the interrupt for the specified comparator.

Parameters
interruptThe mask of interrupts to clear. Each bit of this mask is responsible for clearing of the particular interrupt in the Comparator Comparator Interrupt Masks.

◆ Cy_HPPASS_Comp_SetInterrupt()

__STATIC_INLINE void Cy_HPPASS_Comp_SetInterrupt ( uint32_t  interrupt)

Sets a software interrupt request for the specified comparator.

Parameters
interruptThe mask of interrupts to set. Each bit of this mask is responsible for triggering of the particular interrupt in the Comparator Comparator Interrupt Masks.

◆ Cy_HPPASS_Comp_SetInterruptMask()

__STATIC_INLINE void Cy_HPPASS_Comp_SetInterruptMask ( uint32_t  interrupt)

Enables the interrupt for the specified comparator.

Parameters
interruptThe mask of interrupts allowable for activation. Each bit of this mask allows triggering of the particular interrupt in the Comparator Comparator Interrupt Masks.

◆ Cy_HPPASS_Comp_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_HPPASS_Comp_GetInterruptMask ( void  )

Gets the interrupt mask for the specified comparator.

Returns
The mask of the interrupts allowable for activation Comparator Interrupt Masks.

◆ Cy_HPPASS_Comp_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_HPPASS_Comp_GetInterruptStatusMasked ( void  )

Gets all comparators interrupt masked status.

Returns
The masked status of combined interrupt requests for the Comparator Comparator Interrupt Masks.