forked from M-Labs/artiq
firmware/hmc830_7043: improve messaging
This commit is contained in:
parent
4d06c1d84b
commit
0aadd3a361
|
@ -107,10 +107,11 @@ mod hmc830 {
|
||||||
|
|
||||||
pub fn init() -> Result<(), &'static str> {
|
pub fn init() -> Result<(), &'static str> {
|
||||||
spi_setup();
|
spi_setup();
|
||||||
info!("HMC830 configuration...");
|
info!("loading configuration...");
|
||||||
for &(addr, data) in HMC830_WRITES.iter() {
|
for &(addr, data) in HMC830_WRITES.iter() {
|
||||||
write(addr, data);
|
write(addr, data);
|
||||||
}
|
}
|
||||||
|
info("...done");
|
||||||
|
|
||||||
let t = clock::get_ms();
|
let t = clock::get_ms();
|
||||||
info!("waiting for lock...");
|
info!("waiting for lock...");
|
||||||
|
@ -125,6 +126,7 @@ mod hmc830 {
|
||||||
return Err("HMC830 lock timeout");
|
return Err("HMC830 lock timeout");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
info!("...locked");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -217,7 +219,7 @@ pub mod hmc7043 {
|
||||||
|
|
||||||
pub fn shutdown() -> Result<(), &'static str> {
|
pub fn shutdown() -> Result<(), &'static str> {
|
||||||
spi_setup();
|
spi_setup();
|
||||||
info!("HMC7043 shutdown...");
|
info!("shutting down");
|
||||||
write(0x1, 0x1); // Sleep mode
|
write(0x1, 0x1); // Sleep mode
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -225,7 +227,7 @@ pub mod hmc7043 {
|
||||||
|
|
||||||
pub fn init() -> Result<(), &'static str> {
|
pub fn init() -> Result<(), &'static str> {
|
||||||
spi_setup();
|
spi_setup();
|
||||||
info!("HMC7043 configuration...");
|
info!("loading configuration...");
|
||||||
|
|
||||||
write(0x0, 0x1); // Software reset
|
write(0x0, 0x1); // Software reset
|
||||||
write(0x0, 0x0);
|
write(0x0, 0x0);
|
||||||
|
@ -267,6 +269,8 @@ pub mod hmc7043 {
|
||||||
write(channel_base + 0x8, 0x08)
|
write(channel_base + 0x8, 0x08)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info!("...done");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue