2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

runtime: support for targets without I2C

This commit is contained in:
Sebastien Bourdeauducq 2016-11-23 10:43:33 +08:00
parent fbd83cf9ee
commit cd40d5b107
2 changed files with 6 additions and 0 deletions

View File

@ -105,9 +105,14 @@ static mut API: &'static [(&'static str, *const ())] = &[
api!(rtio_input_timestamp = ::rtio::input_timestamp),
api!(rtio_input_data = ::rtio::input_data),
#[cfg(has_i2c)]
api!(i2c_init = ::i2c::init),
#[cfg(has_i2c)]
api!(i2c_start = ::i2c::start),
#[cfg(has_i2c)]
api!(i2c_stop = ::i2c::stop),
#[cfg(has_i2c)]
api!(i2c_write = ::i2c::write),
#[cfg(has_i2c)]
api!(i2c_read = ::i2c::read),
];

View File

@ -50,6 +50,7 @@ macro_rules! artiq_raise {
}
mod rtio;
#[cfg(has_i2c)]
mod i2c;
use core::{mem, ptr, slice, str};