2.6.2.2 Struct adc_correction_config
Gain and offset correction configuration structure. Part of the adc_config struct and will be initialized by adc_get_config_defaults.
Type | Name | Description |
---|---|---|
bool | correction_enable |
Enables correction for gain and offset based on values of gain_correction and offset_correction if set to true |
uint16_t | gain_correction |
This value defines how the ADC conversion result is compensated for gain error before written to the result register. This is a fractional value, 1-bit integer plus an 11-bit fraction, therefore 1/2 <= gain_correction < 2. Valid gain_correction values ranges from 0b010000000000 to 0b111111111111. |
int16_t | offset_correction |
This value defines how the ADC conversion result is compensated for offset error before written to the result register. This is a 12-bit value in two's complement format. |