forked from M-Labs/artiq
1
0
Fork 0

libboard/hmc830_7043: enable HMC830

This commit is contained in:
Sebastien Bourdeauducq 2017-11-30 12:06:54 +08:00
parent ad2a32d381
commit 2e5b20d53d
1 changed files with 4 additions and 4 deletions

View File

@ -21,8 +21,8 @@ mod clock_mux {
unsafe { unsafe {
csr::clock_mux::out_write( csr::clock_mux::out_write(
1*CLK_SRC_EXT_SEL | // use ext clk from sma 1*CLK_SRC_EXT_SEL | // use ext clk from sma
1*REF_CLK_SRC_SEL | // 1*REF_CLK_SRC_SEL |
0*DAC_CLK_SRC_SEL); // use clk from dac_clk // FIXME (should use hmc830 output) 1*DAC_CLK_SRC_SEL);
} }
} }
} }
@ -105,7 +105,7 @@ mod hmc830 {
} }
let t = clock::get_ms(); let t = clock::get_ms();
info!("HMC830 waiting for lock..."); info!("waiting for lock...");
while read(0x12) & 0x02 == 0 { while read(0x12) & 0x02 == 0 {
if clock::get_ms() > t + 2000 { if clock::get_ms() > t + 2000 {
return Err("HMC830 lock timeout"); return Err("HMC830 lock timeout");
@ -180,6 +180,6 @@ mod hmc7043 {
pub fn init() -> Result<(), &'static str> { pub fn init() -> Result<(), &'static str> {
clock_mux::init(); clock_mux::init();
//hmc830::init()?; // FIXME hmc830::init()?;
hmc7043::init() hmc7043::init()
} }