Data Structures

group group_csdadc_data_structures

Describes the data structures defined by the CSDADC.

The CSDADC MW use structures for the input channel pins, conversion results, MW configuration and context. The pin structure is included into the configuration structure and both can be defined by the user with the CSD personality in Device Configurator or manually if the user does not use ModusToolbox. The result structure is included into the context structure and contains voltages and ADC codes for all 32 input channels of more recent conversions. Besides the result structure, the context structure contains a copy of the configuration structure, the current CSDADC MW state data and calibration data. The context structure is allocated by the user and passed to all CSDADC MW functions. The CSDADC MW structure sizes are shown in the table below:


Size in bytes (w/o padding)










typedef void (*cy_csdadc_callback_t)(void *ptrCxt)

Provides the typedef for the callback function that is intended to be called when the “End Of Conversion” cycle callback event occurs.

struct cy_stc_csdadc_ch_pin_t
#include <>

CSDADC pin structure.

This structure contains information about Port/Pin assignment of a particular CSDADC channel. The CSDADC channel can be assigned to any GPIO that supports the static connection to the AMUX-B (refer to the particular device datasheet for information).

struct cy_stc_csdadc_config_t
#include <>

CSDADC configuration structure.

struct cy_stc_csdadc_result_t
#include <>

CSDADC result structure.

struct cy_stc_csdadc_context_t
#include <>

CSDADC context structure that contains the internal driver data for the CSDADC MW.

The context structure should be allocated by the user and passed to all CSDADC MW functions.