mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-28 20:53:35 +08:00
runtime: support for targets without I2C
This commit is contained in:
parent
ffefdb9269
commit
3c5a62243d
@ -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),
|
||||
];
|
||||
|
@ -50,6 +50,7 @@ macro_rules! artiq_raise {
|
||||
}
|
||||
|
||||
mod rtio;
|
||||
#[cfg(has_i2c)]
|
||||
mod i2c;
|
||||
|
||||
use core::{mem, ptr, slice, str};
|
||||
|
Loading…
Reference in New Issue
Block a user