forked from M-Labs/artiq
runtime: support for targets without I2C
This commit is contained in:
parent
fbd83cf9ee
commit
cd40d5b107
|
@ -105,9 +105,14 @@ static mut API: &'static [(&'static str, *const ())] = &[
|
||||||
api!(rtio_input_timestamp = ::rtio::input_timestamp),
|
api!(rtio_input_timestamp = ::rtio::input_timestamp),
|
||||||
api!(rtio_input_data = ::rtio::input_data),
|
api!(rtio_input_data = ::rtio::input_data),
|
||||||
|
|
||||||
|
#[cfg(has_i2c)]
|
||||||
api!(i2c_init = ::i2c::init),
|
api!(i2c_init = ::i2c::init),
|
||||||
|
#[cfg(has_i2c)]
|
||||||
api!(i2c_start = ::i2c::start),
|
api!(i2c_start = ::i2c::start),
|
||||||
|
#[cfg(has_i2c)]
|
||||||
api!(i2c_stop = ::i2c::stop),
|
api!(i2c_stop = ::i2c::stop),
|
||||||
|
#[cfg(has_i2c)]
|
||||||
api!(i2c_write = ::i2c::write),
|
api!(i2c_write = ::i2c::write),
|
||||||
|
#[cfg(has_i2c)]
|
||||||
api!(i2c_read = ::i2c::read),
|
api!(i2c_read = ::i2c::read),
|
||||||
];
|
];
|
||||||
|
|
|
@ -50,6 +50,7 @@ macro_rules! artiq_raise {
|
||||||
}
|
}
|
||||||
|
|
||||||
mod rtio;
|
mod rtio;
|
||||||
|
#[cfg(has_i2c)]
|
||||||
mod i2c;
|
mod i2c;
|
||||||
|
|
||||||
use core::{mem, ptr, slice, str};
|
use core::{mem, ptr, slice, str};
|
||||||
|
|
Loading…
Reference in New Issue