PSOC E8XXGP Device Support Library

General Description

API Reference

 Initialization Functions
 This set of functions is used to configure the DAC.
 
 LUT Functions
 This set of functions is used for data handling in the DAC look-up table.
 

Functions

__STATIC_INLINE uint16_t Cy_AutAnalog_DAC_GetLimitStatus (uint8_t dacIdx)
 Provides the range detection status for the DAC channels, except FW channel #15. More...
 
__STATIC_INLINE void Cy_AutAnalog_DAC_ClearLimitStatus (uint8_t dacIdx, uint16_t chMask)
 Clears the range detection status for the DAC channels. More...
 
__STATIC_INLINE void Cy_AutAnalog_DAC_WriteNextSample (uint8_t dacIdx, int32_t sample)
 Loads a value that will update the DAC output on the next refresh cycle, applicable to FW channel #15 only. More...
 
__STATIC_INLINE int32_t Cy_AutAnalog_DAC_ReadNextSample (uint8_t dacIdx)
 Reads the DAC output register. More...
 

Function Documentation

◆ Cy_AutAnalog_DAC_GetLimitStatus()

__STATIC_INLINE uint16_t Cy_AutAnalog_DAC_GetLimitStatus ( uint8_t  dacIdx)

Provides the range detection status for the DAC channels, except FW channel #15.

The DAC sets this bit for each channel when the condition specified by the cy_stc_autanalog_dac_sta_t::chLimitCfg is met.

Parameters
dacIdxThe index of the DAC subsystem within the Autonomous Analog, see cy_stc_autanalog_cfg_t::dac
Returns
Range detection status. Compare this value with one of the masks for the DAC channels.
Note
Under invalid DAC index, "zero" returns in the result.

◆ Cy_AutAnalog_DAC_ClearLimitStatus()

__STATIC_INLINE void Cy_AutAnalog_DAC_ClearLimitStatus ( uint8_t  dacIdx,
uint16_t  chMask 
)

Clears the range detection status for the DAC channels.

See Cy_AutAnalog_DAC_GetLimitStatus

Parameters
dacIdxThe index of the DAC subsystem within the Autonomous Analog, see cy_stc_autanalog_cfg_t::dac
Note
Under invalid DAC index, the function has no effect.
Parameters
chMaskThe combined mask for DAC channels that require a reset of their range detection status.

◆ Cy_AutAnalog_DAC_WriteNextSample()

__STATIC_INLINE void Cy_AutAnalog_DAC_WriteNextSample ( uint8_t  dacIdx,
int32_t  sample 
)

Loads a value that will update the DAC output on the next refresh cycle, applicable to FW channel #15 only.

Parameters
dacIdxThe index of the DAC subsystem within the Autonomous Analog, see cy_stc_autanalog_cfg_t::dac
Note
Under invalid DAC index, the function has no effect.
Parameters
sampleThe sample value to update of the DAC output for the next refresh cycle.

◆ Cy_AutAnalog_DAC_ReadNextSample()

__STATIC_INLINE int32_t Cy_AutAnalog_DAC_ReadNextSample ( uint8_t  dacIdx)

Reads the DAC output register.

Applicable to FW channel #15 only.

Parameters
dacIdxThe index of the DAC subsystem within the Autonomous Analog, see cy_stc_autanalog_cfg_t::dac
Returns
The sample value from the DAC output.
Note
If the DAC index is not valid, zero is returned in the result.
The DAC HW does not preserve the sign of the output value.