summaryrefslogtreecommitdiffstats
path: root/tests/mux_i2c.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mux_i2c.rs')
-rw-r--r--tests/mux_i2c.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/mux_i2c.rs b/tests/mux_i2c.rs
index ca10673..f448f04 100644
--- a/tests/mux_i2c.rs
+++ b/tests/mux_i2c.rs
@@ -49,6 +49,16 @@ macro_rules! mux_test {
assert_eq!(-2048, measurement);
destroy(dev);
}
+
+ #[test]
+ fn continuous_can_select_channel() {
+ let config = Config::default().with_high($config_bits);
+ let transactions = [ I2cTrans::write(DEV_ADDR, vec![Register::CONFIG, config.msb(), config.lsb()]) ];
+ let dev = new(&transactions);
+ let mut dev = dev.into_continuous().unwrap();
+ dev.select_channel(&mut channel::$CS).unwrap();
+ destroy(dev);
+ }
}
};
}