MTB CAT1 Peripheral driver library
All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages

General Description

Functions

cy_en_mixer_status_t Cy_Mixer_SourceInit (volatile MIXER_SRC_STRUCT_Type *base, cy_stc_mixer_src_config_t const *config)
 Initializes the Mixer source structure. More...
 
void Cy_Mixer_SourceDeInit (volatile MIXER_SRC_STRUCT_Type *base)
 Deinitialize the Mixer source structure. More...
 
cy_en_mixer_status_t Cy_Mixer_DestinationInit (volatile MIXER_DST_STRUCT_Type *base, cy_stc_mixer_dst_config_t const *config)
 Initializes the Mixer destination structure. More...
 
void Cy_Mixer_DestinationDeInit (volatile MIXER_DST_STRUCT_Type *base)
 DeInitializes the Mixer destination structure. More...
 
void Cy_Mixer_SourceStartFadeIn (volatile MIXER_SRC_STRUCT_Type *base, uint16_t pace)
 triggers source fade in. More...
 
bool Cy_Mixer_SourceHasFadeInCompleted (volatile MIXER_SRC_STRUCT_Type *base)
 checks previous fade in operation already completed or not More...
 
void Cy_Mixer_SourceStartFadeOut (volatile MIXER_SRC_STRUCT_Type *base, uint16_t pace, bool deact)
 triggers fade out More...
 
bool Cy_Mixer_SourceHasFadeOutCompleted (volatile MIXER_SRC_STRUCT_Type *base)
 checks previous fade out operation already completed or not More...
 
void Cy_Mixer_DestinationStartFadeIn (volatile MIXER_DST_STRUCT_Type *base, uint16_t pace)
 triggers destination fade in. More...
 
bool Cy_Mixer_DestinationHasFadeInCompleted (volatile MIXER_DST_STRUCT_Type *base)
 checks previous fade in operation already completed or not More...
 
void Cy_Mixer_DestinationStartFadeOut (volatile MIXER_DST_STRUCT_Type *base, uint16_t pace, bool deact)
 triggers fade out More...
 
bool Cy_Mixer_DestinationHasFadeOutCompleted (volatile MIXER_DST_STRUCT_Type *base)
 checks previous fade out operation already completed or not More...
 
__STATIC_INLINE void Cy_Mixer_Src_SampleFreqRatio (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_src_fs_ratio_t fsRatio)
 Set the source sample frequency upscale ratio. More...
 
__STATIC_INLINE void Cy_Mixer_Src_ChannelSelect (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_channel_t channel, cy_en_mixer_src_data_t data)
 Channel selection, specifies selection of the channel's 16-bit PCM data from source FIFO data[31:0]. More...
 
__STATIC_INLINE void Cy_Mixer_Src_Enable (volatile MIXER_SRC_STRUCT_Type *base)
 Mixer source enable. More...
 
__STATIC_INLINE void Cy_Mixer_Src_Disable (volatile MIXER_SRC_STRUCT_Type *base)
 Mixer source disable. More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Src_GetCurrentPhase (volatile MIXER_SRC_STRUCT_Type *base)
 Get the current FIR phase value. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FadeControl (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_fade_code_t fadeCode)
 Set the source fade control (Gain code in the range [0, 115]) More...
 
__STATIC_INLINE uint16_t Cy_Mixer_Src_GetCurrentPace (volatile MIXER_SRC_STRUCT_Type *base)
 Get the current source fading pace counter value. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FadeInEnable (volatile MIXER_SRC_STRUCT_Type *base)
 Mixer source fade in enable (SW sets this field to '1' to start "fade in" functionality. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FadeInDisable (volatile MIXER_SRC_STRUCT_Type *base)
 Mixer source fade in disable. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FadeOutEnable (volatile MIXER_SRC_STRUCT_Type *base)
 Mixer source fade out enable. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FadeOutDisable (volatile MIXER_SRC_STRUCT_Type *base)
 Mixer source fade out disable. More...
 
__STATIC_INLINE void Cy_Mixer_Src_AutoFadeActivate (volatile MIXER_SRC_STRUCT_Type *base)
 Configures the mixer source to NOT deactivate when "fade out" completes. More...
 
__STATIC_INLINE void Cy_Mixer_Src_AutoFadeDeactivate (volatile MIXER_SRC_STRUCT_Type *base)
 Configures the mixer source to automatically deactivate when "fade out" completes. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FadePaceSelect (volatile MIXER_SRC_STRUCT_Type *base, uint16_t pace)
 Specifies the pace/speed of source "fade in" and "fade out". More...
 
__STATIC_INLINE void Cy_Mixer_Src_GainCodeSelect (volatile MIXER_SRC_STRUCT_Type *base, uint8_t code)
 Set the source gain code in the range [0, 127]. More...
 
__STATIC_INLINE void Cy_Mixer_Src_FifoTriggerLevel (volatile MIXER_SRC_STRUCT_Type *base, uint8_t level)
 Set the source FIFO trigger level. More...
 
__STATIC_INLINE void Cy_Mixer_Src_Mute (volatile MIXER_SRC_STRUCT_Type *base)
 Mute the mixer source. More...
 
__STATIC_INLINE void Cy_Mixer_Src_Unmute (volatile MIXER_SRC_STRUCT_Type *base)
 Unmute the mixer source. More...
 
__STATIC_INLINE void Cy_Mixer_Src_Activate (volatile MIXER_SRC_STRUCT_Type *base)
 Activate the mixer source. More...
 
__STATIC_INLINE void Cy_Mixer_Src_Deactivate (volatile MIXER_SRC_STRUCT_Type *base)
 Deactivate the mixer source. More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Src_GetUsedFifoEntries (volatile MIXER_SRC_STRUCT_Type *base)
 Get the number of used/occupied entries in the source FIFO. More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Src_GetFifoReadPtr (volatile MIXER_SRC_STRUCT_Type *base)
 Get the source FIFO read pointer (Source FIFO location from which a data is read). More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Src_GetFifoWritePtr (volatile MIXER_SRC_STRUCT_Type *base)
 Get the source FIFO write pointer (Source FIFO location at which new data is written by the hardware). More...
 
__STATIC_INLINE void Cy_Mixer_Src_FifoWriteData (volatile MIXER_SRC_STRUCT_Type *base, uint32_t data)
 Data (PCM sample pair of two 16-bit samples) written to the top source FIFO entry (data[31:0] = DATA[31:0]). More...
 
__STATIC_INLINE void Cy_Mixer_Src_ClearInterrupt (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_src_interrupt_t intSrc)
 Source interrupt clear (HW sets and SW clears) More...
 
__STATIC_INLINE void Cy_Mixer_Src_SetInterrupt (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_src_interrupt_t intSrc)
 Source interrupt set (Write this field with '1' to set corresponding INTR_SRC field) More...
 
__STATIC_INLINE void Cy_Mixer_Src_ClearInterruptMask (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_src_interrupt_t intSrc)
 Source interrupt clear Mask for corresponding field in INTR_SRC register. More...
 
__STATIC_INLINE void Cy_Mixer_Src_SetInterruptMask (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_src_interrupt_t intSrc)
 Source interrupt set Mask for corresponding field in INTR_SRC register. More...
 
__STATIC_INLINE bool Cy_Mixer_Src_IsInterruptActive (volatile MIXER_SRC_STRUCT_Type *base, cy_en_mixer_src_interrupt_t intSrc)
 Get source interrupt active state. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_Enable (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination enable. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_Disable (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination disable. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FadeControl (volatile MIXER_DST_STRUCT_Type *base, cy_en_mixer_fade_code_t fadeCode)
 Set the destination fade control (Gain code in the range [0, 115]) More...
 
__STATIC_INLINE uint16_t Cy_Mixer_Dst_GetCurrentPace (volatile MIXER_DST_STRUCT_Type *base)
 Get the Destination fading pace counter value. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FadeInEnable (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination fade in enable. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FadeInDisable (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination fade in disable. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FadeOutEnable (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination fade out enable. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FadeOutDisable (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination fade out disable. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_AutoFadeActivate (volatile MIXER_DST_STRUCT_Type *base)
 Configures the mixer destination to NOT deactivate when "fade out" completes. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_AutoFadeDeactivate (volatile MIXER_DST_STRUCT_Type *base)
 Configures the mixer destination to automatically deactivate when "fade out" completes. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FadePaceSelect (volatile MIXER_DST_STRUCT_Type *base, uint16_t pace)
 Destination fade pace select (Specifies the pace/speed of "fade in" and "fade out") More...
 
__STATIC_INLINE void Cy_Mixer_Dst_GainCodeSelect (volatile MIXER_DST_STRUCT_Type *base, uint8_t code)
 Set the destination gain code in the range [0, 127]. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_FifoTriggerLevel (volatile MIXER_DST_STRUCT_Type *base, uint8_t level)
 Destination FIFO trigger level. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_Mute (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination mute. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_Unmute (volatile MIXER_DST_STRUCT_Type *base)
 Mixer destination unmute. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_Activate (volatile MIXER_DST_STRUCT_Type *base)
 Activate the mixer destination. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_Deactivate (volatile MIXER_DST_STRUCT_Type *base)
 Deactivate the mixer destination. More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Dst_GetUsedFifoEntries (volatile MIXER_DST_STRUCT_Type *base)
 Number of used/occupied entries in the destination FIFO. More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Dst_GetFifoReadPtr (volatile MIXER_DST_STRUCT_Type *base)
 Get the destination FIFO read pointer (Destination FIFO location from which a data is read). More...
 
__STATIC_INLINE uint8_t Cy_Mixer_Dst_GetFifoWritePtr (volatile MIXER_DST_STRUCT_Type *base)
 Get the destination FIFO write pointer (Destination FIFO location at which new data is written by the hardware). More...
 
__STATIC_INLINE uint32_t Cy_Mixer_Dst_FifoReadData (volatile MIXER_DST_STRUCT_Type *base)
 Read data (PCM sample pair of two 16-bit samples) at the top destination FIFO entry (data[31:0] = DATA[31:0]). More...
 
__STATIC_INLINE void Cy_Mixer_Dst_ClearInterrupt (volatile MIXER_DST_STRUCT_Type *base, cy_en_mixer_dst_interrupt_t intSrc)
 Destination interrupt clear (HW sets and SW clears) More...
 
__STATIC_INLINE void Cy_Mixer_Dst_SetInterrupt (volatile MIXER_DST_STRUCT_Type *base, cy_en_mixer_dst_interrupt_t intSrc)
 Destination interrupt set (Write this field with '1' to set corresponding INTR_DST field) More...
 
__STATIC_INLINE void Cy_Mixer_Dst_ClearInterruptMask (volatile MIXER_DST_STRUCT_Type *base, cy_en_mixer_dst_interrupt_t intSrc)
 Destination interrupt clear Mask for corresponding field in INTR_DST register. More...
 
__STATIC_INLINE void Cy_Mixer_Dst_SetInterruptMask (volatile MIXER_DST_STRUCT_Type *base, cy_en_mixer_dst_interrupt_t intSrc)
 Destination interrupt set Mask for corresponding field in INTR_DST register. More...
 
__STATIC_INLINE bool Cy_Mixer_Dst_IsInterruptActive (volatile MIXER_DST_STRUCT_Type *base, cy_en_mixer_dst_interrupt_t intSrc)
 Get destination interrupt active state. More...
 

Function Documentation

◆ Cy_Mixer_SourceInit()

cy_en_mixer_status_t Cy_Mixer_SourceInit ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_stc_mixer_src_config_t const *  config 
)

Initializes the Mixer source structure.

Parameters
basePointer to the Mixer SRC Struct instance.
configThe pointer to a configuration structure.
Returns
error / status code. See cy_en_mixer_status_t.
Function Usage
/* Scenario: Set up and start a mixer source */
.fadeCode = CY_MIXER_CODE_MUTE,
.gainCode = 115,
.trgLevel = 0,
};
/* Apply mixer source configuration */
Cy_Mixer_SourceInit(MIXER0_MIXER_SRC_STRUCT0, &config);
/* Enable the mixer source */
Cy_Mixer_Src_Enable(MIXER0_MIXER_SRC_STRUCT0);
/* Activate the mixer source */
Cy_Mixer_Src_Activate(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_SourceDeInit()

void Cy_Mixer_SourceDeInit ( volatile MIXER_SRC_STRUCT_Type *  base)

Deinitialize the Mixer source structure.

Parameters
basePointer to the Mixer SRC Struct instance.
Returns
None.
Function Usage
/* Scenario: The mixer source structure is initialized/working and then no longer used or needs to be reset */
Cy_Mixer_SourceDeInit(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_DestinationInit()

cy_en_mixer_status_t Cy_Mixer_DestinationInit ( volatile MIXER_DST_STRUCT_Type *  base,
cy_stc_mixer_dst_config_t const *  config 
)

Initializes the Mixer destination structure.

Parameters
basePointer to the Mixer DST Struct instance.
configThe pointer to a configuration structure.
Returns
error / status code. See cy_en_mixer_status_t.
Function Usage
/* Scenario: Set up and start a mixer destination */
.gainCode = 115,
.trgLevel = 0,
};
/* Apply mixer destination configuration */
Cy_Mixer_DestinationInit(MIXER0_MIXER_DST_STRUCT, &config);
/* Enable the mixer destination */
Cy_Mixer_Dst_Enable(MIXER0_MIXER_DST_STRUCT);
/* Activate the mixer destination */
Cy_Mixer_Dst_Activate(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_DestinationDeInit()

void Cy_Mixer_DestinationDeInit ( volatile MIXER_DST_STRUCT_Type *  base)

DeInitializes the Mixer destination structure.

Parameters
basePointer to the Mixer DST Struct instance.
Returns
None.
Function Usage
/* Scenario: The mixer destination structure is initialized/working and then no longer used or needs to be reset */
Cy_Mixer_DestinationDeInit(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_SourceStartFadeIn()

void Cy_Mixer_SourceStartFadeIn ( volatile MIXER_SRC_STRUCT_Type *  base,
uint16_t  pace 
)

triggers source fade in.

Parameters
basePointer to the Mixer SRC Struct instance.
pacepace of the fade in
Returns
None.
Function Usage
/* Scenario: Start fading in an active mixer source and wait until the fade-in has completed */
Cy_Mixer_SourceStartFadeIn(MIXER0_MIXER_SRC_STRUCT0, 1023ul);
while (!Cy_Mixer_SourceHasFadeInCompleted(MIXER0_MIXER_SRC_STRUCT0))
{
// wait until fade-in is done
}

◆ Cy_Mixer_SourceHasFadeInCompleted()

bool Cy_Mixer_SourceHasFadeInCompleted ( volatile MIXER_SRC_STRUCT_Type *  base)

checks previous fade in operation already completed or not

Parameters
basePointer to the Mixer SRC Struct instance.
Returns
true : Previous fade in operation already completed
false: Previous fade in operation still in progress
Function Usage
/* Scenario: Start fading in an active mixer source and wait until the fade-in has completed */
Cy_Mixer_SourceStartFadeIn(MIXER0_MIXER_SRC_STRUCT0, 1023ul);
while (!Cy_Mixer_SourceHasFadeInCompleted(MIXER0_MIXER_SRC_STRUCT0))
{
// wait until fade-in is done
}

◆ Cy_Mixer_SourceStartFadeOut()

void Cy_Mixer_SourceStartFadeOut ( volatile MIXER_SRC_STRUCT_Type *  base,
uint16_t  pace,
bool  deact 
)

triggers fade out

Parameters
basePointer to the Mixer SRC Struct instance.
pacepace of the fade out
deacttrue: deactivate the src FIFO when fade out completed
false: Do not deactivate the src FIFO when fade out completed
Returns
None.
Function Usage
/* Scenario: Start fading out an active mixer source and wait until the fade-out has completed */
Cy_Mixer_SourceStartFadeOut(MIXER0_MIXER_SRC_STRUCT0, 1023ul, true);
while (!Cy_Mixer_SourceHasFadeOutCompleted(MIXER0_MIXER_SRC_STRUCT0))
{
// wait until fade-out is done
}

◆ Cy_Mixer_SourceHasFadeOutCompleted()

bool Cy_Mixer_SourceHasFadeOutCompleted ( volatile MIXER_SRC_STRUCT_Type *  base)

checks previous fade out operation already completed or not

Parameters
basePointer to the Mixer SRC Struct instance.
Returns
true : Previous fade out operation already completed
false: Previous fade out operation still in progress
Function Usage
/* Scenario: Start fading out an active mixer source and wait until the fade-out has completed */
Cy_Mixer_SourceStartFadeOut(MIXER0_MIXER_SRC_STRUCT0, 1023ul, true);
while (!Cy_Mixer_SourceHasFadeOutCompleted(MIXER0_MIXER_SRC_STRUCT0))
{
// wait until fade-out is done
}

◆ Cy_Mixer_DestinationStartFadeIn()

void Cy_Mixer_DestinationStartFadeIn ( volatile MIXER_DST_STRUCT_Type *  base,
uint16_t  pace 
)

triggers destination fade in.

Parameters
basePointer to the Mixer DST Struct instance.
pacepace of the fade in
Returns
None.
Function Usage
/* Scenario: Start fading in an active mixer destination and wait until the fade-in has completed */
Cy_Mixer_DestinationStartFadeIn(MIXER0_MIXER_DST_STRUCT, 1023ul);
while (!Cy_Mixer_DestinationHasFadeInCompleted(MIXER0_MIXER_DST_STRUCT))
{
// wait until fade-in is done
}

◆ Cy_Mixer_DestinationHasFadeInCompleted()

bool Cy_Mixer_DestinationHasFadeInCompleted ( volatile MIXER_DST_STRUCT_Type *  base)

checks previous fade in operation already completed or not

Parameters
basePointer to the Mixer DST Struct instance.
Returns
true : Previous fade in operation already completed
false: Previous fade in operation still in progress
Function Usage
/* Scenario: Start fading in an active mixer destination and wait until the fade-in has completed */
Cy_Mixer_DestinationStartFadeIn(MIXER0_MIXER_DST_STRUCT, 1023ul);
while (!Cy_Mixer_DestinationHasFadeInCompleted(MIXER0_MIXER_DST_STRUCT))
{
// wait until fade-in is done
}

◆ Cy_Mixer_DestinationStartFadeOut()

void Cy_Mixer_DestinationStartFadeOut ( volatile MIXER_DST_STRUCT_Type *  base,
uint16_t  pace,
bool  deact 
)

triggers fade out

Parameters
basePointer to the Mixer DST Struct instance.
pacepace of the fade out
deacttrue: deactivate the dst FIFO when fade out completed
false: Do not deactivate the dst FIFO when fade out completed
Returns
None.
Function Usage
/* Scenario: Start fading out an active mixer destination and wait until the fade-out has completed */
Cy_Mixer_DestinationStartFadeOut(MIXER0_MIXER_DST_STRUCT, 1023ul, true);
while (!Cy_Mixer_DestinationHasFadeOutCompleted(MIXER0_MIXER_DST_STRUCT))
{
// wait until fade-out is done
}

◆ Cy_Mixer_DestinationHasFadeOutCompleted()

bool Cy_Mixer_DestinationHasFadeOutCompleted ( volatile MIXER_DST_STRUCT_Type *  base)

checks previous fade out operation already completed or not

Parameters
basePointer to the Mixer DST Struct instance.
Returns
true : Previous fade out operation already completed
false: Previous fade out operation still in progress
Function Usage
/* Scenario: Start fading out an active mixer destination and wait until the fade-out has completed */
Cy_Mixer_DestinationStartFadeOut(MIXER0_MIXER_DST_STRUCT, 1023ul, true);
while (!Cy_Mixer_DestinationHasFadeOutCompleted(MIXER0_MIXER_DST_STRUCT))
{
// wait until fade-out is done
}

◆ Cy_Mixer_Src_SampleFreqRatio()

__STATIC_INLINE void Cy_Mixer_Src_SampleFreqRatio ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_src_fs_ratio_t  fsRatio 
)

Set the source sample frequency upscale ratio.

Parameters
basepointer to the Mixer SRC Struct instance
fsRatiocy_en_mixer_src_fs_ratio_t

◆ Cy_Mixer_Src_ChannelSelect()

__STATIC_INLINE void Cy_Mixer_Src_ChannelSelect ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_channel_t  channel,
cy_en_mixer_src_data_t  data 
)

Channel selection, specifies selection of the channel's 16-bit PCM data from source FIFO data[31:0].

Parameters
basepointer to the Mixer SRC Struct instance
channelcy_en_mixer_channel_t
datacy_en_mixer_src_data_t

◆ Cy_Mixer_Src_Enable()

__STATIC_INLINE void Cy_Mixer_Src_Enable ( volatile MIXER_SRC_STRUCT_Type *  base)

Mixer source enable.

Parameters
basepointer to the Mixer SRC Struct instance
Function Usage
/* Scenario: Set up and start a mixer source */
.fadeCode = CY_MIXER_CODE_MUTE,
.gainCode = 115,
.trgLevel = 0,
};
/* Apply mixer source configuration */
Cy_Mixer_SourceInit(MIXER0_MIXER_SRC_STRUCT0, &config);
/* Enable the mixer source */
Cy_Mixer_Src_Enable(MIXER0_MIXER_SRC_STRUCT0);
/* Activate the mixer source */
Cy_Mixer_Src_Activate(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_Src_Disable()

__STATIC_INLINE void Cy_Mixer_Src_Disable ( volatile MIXER_SRC_STRUCT_Type *  base)

Mixer source disable.

Parameters
basepointer to the Mixer SRC Struct instance
Function Usage
/* Scenario: An active mixer source needs to be disabled */
/* Deactivate the mixer source */
Cy_Mixer_Src_Deactivate(MIXER0_MIXER_SRC_STRUCT0);
/* Disable the mixer source */
Cy_Mixer_Src_Disable(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_Src_GetCurrentPhase()

__STATIC_INLINE uint8_t Cy_Mixer_Src_GetCurrentPhase ( volatile MIXER_SRC_STRUCT_Type *  base)

Get the current FIR phase value.

An upscale ratio of "n" uses a n polyphase FIR filter. The phases are numbered [0, n-1].

Parameters
basepointer to the Mixer SRC Struct instance
Returns
The current FIR phase value.

◆ Cy_Mixer_Src_FadeControl()

__STATIC_INLINE void Cy_Mixer_Src_FadeControl ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_fade_code_t  fadeCode 
)

Set the source fade control (Gain code in the range [0, 115])

Parameters
basepointer to the Mixer SRC Struct instance
fadeCodecy_en_mixer_fade_code_t

◆ Cy_Mixer_Src_GetCurrentPace()

__STATIC_INLINE uint16_t Cy_Mixer_Src_GetCurrentPace ( volatile MIXER_SRC_STRUCT_Type *  base)

Get the current source fading pace counter value.

SRC_FADE_CTL.PACE value of "n" reuses a specific fade value "n+1" times.

Parameters
basepointer to the Mixer SRC Struct instance
Returns
The current fading pace counter value

◆ Cy_Mixer_Src_FadeInEnable()

__STATIC_INLINE void Cy_Mixer_Src_FadeInEnable ( volatile MIXER_SRC_STRUCT_Type *  base)

Mixer source fade in enable (SW sets this field to '1' to start "fade in" functionality.

HW clears this field to '0' to indicate that "fade in" has completed)

FADE_IN and FADE_OUT should be used mutually exclusively. However, if "fade in" is desired while "fading out", SW can set FADE_IN to '1' and clear FADE_OUT to '0'. "Fade in" will commence from the current CODE value. Similarly, if "fade out" is desired while "fading in", SW can set FADE_OUT to '1' and clear FADE_IN to '0'. "Fade out" will commence from the current CODE value.

Parameters
basepointer to the Mixer SRC Struct instance

◆ Cy_Mixer_Src_FadeInDisable()

__STATIC_INLINE void Cy_Mixer_Src_FadeInDisable ( volatile MIXER_SRC_STRUCT_Type *  base)

Mixer source fade in disable.

Parameters
basepointer to the Mixer SRC Struct instance

◆ Cy_Mixer_Src_FadeOutEnable()

__STATIC_INLINE void Cy_Mixer_Src_FadeOutEnable ( volatile MIXER_SRC_STRUCT_Type *  base)

Mixer source fade out enable.

Parameters
basepointer to the Mixer SRC Struct instance

◆ Cy_Mixer_Src_FadeOutDisable()

__STATIC_INLINE void Cy_Mixer_Src_FadeOutDisable ( volatile MIXER_SRC_STRUCT_Type *  base)

Mixer source fade out disable.

Parameters
basepointer to the Mixer SRC Struct instance

◆ Cy_Mixer_Src_AutoFadeActivate()

__STATIC_INLINE void Cy_Mixer_Src_AutoFadeActivate ( volatile MIXER_SRC_STRUCT_Type *  base)

Configures the mixer source to NOT deactivate when "fade out" completes.

Parameters
basepointer to the Mixer SRC Struct instance

◆ Cy_Mixer_Src_AutoFadeDeactivate()

__STATIC_INLINE void Cy_Mixer_Src_AutoFadeDeactivate ( volatile MIXER_SRC_STRUCT_Type *  base)

Configures the mixer source to automatically deactivate when "fade out" completes.

Parameters
basepointer to the Mixer SRC Struct instance

◆ Cy_Mixer_Src_FadePaceSelect()

__STATIC_INLINE void Cy_Mixer_Src_FadePaceSelect ( volatile MIXER_SRC_STRUCT_Type *  base,
uint16_t  pace 
)

Specifies the pace/speed of source "fade in" and "fade out".

Parameters
basepointer to the Mixer SRC Struct instance
pace(10-bit value) "0": The same CODE value is used (0+1) times, "1": The same CODE value is used (1+1) times. ... "1023": The same CODE value is used (1023+1) times. A fade in from "mute" to 0 dB takes 1024*116 = 118,784 PCM samples. At a PCM sample frequency Fs of 48 kHz, this translates into 118,784/48,000 = 2.474 seconds.

◆ Cy_Mixer_Src_GainCodeSelect()

__STATIC_INLINE void Cy_Mixer_Src_GainCodeSelect ( volatile MIXER_SRC_STRUCT_Type *  base,
uint8_t  code 
)

Set the source gain code in the range [0, 127].

Each gain code increment represents 1 dB. Gain code value "0" represents digital mute. Gain code "127" represents a maximum amplification of 12 dB.

Parameters
basepointer to the Mixer SRC Struct instance
code(7-bit value) "0": digital mute. Multiplier value is "0" and "shift" is "26". "1": -114 dB. Multiplier value is "134" and "shift" is "26". "2": -113 dB. Multiplier value is "150" and "shift" is "26". "3": -112 dB. Multiplier value is "169" and "shift" is "26". ... "115": 0 dB. Multiplier value is "4096" and "shift" is "12". Note that (4096 * x) >> 12 = x; i.e. the PCM value is unaffected. ... "121": 6 dB. Multiplier value is "8173" and "shift" is "12". ... "127": 12 dB. Multiplier value is "8153" and "shift" is "11".

◆ Cy_Mixer_Src_FifoTriggerLevel()

__STATIC_INLINE void Cy_Mixer_Src_FifoTriggerLevel ( volatile MIXER_SRC_STRUCT_Type *  base,
uint8_t  level 
)

Set the source FIFO trigger level.

When the source FIFO has fewer entries than the number of this field, a transmitter trigger event is generated.

Parameters
basepointer to the Mixer SRC Struct instance
level(7-bit value) (INTR_SRC.FIFO_TRIGGER = (# FIFO entries < TRIGGER_LEVEL))

◆ Cy_Mixer_Src_Mute()

__STATIC_INLINE void Cy_Mixer_Src_Mute ( volatile MIXER_SRC_STRUCT_Type *  base)

Mute the mixer source.

Parameters
basepointer to the Mixer SRC Struct instance
Function Usage
/* Scenario: An active mixer source needs to be muted */
Cy_Mixer_Src_Mute(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_Src_Unmute()

__STATIC_INLINE void Cy_Mixer_Src_Unmute ( volatile MIXER_SRC_STRUCT_Type *  base)

Unmute the mixer source.

Parameters
basepointer to the Mixer SRC Struct instance
Function Usage
/* Scenario: A muted mixer source needs to be unmuted */
Cy_Mixer_Src_Unmute(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_Src_Activate()

__STATIC_INLINE void Cy_Mixer_Src_Activate ( volatile MIXER_SRC_STRUCT_Type *  base)

Activate the mixer source.

Parameters
basepointer to the Mixer SRC Struct instance
Function Usage
/* Scenario: Set up and start a mixer source */
.fadeCode = CY_MIXER_CODE_MUTE,
.gainCode = 115,
.trgLevel = 0,
};
/* Apply mixer source configuration */
Cy_Mixer_SourceInit(MIXER0_MIXER_SRC_STRUCT0, &config);
/* Enable the mixer source */
Cy_Mixer_Src_Enable(MIXER0_MIXER_SRC_STRUCT0);
/* Activate the mixer source */
Cy_Mixer_Src_Activate(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_Src_Deactivate()

__STATIC_INLINE void Cy_Mixer_Src_Deactivate ( volatile MIXER_SRC_STRUCT_Type *  base)

Deactivate the mixer source.

Parameters
basepointer to the Mixer SRC Struct instance
Function Usage
/* Scenario: An active mixer source needs to be disabled */
/* Deactivate the mixer source */
Cy_Mixer_Src_Deactivate(MIXER0_MIXER_SRC_STRUCT0);
/* Disable the mixer source */
Cy_Mixer_Src_Disable(MIXER0_MIXER_SRC_STRUCT0);

◆ Cy_Mixer_Src_GetUsedFifoEntries()

__STATIC_INLINE uint8_t Cy_Mixer_Src_GetUsedFifoEntries ( volatile MIXER_SRC_STRUCT_Type *  base)

Get the number of used/occupied entries in the source FIFO.

The field value is in the range [0, 128]. When "0", the FIFO is empty. When "128", the FIFO is full.

Parameters
basepointer to the Mixer SRC Struct instance
Returns
uint8_t number of used/occupied entries in the source FIFO

◆ Cy_Mixer_Src_GetFifoReadPtr()

__STATIC_INLINE uint8_t Cy_Mixer_Src_GetFifoReadPtr ( volatile MIXER_SRC_STRUCT_Type *  base)

Get the source FIFO read pointer (Source FIFO location from which a data is read).

Parameters
basepointer to the Mixer SRC Struct instance
Returns
uint8_t read pointer value

◆ Cy_Mixer_Src_GetFifoWritePtr()

__STATIC_INLINE uint8_t Cy_Mixer_Src_GetFifoWritePtr ( volatile MIXER_SRC_STRUCT_Type *  base)

Get the source FIFO write pointer (Source FIFO location at which new data is written by the hardware).

Parameters
basepointer to the Mixer SRC Struct instance
Returns
uint8_t write pointer value

◆ Cy_Mixer_Src_FifoWriteData()

__STATIC_INLINE void Cy_Mixer_Src_FifoWriteData ( volatile MIXER_SRC_STRUCT_Type *  base,
uint32_t  data 
)

Data (PCM sample pair of two 16-bit samples) written to the top source FIFO entry (data[31:0] = DATA[31:0]).

Typically, DATA[15:0] is used for channel 0 and DATA[31:16] is used for channel 1. Writing adds the data to the source FIFO; i.e. behavior is similar to that of a PUSH operation.

Parameters
basepointer to the Mixer SRC Struct instance
data32-bit data
Function Usage
/* Scenario: PCM data needs to be written to the FIFO of an active mixer source */
const int16_t pcmData[2] =
{
11187, // channel 0 data
-31119 // channel 1 data
};
/* Write a SRC FIFO data element containing 2-channel data */
Cy_Mixer_Src_FifoWriteData(MIXER0_MIXER_SRC_STRUCT0, *((uint32_t *)pcmData));

◆ Cy_Mixer_Src_ClearInterrupt()

__STATIC_INLINE void Cy_Mixer_Src_ClearInterrupt ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_src_interrupt_t  intSrc 
)

Source interrupt clear (HW sets and SW clears)

Parameters
basepointer to the Mixer SRC Struct instance
intSrccy_en_mixer_src_interrupt_t
Function Usage
/* Scenario: Inside the mixer source interrupt service routine */
{
}

◆ Cy_Mixer_Src_SetInterrupt()

__STATIC_INLINE void Cy_Mixer_Src_SetInterrupt ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_src_interrupt_t  intSrc 
)

Source interrupt set (Write this field with '1' to set corresponding INTR_SRC field)

Parameters
basepointer to the Mixer SRC Struct instance
intSrccy_en_mixer_src_interrupt_t

◆ Cy_Mixer_Src_ClearInterruptMask()

__STATIC_INLINE void Cy_Mixer_Src_ClearInterruptMask ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_src_interrupt_t  intSrc 
)

Source interrupt clear Mask for corresponding field in INTR_SRC register.

Parameters
basepointer to the Mixer SRC Struct instance
intSrccy_en_mixer_src_interrupt_t
Function Usage
/* Scenario: Disable interrupts from the FIFO trigger and enable interrupts from FIFO overflow */

◆ Cy_Mixer_Src_SetInterruptMask()

__STATIC_INLINE void Cy_Mixer_Src_SetInterruptMask ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_src_interrupt_t  intSrc 
)

Source interrupt set Mask for corresponding field in INTR_SRC register.

Parameters
basepointer to the Mixer SRC Struct instance
intSrccy_en_mixer_src_interrupt_t
Function Usage
/* Scenario: Disable interrupts from the FIFO trigger and enable interrupts from FIFO overflow */

◆ Cy_Mixer_Src_IsInterruptActive()

__STATIC_INLINE bool Cy_Mixer_Src_IsInterruptActive ( volatile MIXER_SRC_STRUCT_Type *  base,
cy_en_mixer_src_interrupt_t  intSrc 
)

Get source interrupt active state.

Parameters
basepointer to the Mixer SRC Struct instance
intSrccy_en_mixer_src_interrupt_t
Returns
true: interrupt is set false: interrupt is not set
Function Usage
/* Scenario: Inside the mixer source interrupt service routine */
{
}

◆ Cy_Mixer_Dst_Enable()

__STATIC_INLINE void Cy_Mixer_Dst_Enable ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination enable.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: Set up and start a mixer destination */
.gainCode = 115,
.trgLevel = 0,
};
/* Apply mixer destination configuration */
Cy_Mixer_DestinationInit(MIXER0_MIXER_DST_STRUCT, &config);
/* Enable the mixer destination */
Cy_Mixer_Dst_Enable(MIXER0_MIXER_DST_STRUCT);
/* Activate the mixer destination */
Cy_Mixer_Dst_Activate(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_Dst_Disable()

__STATIC_INLINE void Cy_Mixer_Dst_Disable ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination disable.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: The active mixer destination needs to be disabled */
/* Deactivate the mixer destination */
Cy_Mixer_Dst_Deactivate(MIXER0_MIXER_DST_STRUCT);
/* Disable the mixer destination */
Cy_Mixer_Dst_Disable(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_Dst_FadeControl()

__STATIC_INLINE void Cy_Mixer_Dst_FadeControl ( volatile MIXER_DST_STRUCT_Type *  base,
cy_en_mixer_fade_code_t  fadeCode 
)

Set the destination fade control (Gain code in the range [0, 115])

Parameters
basepointer to the Mixer DST Struct instance
fadeCodecy_en_mixer_fade_code_t

◆ Cy_Mixer_Dst_GetCurrentPace()

__STATIC_INLINE uint16_t Cy_Mixer_Dst_GetCurrentPace ( volatile MIXER_DST_STRUCT_Type *  base)

Get the Destination fading pace counter value.

DST_FADE_CTL.PACE value of "n" reuses a specific fade value "n+1" times.

Parameters
basepointer to the Mixer DST Struct instance
Returns
uint16_t fading pace counter value

◆ Cy_Mixer_Dst_FadeInEnable()

__STATIC_INLINE void Cy_Mixer_Dst_FadeInEnable ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination fade in enable.

(SW sets this field to '1' to start "fade in" functionality. HW clears this field to '0' to indicate that "fade in" has completed) FADE_IN and FADE_OUT should be used mutually exclusively. However, if "fade in" is desired while "fading out", SW can set FADE_IN to '1' and clear FADE_OUT to '0'. "Fade in" will commence from the current CODE value. Similarly, if "fade out" is desired while "fading in", SW can set FADE_OUT to '1' and clear FADE_IN to '0'. "Fade out" will commence from the current CODE value.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: Start fading in the active mixer destination */
/* Configure the pace of the fade in */
Cy_Mixer_Dst_FadePaceSelect(MIXER0_MIXER_DST_STRUCT, 511);
/* Start the fade in operation */
Cy_Mixer_Dst_FadeInEnable(MIXER0_MIXER_DST_STRUCT);
while (0 != _FLD2VAL(MIXER_MIXER_DST_STRUCT_DST_FADE_CMD_FADE_IN, MIXER_DST_STRUCT_DST_FADE_CMD(MIXER0_MIXER_DST_STRUCT)))
{
// Destination is fading in
}

◆ Cy_Mixer_Dst_FadeInDisable()

__STATIC_INLINE void Cy_Mixer_Dst_FadeInDisable ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination fade in disable.

Parameters
basepointer to the Mixer DST Struct instance

◆ Cy_Mixer_Dst_FadeOutEnable()

__STATIC_INLINE void Cy_Mixer_Dst_FadeOutEnable ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination fade out enable.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: Start fading in the active mixer destination */
/* Configure the pace of the fade out */
Cy_Mixer_Dst_FadePaceSelect(MIXER0_MIXER_DST_STRUCT, 511);
/* Automatically disable the destination when the fade out completes */
Cy_Mixer_Dst_AutoFadeDeactivate(MIXER0_MIXER_DST_STRUCT);
/* Start the fade out operation */
Cy_Mixer_Dst_FadeOutEnable(MIXER0_MIXER_DST_STRUCT);
while (0 != _FLD2VAL(MIXER_MIXER_DST_STRUCT_DST_FADE_CMD_FADE_OUT, MIXER_DST_STRUCT_DST_FADE_CMD(MIXER0_MIXER_DST_STRUCT)))
{
// Destination is fading out
}

◆ Cy_Mixer_Dst_FadeOutDisable()

__STATIC_INLINE void Cy_Mixer_Dst_FadeOutDisable ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination fade out disable.

Parameters
basepointer to the Mixer DST Struct instance

◆ Cy_Mixer_Dst_AutoFadeActivate()

__STATIC_INLINE void Cy_Mixer_Dst_AutoFadeActivate ( volatile MIXER_DST_STRUCT_Type *  base)

Configures the mixer destination to NOT deactivate when "fade out" completes.

Parameters
basepointer to the Mixer DST Struct instance

◆ Cy_Mixer_Dst_AutoFadeDeactivate()

__STATIC_INLINE void Cy_Mixer_Dst_AutoFadeDeactivate ( volatile MIXER_DST_STRUCT_Type *  base)

Configures the mixer destination to automatically deactivate when "fade out" completes.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: Start fading in the active mixer destination */
/* Configure the pace of the fade out */
Cy_Mixer_Dst_FadePaceSelect(MIXER0_MIXER_DST_STRUCT, 511);
/* Automatically disable the destination when the fade out completes */
Cy_Mixer_Dst_AutoFadeDeactivate(MIXER0_MIXER_DST_STRUCT);
/* Start the fade out operation */
Cy_Mixer_Dst_FadeOutEnable(MIXER0_MIXER_DST_STRUCT);
while (0 != _FLD2VAL(MIXER_MIXER_DST_STRUCT_DST_FADE_CMD_FADE_OUT, MIXER_DST_STRUCT_DST_FADE_CMD(MIXER0_MIXER_DST_STRUCT)))
{
// Destination is fading out
}

◆ Cy_Mixer_Dst_FadePaceSelect()

__STATIC_INLINE void Cy_Mixer_Dst_FadePaceSelect ( volatile MIXER_DST_STRUCT_Type *  base,
uint16_t  pace 
)

Destination fade pace select (Specifies the pace/speed of "fade in" and "fade out")

Parameters
basepointer to the Mixer DST Struct instance
pace(10-bit value) "0": The same CODE value is used (0+1) times, "1": The same CODE value is used (1+1) times. ... "1023": The same CODE value is used (1023+1) times. A fade in from "mute" to 0 dB takes 1024*116 = 118,784 PCM samples. At a PCM sample frequency Fs of 48 kHz, this translates into 118,784/48,000 = 2.474 seconds.
Function Usage
/* Scenario: Start fading in the active mixer destination */
/* Configure the pace of the fade in */
Cy_Mixer_Dst_FadePaceSelect(MIXER0_MIXER_DST_STRUCT, 511);
/* Start the fade in operation */
Cy_Mixer_Dst_FadeInEnable(MIXER0_MIXER_DST_STRUCT);
while (0 != _FLD2VAL(MIXER_MIXER_DST_STRUCT_DST_FADE_CMD_FADE_IN, MIXER_DST_STRUCT_DST_FADE_CMD(MIXER0_MIXER_DST_STRUCT)))
{
// Destination is fading in
}

◆ Cy_Mixer_Dst_GainCodeSelect()

__STATIC_INLINE void Cy_Mixer_Dst_GainCodeSelect ( volatile MIXER_DST_STRUCT_Type *  base,
uint8_t  code 
)

Set the destination gain code in the range [0, 127].

Each gain code increment represents 1 dB. Gain code value "0" represents digital mute. Gain code "127" represents a maximum amplification of 12 dB.

Parameters
basepointer to the Mixer DST Struct instance
code(7-bit value) "0": digital mute. Multiplier value is "0" and "shift" is "26". "1": -114 dB. Multiplier value is "134" and "shift" is "26". "2": -113 dB. Multiplier value is "150" and "shift" is "26". "3": -112 dB. Multiplier value is "169" and "shift" is "26". ... "115": 0 dB. Multiplier value is "4096" and "shift" is "12". Note that (4096 * x) >> 12 = x; i.e. the PCM value is unaffected. ... "121": 6 dB. Multiplier value is "8173" and "shift" is "12". ... "127": 12 dB. Multiplier value is "8153" and "shift" is "11".

◆ Cy_Mixer_Dst_FifoTriggerLevel()

__STATIC_INLINE void Cy_Mixer_Dst_FifoTriggerLevel ( volatile MIXER_DST_STRUCT_Type *  base,
uint8_t  level 
)

Destination FIFO trigger level.

When the destination FIFO has more entries than the number of this field, a transmitter trigger event is generated.

Parameters
basepointer to the Mixer DST Struct instance
level(6-bit value) (INTR_SRC.FIFO_TRIGGER = (# FIFO entries > TRIGGER_LEVEL))

◆ Cy_Mixer_Dst_Mute()

__STATIC_INLINE void Cy_Mixer_Dst_Mute ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination mute.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: The active mixer destination needs to be muted */
Cy_Mixer_Dst_Mute(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_Dst_Unmute()

__STATIC_INLINE void Cy_Mixer_Dst_Unmute ( volatile MIXER_DST_STRUCT_Type *  base)

Mixer destination unmute.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: The muted mixer destination needs to be unmuted */
Cy_Mixer_Dst_Unmute(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_Dst_Activate()

__STATIC_INLINE void Cy_Mixer_Dst_Activate ( volatile MIXER_DST_STRUCT_Type *  base)

Activate the mixer destination.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: Set up and start a mixer destination */
.gainCode = 115,
.trgLevel = 0,
};
/* Apply mixer destination configuration */
Cy_Mixer_DestinationInit(MIXER0_MIXER_DST_STRUCT, &config);
/* Enable the mixer destination */
Cy_Mixer_Dst_Enable(MIXER0_MIXER_DST_STRUCT);
/* Activate the mixer destination */
Cy_Mixer_Dst_Activate(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_Dst_Deactivate()

__STATIC_INLINE void Cy_Mixer_Dst_Deactivate ( volatile MIXER_DST_STRUCT_Type *  base)

Deactivate the mixer destination.

Parameters
basepointer to the Mixer DST Struct instance
Function Usage
/* Scenario: The active mixer destination needs to be disabled */
/* Deactivate the mixer destination */
Cy_Mixer_Dst_Deactivate(MIXER0_MIXER_DST_STRUCT);
/* Disable the mixer destination */
Cy_Mixer_Dst_Disable(MIXER0_MIXER_DST_STRUCT);

◆ Cy_Mixer_Dst_GetUsedFifoEntries()

__STATIC_INLINE uint8_t Cy_Mixer_Dst_GetUsedFifoEntries ( volatile MIXER_DST_STRUCT_Type *  base)

Number of used/occupied entries in the destination FIFO.

The field value is in the range [0, 128]. When "0", the FIFO is empty. When "128", the FIFO is full.

Parameters
basepointer to the Mixer DST Struct instance
Returns
uint8_t number of used/occupied entries in the destination FIFO

◆ Cy_Mixer_Dst_GetFifoReadPtr()

__STATIC_INLINE uint8_t Cy_Mixer_Dst_GetFifoReadPtr ( volatile MIXER_DST_STRUCT_Type *  base)

Get the destination FIFO read pointer (Destination FIFO location from which a data is read).

Parameters
basepointer to the Mixer DST Struct instance
Returns
uint8_t read pointer value

◆ Cy_Mixer_Dst_GetFifoWritePtr()

__STATIC_INLINE uint8_t Cy_Mixer_Dst_GetFifoWritePtr ( volatile MIXER_DST_STRUCT_Type *  base)

Get the destination FIFO write pointer (Destination FIFO location at which new data is written by the hardware).

Parameters
basepointer to the Mixer DST Struct instance
Returns
uint8_t write pointer value

◆ Cy_Mixer_Dst_FifoReadData()

__STATIC_INLINE uint32_t Cy_Mixer_Dst_FifoReadData ( volatile MIXER_DST_STRUCT_Type *  base)

Read data (PCM sample pair of two 16-bit samples) at the top destination FIFO entry (data[31:0] = DATA[31:0]).

Reading removes the data from the destination FIFO; i.e. behavior is similar to that of a POP operation (DST_FIFO_STATUS.RD_PTR is incremented and DST_FIFO_STATUS.USED is decremented).

Parameters
basepointer to the Mixer DST Struct instance
Returns
uint32_t FIFO data sample
Function Usage
/* Scenario: PCM data needs to be read from the FIFO of an active mixer destination */
uint32_t fifoData = Cy_Mixer_Dst_FifoReadData(MIXER0_MIXER_DST_STRUCT);
(void)fifoData;

◆ Cy_Mixer_Dst_ClearInterrupt()

__STATIC_INLINE void Cy_Mixer_Dst_ClearInterrupt ( volatile MIXER_DST_STRUCT_Type *  base,
cy_en_mixer_dst_interrupt_t  intSrc 
)

Destination interrupt clear (HW sets and SW clears)

Parameters
basepointer to the Mixer DST Struct instance
intSrccy_en_mixer_dst_interrupt_t
Function Usage
/* Scenario: Inside the mixer destination interrupt service routine */
{
}

◆ Cy_Mixer_Dst_SetInterrupt()

__STATIC_INLINE void Cy_Mixer_Dst_SetInterrupt ( volatile MIXER_DST_STRUCT_Type *  base,
cy_en_mixer_dst_interrupt_t  intSrc 
)

Destination interrupt set (Write this field with '1' to set corresponding INTR_DST field)

Parameters
basepointer to the Mixer DST Struct instance
intSrccy_en_mixer_dst_interrupt_t

◆ Cy_Mixer_Dst_ClearInterruptMask()

__STATIC_INLINE void Cy_Mixer_Dst_ClearInterruptMask ( volatile MIXER_DST_STRUCT_Type *  base,
cy_en_mixer_dst_interrupt_t  intSrc 
)

Destination interrupt clear Mask for corresponding field in INTR_DST register.

Parameters
basepointer to the Mixer DST Struct instance
intSrccy_en_mixer_dst_interrupt_t
Function Usage
/* Scenario: Disable interrupts from the FIFO trigger and enable interrupts from FIFO overflow */

◆ Cy_Mixer_Dst_SetInterruptMask()

__STATIC_INLINE void Cy_Mixer_Dst_SetInterruptMask ( volatile MIXER_DST_STRUCT_Type *  base,
cy_en_mixer_dst_interrupt_t  intSrc 
)

Destination interrupt set Mask for corresponding field in INTR_DST register.

Parameters
basepointer to the Mixer DST Struct instance
intSrccy_en_mixer_dst_interrupt_t
Function Usage
/* Scenario: Disable interrupts from the FIFO trigger and enable interrupts from FIFO overflow */

◆ Cy_Mixer_Dst_IsInterruptActive()

__STATIC_INLINE bool Cy_Mixer_Dst_IsInterruptActive ( volatile MIXER_DST_STRUCT_Type *  base,
cy_en_mixer_dst_interrupt_t  intSrc 
)

Get destination interrupt active state.

Parameters
basepointer to the Mixer DST Struct instance
intSrccy_en_mixer_dst_interrupt_t
Returns
true: interrupt is set false: interrupt is not set
Function Usage
/* Scenario: Inside the mixer destination interrupt service routine */
{
}