forked from M-Labs/artiq-zynq
si5324: crystal_{ref -> as_ckin2} [nfc]
This makes it clear that by itself, the flag does not cause the input mux to be changed.
This commit is contained in:
parent
2ddb4d259f
commit
8e0229d265
|
@ -29,7 +29,7 @@ pub struct FrequencySettings {
|
|||
pub n31: u32,
|
||||
pub n32: u32,
|
||||
pub bwsel: u8,
|
||||
pub crystal_ref: bool
|
||||
pub crystal_as_ckin2: bool
|
||||
}
|
||||
|
||||
pub enum Input {
|
||||
|
@ -84,7 +84,7 @@ fn map_frequency_settings(settings: &FrequencySettings) -> Result<FrequencySetti
|
|||
n31: settings.n31 - 1,
|
||||
n32: settings.n32 - 1,
|
||||
bwsel: settings.bwsel,
|
||||
crystal_ref: settings.crystal_ref
|
||||
crystal_as_ckin2: settings.crystal_as_ckin2
|
||||
};
|
||||
Ok(r)
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ pub fn setup(i2c: &mut I2c, settings: &FrequencySettings, input: Input, timer: &
|
|||
};
|
||||
|
||||
init(i2c, timer)?;
|
||||
if settings.crystal_ref {
|
||||
if settings.crystal_as_ckin2 {
|
||||
rmw(i2c, 0, |v| v | 0x40)?; // FREE_RUN=1
|
||||
}
|
||||
rmw(i2c, 2, |v| (v & 0x0f) | (s.bwsel << 4))?;
|
||||
|
|
|
@ -133,7 +133,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 6,
|
||||
n32 : 6,
|
||||
bwsel : 4,
|
||||
crystal_ref: false
|
||||
crystal_as_ckin2: false
|
||||
},
|
||||
SI5324_EXT_INPUT
|
||||
)
|
||||
|
@ -149,7 +149,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 52,
|
||||
n32 : 52,
|
||||
bwsel : 4,
|
||||
crystal_ref: false
|
||||
crystal_as_ckin2: false
|
||||
},
|
||||
SI5324_EXT_INPUT
|
||||
)
|
||||
|
@ -165,7 +165,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 63,
|
||||
n32 : 63,
|
||||
bwsel : 4,
|
||||
crystal_ref: false
|
||||
crystal_as_ckin2: false
|
||||
},
|
||||
SI5324_EXT_INPUT
|
||||
)
|
||||
|
@ -181,7 +181,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 7139,
|
||||
n32 : 7139,
|
||||
bwsel : 3,
|
||||
crystal_ref: true
|
||||
crystal_as_ckin2: true
|
||||
},
|
||||
si5324::Input::Ckin2
|
||||
)
|
||||
|
@ -197,7 +197,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 7139,
|
||||
n32 : 7139,
|
||||
bwsel : 3,
|
||||
crystal_ref: true
|
||||
crystal_as_ckin2: true
|
||||
},
|
||||
si5324::Input::Ckin2
|
||||
)
|
||||
|
@ -213,7 +213,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 4565,
|
||||
n32 : 4565,
|
||||
bwsel : 4,
|
||||
crystal_ref: true
|
||||
crystal_as_ckin2: true
|
||||
},
|
||||
si5324::Input::Ckin2
|
||||
)
|
||||
|
@ -229,7 +229,7 @@ fn setup_si5324(i2c: &mut I2c, timer: &mut GlobalTimer, clk: RtioClock) {
|
|||
n31 : 4565,
|
||||
n32 : 4565,
|
||||
bwsel : 4,
|
||||
crystal_ref: true
|
||||
crystal_as_ckin2: true
|
||||
},
|
||||
si5324::Input::Ckin2
|
||||
)
|
||||
|
|
|
@ -428,7 +428,7 @@ const SI5324_SETTINGS: si5324::FrequencySettings
|
|||
n31 : 63,
|
||||
n32 : 63,
|
||||
bwsel : 4,
|
||||
crystal_ref: true
|
||||
crystal_as_ckin2: true
|
||||
};
|
||||
|
||||
#[cfg(all(has_si5324, rtio_frequency = "100.0"))]
|
||||
|
@ -441,7 +441,7 @@ const SI5324_SETTINGS: si5324::FrequencySettings
|
|||
n31 : 50,
|
||||
n32 : 50,
|
||||
bwsel : 4,
|
||||
crystal_ref: true
|
||||
crystal_as_ckin2: true
|
||||
};
|
||||
|
||||
static mut LOG_BUFFER: [u8; 1<<17] = [0; 1<<17];
|
||||
|
|
Loading…
Reference in New Issue