tof_control/pb_control/pb_init.rs
1use crate::helper::pb_type::PBError;
2use crate::pb_control::{pb_temp, pb_vcp};
3
4pub fn initialize() -> Result<(), PBError> {
5 // Initialize Temp Sensor
6 initialize_temp()?;
7 // Initialize VCP Sensor
8 initialize_vcp()?;
9
10 Ok(())
11}
12
13fn initialize_temp() -> Result<(), PBError> {
14 pb_temp::config_temp()?;
15
16 Ok(())
17}
18
19fn initialize_vcp() -> Result<(), PBError> {
20 pb_vcp::config_vcp()?;
21
22 Ok(())
23}