MTB CAT1 Peripheral driver library

General Description

To be used for DC measurement voltage calculation/calibration.

Macros

#define CY_ADCMIC_DC_FS   (0xFFFFUL)
 The Full Scale counts.
 
#define CY_ADCMIC_DC_LO   (3U)
 The coefficient to calculate lower range limit count.
 
#define CY_ADCMIC_DC_HI   (3725U)
 The coefficient to calculate upper range limit count, scaled by 10000 to avoid fractional math.
 
#define CY_ADCMIC_DC_OFFSET   (-((int16_t)CY_SYSLIB_DIV_ROUND(CY_ADCMIC_DC_FS, CY_ADCMIC_DC_LO)))
 The default raw count offset for DC measurement.
 
#define CY_ADCMIC_DC_HI_CNT   ((int16_t)CY_SYSLIB_DIV_ROUND(CY_ADCMIC_DC_FS * CY_ADCMIC_DC_HI, 10000U))
 The upper range limit count.
 
#define CY_ADCMIC_DC_FS_CNT   ((uint32_t)(CY_ADCMIC_DC_HI_CNT - CY_ADCMIC_DC_OFFSET) * 10U)
 The full range counts, scaled by 10 to avoid fractional math.
 
#define CY_ADCMIC_DC_3_6_GAIN   ((int16_t)CY_SYSLIB_DIV_ROUND(CY_ADCMIC_DC_FS_CNT, 36U))
 The default amount of raw counts per 1 volt for 3.6V range.
 
#define CY_ADCMIC_DC_1_8_GAIN   ((int16_t)CY_SYSLIB_DIV_ROUND(CY_ADCMIC_DC_FS_CNT, 18U))
 The default amount of raw counts per 1 volt for 1.8V range.
 
#define CY_ADCMIC_DC_VBG   (850L)
 The BandGap reference nominal voltage in millivolts.