tof_control/ltb_control/
ltb_init.rs

1use crate::ltb_control::{ltb_temp, ltb_threshold};
2use crate::helper::ltb_type::LTBError;
3
4pub fn initialize() -> Result<(), LTBError> {
5    // Set Default Threshold Voltages
6    initialize_threshold()?;
7    // Initialize Temp Sensor
8    initialize_temp()?;
9    
10    Ok(())
11}
12
13fn initialize_threshold() -> Result<(), LTBError> {
14    ltb_threshold::set_default_threshold()?;
15
16    Ok(())
17}
18
19fn initialize_temp() -> Result<(), LTBError> {
20    // Configure Temp Sensors (TMP112)
21    ltb_temp::config_temp()?;
22
23    Ok(())
24}