Describes the enumeration types defined by the CSDADC.
These enumerations can be used for checking the CSDADC functions return statuses for defining a CSDADC resolution and an input voltage range and for defining Start and Stop conversion modes. Detailed information about the enumerations is available in each enumeration description.
Enumerations | |
enum | cy_en_csdadc_status_t { CY_CSDADC_SUCCESS = (0u), CY_CSDADC_BAD_PARAM = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 1u), CY_CSDADC_HW_LOCKED = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 2u), CY_CSDADC_HW_BUSY = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 3u), CY_CSDADC_OVERFLOW = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 4u), CY_CSDADC_CALIBRATION_FAIL = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 5u), CY_CSDADC_WRITE_CONFIG_FAIL = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 6u), CY_CSDADC_NOT_INITIALIZED = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 7u), CY_CSDADC_TIMEOUT = (CY_CSDADC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 8u) } |
CSDADC return enumeration type. More... | |
enum | cy_en_csdadc_range_t { CY_CSDADC_RANGE_VREF = 0u, CY_CSDADC_RANGE_VDDA = 1u } |
CSDADC input voltage ranges enumeration type. More... | |
enum | cy_en_csdadc_resolution_t { CY_CSDADC_RESOLUTION_8BIT = 0u, CY_CSDADC_RESOLUTION_10BIT = 1u } |
CSDADC resolution enumeration type. More... | |
enum | cy_en_csdadc_conversion_mode_t { CY_CSDADC_SINGLE_SHOT = 0u, CY_CSDADC_CONTINUOUS = 1u } |
The CSDADC conversion mode enumeration type. More... | |
enum | cy_en_csdadc_stop_mode_t { CY_CSDADC_IMMED_STOP = 0u, CY_CSDADC_CURRENT_CHAN_STOP = 1u, CY_CSDADC_ENABLED_CHAN_STOP = 2u } |
The CSDADC stop mode enumeration type. More... | |
CSDADC return enumeration type.
CY_CSDADC_ID is a unique FW registration number. CY_PDL_STATUS_ERROR see SysLib Status Codes Macros.
Enumerator | |
---|---|
CY_CSDADC_SUCCESS | The function executed successfully. |
CY_CSDADC_BAD_PARAM | Any of the input parameter is invalid. The user should check if all the input parameters are valid. |
CY_CSDADC_HW_LOCKED | The CSD HW block is acquired and locked by the other middleware or an application. CSDADC must wait for the CSD HW block to be released to acquire the CSD HW block for use. |
CY_CSDADC_HW_BUSY | The previous CSDADC operation not completed. The user should call Cy_CSDADC_IsEndConversion() function and wait until current operation complete. |
CY_CSDADC_OVERFLOW | A CSDADC counter overflow. This error may occur if the CSDADC is not calibrated. Check VREF, PERI_CLK, interrupts and perform a new CSDADC calibration. |
CY_CSDADC_CALIBRATION_FAIL | CSDADC calibration failed. CSDADC can't be calibrated well. The user should check VREF, PERI_CLK, interrupts. |
CY_CSDADC_WRITE_CONFIG_FAIL | CSDADC configuration writing failed. |
CY_CSDADC_NOT_INITIALIZED | CSDADC middleware is not initialized. This error could occur if the user tries to start conversion without a proper CSDADC initialization. |
CY_CSDADC_TIMEOUT | CSDADC operation timeout. This error could occur if a CSDADC conversion can not be stopped by Cy_CSDADC_StopConvert() function in the immediate mode. The user should check interrupts. |
enum cy_en_csdadc_range_t |
CSDADC input voltage ranges enumeration type.
CSDADC resolution enumeration type.
The CSDADC conversion mode enumeration type.
Use it to specify Conversion mode of the CSDADC when initiating a new conversion using the Cy_CSDADC_StartConvert() function. In Single-shot mode, the CSDADC will convert every input channel voltages that are specified by the channel mask parameter of this function. In Continuous mode, a conversion will be repeated for all specified channels until the user stops them by using the Cy_CSDADC_StopConvert() function. To read conversion data in Continuous mode without getting over-written, the user should call the Cy_CSDADC_GetConversionStatus() function.
Enumerator | |
---|---|
CY_CSDADC_SINGLE_SHOT | The single shot mode. |
CY_CSDADC_CONTINUOUS | The continuous mode. |
The CSDADC stop mode enumeration type.
This enum type should be used to specify Stop conversion mode of the CSDADC when breaking conversions using the Cy_CSDADC_StopConvert() function. It can be used only in Continuous conversion mode.
Enumerator | |
---|---|
CY_CSDADC_IMMED_STOP | The immediate stop mode. In this mode CSDADC conversion is disrupted immediately and an interrupt will be cleared. To prevent a possible CSD HW block hanging, a program watchdog starts. If this watchdog will be triggered, the Cy_CSDADC_StopConvert() function returns CY_CSDADC_TIMEOUT. |
CY_CSDADC_CURRENT_CHAN_STOP | After the current channel conversion ending stop mode. In this mode CSDADC conversion will be stopped after a current channel conversion. The user should check the status by using the Cy_CSDADC_IsEndConversion()function. |
CY_CSDADC_ENABLED_CHAN_STOP | After the enabled channels conversion cycle ending stop mode. In this mode CSDADC conversion will be stopped after all enabled channel conversion completes. Check the status by using the Cy_CSDADC_IsEndConversion() function. |