tof_control/rb_control/
rb_input.rs

1use crate::helper::rb_type::RBError;
2use crate::rb_control::rb_gpioe;
3
4pub fn disable_rf_input() -> Result<(), RBError> {
5    rb_gpioe::disable_nb3v9312c_gpioe()?;
6    rb_gpioe::rf_input_select_gpioe(0)?;
7
8    Ok(())
9}
10
11pub fn enable_sma_input() -> Result<(), RBError> {
12    rb_gpioe::disable_nb3v9312c_gpioe()?;
13    rb_gpioe::rf_input_select_gpioe(2)?;
14
15    Ok(())
16}
17
18pub fn enable_tca_input() -> Result<(), RBError> {
19    rb_gpioe::enable_nb3v9312c_gpioe()?;
20    rb_gpioe::rf_input_select_gpioe(1)?;
21
22    Ok(())
23}