Skip to content

Commit

Permalink
runtime: support for targets without I2C
Browse files Browse the repository at this point in the history
sbourdeauducq committed Nov 23, 2016
1 parent ffefdb9 commit 3c5a622
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions artiq/runtime.rs/libksupport/api.rs
Original file line number Diff line number Diff line change
@@ -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),
];
1 change: 1 addition & 0 deletions artiq/runtime.rs/libksupport/lib.rs
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ macro_rules! artiq_raise {
}

mod rtio;
#[cfg(has_i2c)]
mod i2c;

use core::{mem, ptr, slice, str};

0 comments on commit 3c5a622

Please sign in to comment.