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... | |
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.
base | Pointer to the Mixer SRC Struct instance. |
config | The pointer to a configuration structure. |
void Cy_Mixer_SourceDeInit | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Deinitialize the Mixer source structure.
base | Pointer to the Mixer SRC Struct instance. |
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.
base | Pointer to the Mixer DST Struct instance. |
config | The pointer to a configuration structure. |
void Cy_Mixer_DestinationDeInit | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
DeInitializes the Mixer destination structure.
base | Pointer to the Mixer DST Struct instance. |
void Cy_Mixer_SourceStartFadeIn | ( | volatile MIXER_SRC_STRUCT_Type * | base, |
uint16_t | pace | ||
) |
triggers source fade in.
base | Pointer to the Mixer SRC Struct instance. |
pace | pace of the fade in |
bool Cy_Mixer_SourceHasFadeInCompleted | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
checks previous fade in operation already completed or not
base | Pointer to the Mixer SRC Struct instance. |
void Cy_Mixer_SourceStartFadeOut | ( | volatile MIXER_SRC_STRUCT_Type * | base, |
uint16_t | pace, | ||
bool | deact | ||
) |
triggers fade out
base | Pointer to the Mixer SRC Struct instance. |
pace | pace of the fade out |
deact | true: deactivate the src FIFO when fade out completed false: Do not deactivate the src FIFO when fade out completed |
bool Cy_Mixer_SourceHasFadeOutCompleted | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
checks previous fade out operation already completed or not
base | Pointer to the Mixer SRC Struct instance. |
void Cy_Mixer_DestinationStartFadeIn | ( | volatile MIXER_DST_STRUCT_Type * | base, |
uint16_t | pace | ||
) |
triggers destination fade in.
base | Pointer to the Mixer DST Struct instance. |
pace | pace of the fade in |
bool Cy_Mixer_DestinationHasFadeInCompleted | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
checks previous fade in operation already completed or not
base | Pointer to the Mixer DST Struct instance. |
void Cy_Mixer_DestinationStartFadeOut | ( | volatile MIXER_DST_STRUCT_Type * | base, |
uint16_t | pace, | ||
bool | deact | ||
) |
triggers fade out
base | Pointer to the Mixer DST Struct instance. |
pace | pace of the fade out |
deact | true: deactivate the dst FIFO when fade out completed false: Do not deactivate the dst FIFO when fade out completed |
bool Cy_Mixer_DestinationHasFadeOutCompleted | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
checks previous fade out operation already completed or not
base | Pointer to the Mixer DST Struct instance. |
__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.
base | pointer to the Mixer SRC Struct instance |
fsRatio | cy_en_mixer_src_fs_ratio_t |
__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].
base | pointer to the Mixer SRC Struct instance |
channel | cy_en_mixer_channel_t |
data | cy_en_mixer_src_data_t |
__STATIC_INLINE void Cy_Mixer_Src_Enable | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Mixer source enable.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_Disable | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Mixer source disable.
base | pointer to the Mixer SRC Struct instance |
__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].
base | pointer to the Mixer SRC Struct instance |
__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])
base | pointer to the Mixer SRC Struct instance |
fadeCode | cy_en_mixer_fade_code_t |
__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.
base | pointer to the Mixer SRC Struct instance |
__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.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_FadeInDisable | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Mixer source fade in disable.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_FadeOutEnable | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Mixer source fade out enable.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_FadeOutDisable | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Mixer source fade out disable.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_AutoFadeActivate | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Configures the mixer source to NOT deactivate when "fade out" completes.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_AutoFadeDeactivate | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Configures the mixer source to automatically deactivate when "fade out" completes.
base | pointer to the Mixer SRC Struct instance |
__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".
base | pointer 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. |
__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.
base | pointer 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". |
__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.
base | pointer to the Mixer SRC Struct instance |
level | (7-bit value) (INTR_SRC.FIFO_TRIGGER = (# FIFO entries < TRIGGER_LEVEL)) |
__STATIC_INLINE void Cy_Mixer_Src_Mute | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Mute the mixer source.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_Unmute | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Unmute the mixer source.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_Activate | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Activate the mixer source.
base | pointer to the Mixer SRC Struct instance |
__STATIC_INLINE void Cy_Mixer_Src_Deactivate | ( | volatile MIXER_SRC_STRUCT_Type * | base | ) |
Deactivate the mixer source.
base | pointer to the Mixer SRC Struct instance |
__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.
base | pointer to the Mixer SRC Struct instance |
__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).
base | pointer to the Mixer SRC Struct instance |
__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).
base | pointer to the Mixer SRC Struct instance |
__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.
base | pointer to the Mixer SRC Struct instance |
data | 32-bit data |
__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)
base | pointer to the Mixer SRC Struct instance |
intSrc | cy_en_mixer_src_interrupt_t |
__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)
base | pointer to the Mixer SRC Struct instance |
intSrc | cy_en_mixer_src_interrupt_t |
__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.
base | pointer to the Mixer SRC Struct instance |
intSrc | cy_en_mixer_src_interrupt_t |
__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.
base | pointer to the Mixer SRC Struct instance |
intSrc | cy_en_mixer_src_interrupt_t |
__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.
base | pointer to the Mixer SRC Struct instance |
intSrc | cy_en_mixer_src_interrupt_t |
__STATIC_INLINE void Cy_Mixer_Dst_Enable | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination enable.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_Disable | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination disable.
base | pointer to the Mixer DST Struct instance |
__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])
base | pointer to the Mixer DST Struct instance |
fadeCode | cy_en_mixer_fade_code_t |
__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.
base | pointer to the Mixer DST Struct instance |
__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.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_FadeInDisable | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination fade in disable.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_FadeOutEnable | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination fade out enable.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_FadeOutDisable | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination fade out disable.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_AutoFadeActivate | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Configures the mixer destination to NOT deactivate when "fade out" completes.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_AutoFadeDeactivate | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Configures the mixer destination to automatically deactivate when "fade out" completes.
base | pointer to the Mixer DST Struct instance |
__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")
base | pointer 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. |
__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.
base | pointer 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". |
__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.
base | pointer to the Mixer DST Struct instance |
level | (6-bit value) (INTR_SRC.FIFO_TRIGGER = (# FIFO entries > TRIGGER_LEVEL)) |
__STATIC_INLINE void Cy_Mixer_Dst_Mute | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination mute.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_Unmute | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Mixer destination unmute.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_Activate | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Activate the mixer destination.
base | pointer to the Mixer DST Struct instance |
__STATIC_INLINE void Cy_Mixer_Dst_Deactivate | ( | volatile MIXER_DST_STRUCT_Type * | base | ) |
Deactivate the mixer destination.
base | pointer to the Mixer DST Struct instance |
__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.
base | pointer to the Mixer DST Struct instance |
__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).
base | pointer to the Mixer DST Struct instance |
__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).
base | pointer to the Mixer DST Struct instance |
__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).
base | pointer to the Mixer DST Struct instance |
__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)
base | pointer to the Mixer DST Struct instance |
intSrc | cy_en_mixer_dst_interrupt_t |
__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)
base | pointer to the Mixer DST Struct instance |
intSrc | cy_en_mixer_dst_interrupt_t |
__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.
base | pointer to the Mixer DST Struct instance |
intSrc | cy_en_mixer_dst_interrupt_t |
__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.
base | pointer to the Mixer DST Struct instance |
intSrc | cy_en_mixer_dst_interrupt_t |
__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.
base | pointer to the Mixer DST Struct instance |
intSrc | cy_en_mixer_dst_interrupt_t |