pub fn rtc_calib_init_code(unit: u8, atten: Attenuation) -> Option<u16> {
        let version = Self::rtc_calib_version();

        if version != 1 {
            return None;
        }

        let adc_icode_diff: [u16; 4] = if unit == 0 {
            [
                Self::read_field_le(ADC1_INIT_CODE_ATTEN0),
                Self::read_field_le(ADC1_INIT_CODE_ATTEN1),
                Self::read_field_le(ADC1_INIT_CODE_ATTEN2),
                Self::read_field_le(ADC1_INIT_CODE_ATTEN3),
            ]
        } else {
            [
                Self::read_field_le(ADC2_INIT_CODE_ATTEN0),
                Self::read_field_le(ADC2_INIT_CODE_ATTEN1),
                Self::read_field_le(ADC2_INIT_CODE_ATTEN2),
                Self::read_field_le(ADC2_INIT_CODE_ATTEN3),
            ]
        };

        // Version 1 logic for calculating ADC ICode based on EFUSE burnt value

        let mut adc_icode = [0; 4];
        if unit == 0 {
            adc_icode[0] = adc_icode_diff[0] + 1850;
            adc_icode[1] = adc_icode_diff[1] + adc_icode[0] + 90;
            adc_icode[2] = adc_icode_diff[2] + adc_icode[1];
            adc_icode[3] = adc_icode_diff[3] + adc_icode[2] + 70;
        } else {
            adc_icode[0] = adc_icode_diff[0] + 2020;
            adc_icode[1] = adc_icode_diff[1] + adc_icode[0];
            adc_icode[2] = adc_icode_diff[2] + adc_icode[1];
            adc_icode[3] = adc_icode_diff[3] + adc_icode[2];
        }

        Some(
            adc_icode[match atten {
                Attenuation::_0dB => 0,
                Attenuation::_2p5dB => 1,
                Attenuation::_6dB => 2,
                Attenuation::_11dB => 3,
            }],
        )
    }
Get ADC initial code for specified attenuation from efuse

see <https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32s3/esp_efuse_rtc_calib.c#L28>
esp-hal/src/soc/esp32s3/efuse/mod.rs