CSDIDAC Middleware Library 2.10
Enumerated types

General Description

Describes the enumeration types defined by the CSDIDAC.

These enumerations can be used for checking CSDIDAC functions' return status, for defining a CSDIDAC LSB and polarity, and for choosing IDAC for an operation and defining its states. For detailed information about enumerations, see each enumeration description.

Enumerations

enum  cy_en_csdidac_status_t {
  CY_CSDIDAC_SUCCESS = (0u),
  CY_CSDIDAC_BAD_PARAM = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 1u),
  CY_CSDIDAC_HW_BUSY = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 2u),
  CY_CSDIDAC_HW_LOCKED = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 3u),
  CY_CSDIDAC_HW_FAILURE = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 4u),
  CY_CSDIDAC_BAD_CONFIGURATION = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 5u)
}
 CSDIDAC return enumeration type. More...
 
enum  cy_en_csdidac_lsb_t {
  CY_CSDIDAC_LSB_37_IDX = 0u,
  CY_CSDIDAC_LSB_75_IDX = 1u,
  CY_CSDIDAC_LSB_300_IDX = 2u,
  CY_CSDIDAC_LSB_600_IDX = 3u,
  CY_CSDIDAC_LSB_2400_IDX = 4u,
  CY_CSDIDAC_LSB_4800_IDX = 5u
}
 The CSDIDAC output current LSB enumeration type. More...
 
enum  cy_en_csdidac_polarity_t {
  CY_CSDIDAC_SOURCE = 0u,
  CY_CSDIDAC_SINK = 1u
}
 The CSDIDAC polarity enumeration type. More...
 
enum  cy_en_csdidac_state_t {
  CY_CSDIDAC_DISABLE = 0u,
  CY_CSDIDAC_ENABLE = 1u
}
 The CSDIDAC channel enabling enumeration type. More...
 
enum  cy_en_csdidac_choice_t {
  CY_CSDIDAC_A = 0uL,
  CY_CSDIDAC_B = 1uL,
  CY_CSDIDAC_AB = 2uL
}
 The CSDIDAC choosing enumeration type. More...
 
enum  cy_en_csdidac_channel_config_t {
  CY_CSDIDAC_DISABLED = 0u,
  CY_CSDIDAC_GPIO = 1u,
  CY_CSDIDAC_AMUX = 2u,
  CY_CSDIDAC_JOIN = 3u
}
 The CSDIDAC channel configuration defines either disabled or enabled with specific routing. More...
 

Enumeration Type Documentation

◆ cy_en_csdidac_status_t

CSDIDAC return enumeration type.

Enumerator
CY_CSDIDAC_SUCCESS 

The operation executed successfully.

CY_CSDIDAC_BAD_PARAM 

An input parameter is invalid.

The user checks whether all the input parameters are valid.

CY_CSDIDAC_HW_BUSY 

The CSD HW block is busy, i.e.

any of current channel (A or B) is enabled.

CY_CSDIDAC_HW_LOCKED 

The CSD HW block is acquired and locked by other middleware or application.

The CSDIDAC middleware waits for the CSD HW block release to acquire it for use.

CY_CSDIDAC_HW_FAILURE 

A CSD HW block failure.

The possible reasons:

  • No peripheral clock assigned to the CSD HW block.
  • Peripheral clock assigned to the CSD HW block is disabled.
  • The CSD HW clock frequency is less than 100 kHz.
  • The configuration CSD HW block registers are corrupted.
  • The CSD HW block is damaged.
CY_CSDIDAC_BAD_CONFIGURATION 

The CSDIDAC configuration structure initialization issue.

The possible reasons:

  • The base pointer is initialized with NULL.
  • The csdCxtPtr pointer is initialized with NULL.
  • The configA or configB fields are not enumerators of the cy_en_csdidac_channel_config_t type.
  • The ptrPinA (ptrPinB) field is initialized with NULL when configA (configB) is initialized with CY_CSDIDAC_GPIO.
  • The configA and configB fields are initialized with CY_CSDIDAC_DISABLED simultaneously.
  • The configA and configB fields are initialized with CY_CSDIDAC_JOIN simultaneously.
  • The configA (configB) field is initialized with CY_CSDIDAC_JOIN when configB (configA) is initialized with CY_CSDIDAC_DISABLED.

◆ cy_en_csdidac_lsb_t

The CSDIDAC output current LSB enumeration type.

The user can choose LSB when the Cy_CSDIDAC_OutputEnableExt() function is called and can check which LSB was chosen by the Cy_CSDIDAC_OutputEnable() function in the cy_stc_csdidac_context_t structure.

Enumerator
CY_CSDIDAC_LSB_37_IDX 

Index for 37.5 nA LSB.

CY_CSDIDAC_LSB_75_IDX 

Index for 75.0 nA LSB.

CY_CSDIDAC_LSB_300_IDX 

Index for 0.3 uA LSB.

CY_CSDIDAC_LSB_600_IDX 

Index for 0.6 uA LSB.

CY_CSDIDAC_LSB_2400_IDX 

Index for 2.4 uA LSB.

CY_CSDIDAC_LSB_4800_IDX 

Index for 4.8 uA LSB.

◆ cy_en_csdidac_polarity_t

The CSDIDAC polarity enumeration type.

The user can choose the polarity when the Cy_CSDIDAC_OutputEnableExt() function is called and can check which polarity was chosen by the Cy_CSDIDAC_OutputEnable() function in the cy_stc_csdidac_context_t structure.

Enumerator
CY_CSDIDAC_SOURCE 

Source polarity.

CY_CSDIDAC_SINK 

Sink polarity.

◆ cy_en_csdidac_state_t

The CSDIDAC channel enabling enumeration type.

The user can check which channel (A or B or both) is currently enabled in the cy_stc_csdidac_context_t structure.

Enumerator
CY_CSDIDAC_DISABLE 

The channel is disabled.

CY_CSDIDAC_ENABLE 

The channel is enabled.

◆ cy_en_csdidac_choice_t

The CSDIDAC choosing enumeration type.

The user can choose channel A or B to operate with the Cy_CSDIDAC_OutputEnableExt(), Cy_CSDIDAC_OutputDisable(), or Cy_CSDIDAC_OutputEnable() functions.

Enumerator
CY_CSDIDAC_A 

The IDAC A is chosen for an operation.

CY_CSDIDAC_B 

The IDAC B is chosen for an operation.

CY_CSDIDAC_AB 

Both IDACs are chosen for an operation.

◆ cy_en_csdidac_channel_config_t

The CSDIDAC channel configuration defines either disabled or enabled with specific routing.

Enumerator
CY_CSDIDAC_DISABLED 

The IDAC channel is disabled.

CY_CSDIDAC_GPIO 

The IDAC channel is enabled and routed to a pin.

CY_CSDIDAC_AMUX 

The IDAC channel is enabled and routed to a corresponding analog bus.

CY_CSDIDAC_JOIN 

The IDAC channel is enabled and routed to the other IDAC channel.