add dip switch
This commit is contained in:
parent
ab1d4403c9
commit
3c8b790e7f
3 changed files with 35 additions and 2 deletions
|
@ -3,6 +3,9 @@ use b15f::b15f::B15F;
|
|||
fn main() -> Result<(), String> {
|
||||
let mut drv = B15F::new()?;
|
||||
|
||||
println!("{}", drv.digital_read::<0>().unwrap());
|
||||
println!("BA-0: {:b}", drv.digital_read::<0>()?);
|
||||
println!("BA-1: {:b}", drv.digital_read::<1>()?);
|
||||
println!("DIP : {:b}", drv.read_dip_switch()?);
|
||||
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue