forked from M-Labs/artiq
1
0
Fork 0

firmware: add placeholder code for HMC830/7043 initialization

This commit is contained in:
Sebastien Bourdeauducq 2017-08-31 13:35:47 +08:00
parent 9edff2c520
commit 44edba0c65
4 changed files with 14 additions and 4 deletions

View File

@ -0,0 +1,4 @@
pub fn init() -> Result<(), &'static str> {
error!("HMC830/7043 support is not implemented");
Ok(())
}

View File

@ -30,6 +30,8 @@ pub mod si5324;
mod ad9516_reg; mod ad9516_reg;
#[cfg(has_ad9516)] #[cfg(has_ad9516)]
pub mod ad9516; pub mod ad9516;
#[cfg(has_hmc830_7043)]
pub mod hmc830_7043;
#[cfg(has_ad9154)] #[cfg(has_ad9154)]
#[allow(dead_code)] #[allow(dead_code)]
mod ad9154_reg; mod ad9154_reg;

View File

@ -78,9 +78,11 @@ fn startup() {
#[cfg(has_i2c)] #[cfg(has_i2c)]
board::i2c::init(); board::i2c::init();
#[cfg(has_ad9516)] #[cfg(has_ad9516)]
board::ad9516::init().expect("cannot initialize ad9516"); board::ad9516::init().expect("cannot initialize AD9516");
#[cfg(has_hmc830_7043)]
board::hmc830_7043::init().expect("cannot initialize HMC830/7043");
#[cfg(has_ad9154)] #[cfg(has_ad9154)]
board::ad9154::init().expect("cannot initialize ad9154"); board::ad9154::init().expect("cannot initialize AD9154");
let hardware_addr; let hardware_addr;
match config::read_str("mac", |r| r?.parse()) { match config::read_str("mac", |r| r?.parse()) {

View File

@ -196,9 +196,11 @@ fn startup() {
info!("gateware version {}", board::ident(&mut [0; 64])); info!("gateware version {}", board::ident(&mut [0; 64]));
#[cfg(has_ad9516)] #[cfg(has_ad9516)]
board::ad9516::init().expect("cannot initialize ad9516"); board::ad9516::init().expect("cannot initialize AD9516");
#[cfg(has_hmc830_7043)]
board::hmc830_7043::init().expect("cannot initialize HMC830/7043");
board::i2c::init(); board::i2c::init();
board::si5324::setup(&SI5324_SETTINGS).expect("cannot initialize si5324"); board::si5324::setup(&SI5324_SETTINGS).expect("cannot initialize Si5324");
loop { loop {
while !drtio_link_is_up() { while !drtio_link_is_up() {