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/esp32c2/esp_efuse_table.csv#L96>
        let diff_code0: u16 = Self::read_field_le(ADC1_CAL_VOL_ATTEN0);
        let code0 = if diff_code0 & (1 << 7) != 0 {
            1540 - (diff_code0 & 0x7f)
        } else {
            1540 + diff_code0
        };

        if matches!(atten, Attenuation::_0dB) {
            return Some(code0);
        }

        // see <https://github.com/espressif/esp-idf/blob/903af13e8/components/efuse/esp32c2/esp_efuse_table.csv#L97>
        let diff_code11: u16 = Self::read_field_le(ADC1_CAL_VOL_ATTEN3);
        let code11 = if diff_code0 & (1 << 5) != 0 {
            code0 - (diff_code11 & 0x1f)
        } else {
            code0 + diff_code11
        } - 123;

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

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