From 44edba0c654b48e328cf75751c40eb7860903eb5 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 31 Aug 2017 13:35:47 +0800 Subject: [PATCH] firmware: add placeholder code for HMC830/7043 initialization --- artiq/firmware/libboard/hmc830_7043.rs | 4 ++++ artiq/firmware/libboard/lib.rs | 2 ++ artiq/firmware/runtime/lib.rs | 6 ++++-- artiq/firmware/satman/lib.rs | 6 ++++-- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 artiq/firmware/libboard/hmc830_7043.rs diff --git a/artiq/firmware/libboard/hmc830_7043.rs b/artiq/firmware/libboard/hmc830_7043.rs new file mode 100644 index 000000000..9d2c20b4a --- /dev/null +++ b/artiq/firmware/libboard/hmc830_7043.rs @@ -0,0 +1,4 @@ +pub fn init() -> Result<(), &'static str> { + error!("HMC830/7043 support is not implemented"); + Ok(()) +} diff --git a/artiq/firmware/libboard/lib.rs b/artiq/firmware/libboard/lib.rs index d0c6ecc77..edeef1e69 100644 --- a/artiq/firmware/libboard/lib.rs +++ b/artiq/firmware/libboard/lib.rs @@ -30,6 +30,8 @@ pub mod si5324; mod ad9516_reg; #[cfg(has_ad9516)] pub mod ad9516; +#[cfg(has_hmc830_7043)] +pub mod hmc830_7043; #[cfg(has_ad9154)] #[allow(dead_code)] mod ad9154_reg; diff --git a/artiq/firmware/runtime/lib.rs b/artiq/firmware/runtime/lib.rs index f679eba28..80b780497 100644 --- a/artiq/firmware/runtime/lib.rs +++ b/artiq/firmware/runtime/lib.rs @@ -78,9 +78,11 @@ fn startup() { #[cfg(has_i2c)] board::i2c::init(); #[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)] - board::ad9154::init().expect("cannot initialize ad9154"); + board::ad9154::init().expect("cannot initialize AD9154"); let hardware_addr; match config::read_str("mac", |r| r?.parse()) { diff --git a/artiq/firmware/satman/lib.rs b/artiq/firmware/satman/lib.rs index 5ffb0d6a2..3137e7e04 100644 --- a/artiq/firmware/satman/lib.rs +++ b/artiq/firmware/satman/lib.rs @@ -196,9 +196,11 @@ fn startup() { info!("gateware version {}", board::ident(&mut [0; 64])); #[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::si5324::setup(&SI5324_SETTINGS).expect("cannot initialize si5324"); + board::si5324::setup(&SI5324_SETTINGS).expect("cannot initialize Si5324"); loop { while !drtio_link_is_up() {