CAT2 Peripheral Driver Library

Functions

void Cy_DSADC_InitDchan (PACSS_DCHAN_Type *base, const cy_stc_dsadc_dchan_config_t *config)
 Configure the Digital Channel. More...
 
void Cy_DSADC_EnableDchan (PACSS_DCHAN_Type *base)
 Enable the Digital Channel. More...
 
void Cy_DSADC_DisableDchan (PACSS_DCHAN_Type *base)
 Disable the Digital Channel. More...
 
void Cy_DSADC_ConfigureGainLevel (PACSS_DCHAN_Type *base, const cy_stc_dsadc_gain_level_config_t *gain)
 Configure gain level of the digital channel. More...
 
void Cy_DSADC_SetSampleMode (PACSS_DCHAN_Type *base, cy_en_dsadc_dchan_sample_mode_t mode)
 Set the digital channel's sample mode. More...
 
void Cy_DSADC_SetVref (PACSS_DCHAN_Type *base, cy_en_dsadc_dchan_reference_vrefh_t vrefh, cy_en_dsadc_dchan_reference_vrefl_t vrefl)
 Set the voltage reference of the DCHAN. More...
 
void Cy_DSADC_EnablePullup (PACSS_DCHAN_Type *base)
 Enable the pull-up resistor connection. More...
 
void Cy_DSADC_DisablePullup (PACSS_DCHAN_Type *base)
 Disable the pull-up resistor connection. More...
 
void Cy_DSADC_SetPullupSelect (PACSS_DCHAN_Type *base, cy_en_dsadc_dchan_reference_pullup_t select)
 Set the pull-up resistor for open wire detection based on the selection, the pin is pulled-up to VDDA via 4k-ohm resistor for open wire detection. More...
 
void Cy_DSADC_EnableGainCorrection (PACSS_DCHAN_Type *base)
 Enable the gain correction. More...
 
void Cy_DSADC_DisableGainCorrection (PACSS_DCHAN_Type *base)
 Disable the gain correction. More...
 
void Cy_DSADC_SetGainCorrection (PACSS_DCHAN_Type *base, uint16_t gain)
 Set the gain correction factor for the specified DCHAN. More...
 
void Cy_DSADC_EnableOffsetCorrection (PACSS_DCHAN_Type *base)
 Enable the offset correction. More...
 
void Cy_DSADC_DisableOffsetCorrection (PACSS_DCHAN_Type *base)
 Disable the offset correction. More...
 
void Cy_DSADC_SetOffsetCorrection (PACSS_DCHAN_Type *base, int16_t offset)
 Set the offset correction factor for the specified DCHAN. More...
 
void Cy_DSADC_SetInputPin (PACSS_DCHAN_Type *base, cy_en_dsadc_dchan_positive_pin_t pinPositive, cy_en_dsadc_dchan_negative_pin_t pinNegative)
 Set the input pin combination of the DCHAN. More...
 

Detailed Description

Function Documentation

◆ Cy_DSADC_InitDchan()

void Cy_DSADC_InitDchan ( PACSS_DCHAN_Type *  base,
const cy_stc_dsadc_dchan_config_t config 
)

Configure the Digital Channel.

Parameters
baseThe base address for the Digital Channel.
configConfiguration options for the Digital Channel.

◆ Cy_DSADC_EnableDchan()

void Cy_DSADC_EnableDchan ( PACSS_DCHAN_Type *  base)

Enable the Digital Channel.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_DisableDchan()

void Cy_DSADC_DisableDchan ( PACSS_DCHAN_Type *  base)

Disable the Digital Channel.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_ConfigureGainLevel()

void Cy_DSADC_ConfigureGainLevel ( PACSS_DCHAN_Type *  base,
const cy_stc_dsadc_gain_level_config_t gain 
)

Configure gain level of the digital channel.

Parameters
baseThe base address for the Digital Channel.
gainConfiguration options for the cy_stc_dsadc_gain_level_config_t of the digital channel

◆ Cy_DSADC_SetSampleMode()

void Cy_DSADC_SetSampleMode ( PACSS_DCHAN_Type *  base,
cy_en_dsadc_dchan_sample_mode_t  mode 
)

Set the digital channel's sample mode.

Parameters
baseThe base address for the Digital Channel.
modeThe sample mode to be used are cy_en_dsadc_dchan_sample_mode_t

◆ Cy_DSADC_SetVref()

void Cy_DSADC_SetVref ( PACSS_DCHAN_Type *  base,
cy_en_dsadc_dchan_reference_vrefh_t  vrefh,
cy_en_dsadc_dchan_reference_vrefl_t  vrefl 
)

Set the voltage reference of the DCHAN.

Parameters
baseThe base address for the Digital Channel.
vrefhHigh reference selection are cy_en_dsadc_dchan_reference_vrefh_t
vreflLow reference selection are cy_en_dsadc_dchan_reference_vrefl_t

◆ Cy_DSADC_EnablePullup()

void Cy_DSADC_EnablePullup ( PACSS_DCHAN_Type *  base)

Enable the pull-up resistor connection.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_DisablePullup()

void Cy_DSADC_DisablePullup ( PACSS_DCHAN_Type *  base)

Disable the pull-up resistor connection.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_SetPullupSelect()

void Cy_DSADC_SetPullupSelect ( PACSS_DCHAN_Type *  base,
cy_en_dsadc_dchan_reference_pullup_t  select 
)

Set the pull-up resistor for open wire detection based on the selection, the pin is pulled-up to VDDA via 4k-ohm resistor for open wire detection.

Parameters
baseThe base address for the Digital Channel.
selectPull-up input selection see cy_en_dsadc_dchan_reference_pullup_t

◆ Cy_DSADC_EnableGainCorrection()

void Cy_DSADC_EnableGainCorrection ( PACSS_DCHAN_Type *  base)

Enable the gain correction.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_DisableGainCorrection()

void Cy_DSADC_DisableGainCorrection ( PACSS_DCHAN_Type *  base)

Disable the gain correction.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_SetGainCorrection()

void Cy_DSADC_SetGainCorrection ( PACSS_DCHAN_Type *  base,
uint16_t  gain 
)

Set the gain correction factor for the specified DCHAN.

Parameters
baseThe base address for the Digital Channel.
gainGain correction factor. Valid inputs are between 0 and 65535.

◆ Cy_DSADC_EnableOffsetCorrection()

void Cy_DSADC_EnableOffsetCorrection ( PACSS_DCHAN_Type *  base)

Enable the offset correction.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_DisableOffsetCorrection()

void Cy_DSADC_DisableOffsetCorrection ( PACSS_DCHAN_Type *  base)

Disable the offset correction.

Parameters
baseThe base address for the Digital Channel.

◆ Cy_DSADC_SetOffsetCorrection()

void Cy_DSADC_SetOffsetCorrection ( PACSS_DCHAN_Type *  base,
int16_t  offset 
)

Set the offset correction factor for the specified DCHAN.

Parameters
baseThe base address for the Digital Channel.
offsetOffset correction factor. Valid inputs are between -32768 and 32767.

◆ Cy_DSADC_SetInputPin()

void Cy_DSADC_SetInputPin ( PACSS_DCHAN_Type *  base,
cy_en_dsadc_dchan_positive_pin_t  pinPositive,
cy_en_dsadc_dchan_negative_pin_t  pinNegative 
)

Set the input pin combination of the DCHAN.

Parameters
baseThe base address for the Digital Channel.
pinPositivePositive input pin see cy_en_dsadc_dchan_positive_pin_t
pinNegativeNegative input pin see cy_en_dsadc_dchan_negative_pin_t