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

        if version != 1 {
            return None;
        }

        // See <https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32c6/esp_efuse_table.csv#L153-L156>
        let cal_code: u16 = Self::read_field_le(match atten {
            Attenuation::_0dB => ADC1_CAL_VOL_ATTEN0,
            Attenuation::_2p5dB => ADC1_CAL_VOL_ATTEN1,
            Attenuation::_6dB => ADC1_CAL_VOL_ATTEN2,
            Attenuation::_11dB => ADC1_CAL_VOL_ATTEN3,
        });

        let cal_code = if cal_code & (1 << 9) != 0 {
            1500 - (cal_code & !(1 << 9))
        } else {
            1500 + cal_code
        };

        Some(cal_code)
    }
Get ADC reference point digital code for specified attenuation

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