forked from M-Labs/artiq
1
0
Fork 0

runtime: support for targets without I2C

This commit is contained in:
Sebastien Bourdeauducq 2016-11-23 10:43:33 +08:00
parent ffefdb9269
commit 3c5a62243d
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};