Skip to content

Commit

Permalink
feat: implement control of 5vce
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaven Arra committed Feb 27, 2024
1 parent f0efb7b commit 77861bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/datalogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ void Datalogger::powerDownSwitchableComponents() // called in stopAndAwaitTrigge
{
//TODO: hook for sensors that need to be powered down? separate functions?
//TODO: hook for actuators that need to be powered down?
gpioPinOff(GPIO_PIN_3); //turn off 5v booster
gpioPinOff(BOOST_5V_ENABLE); //turn off 5v booster // TODO: change to PB12, and update other use of GPIO_PIN_3
gpioPinOff(GPIO_PIN_6); //not in use currently
i2c_disable(I2C2);
digitalWrite(EXADC_RESET,LOW);
Expand Down
2 changes: 1 addition & 1 deletion src/system/hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void setupHardwarePins()
pinMode(ONBOARD_LED_PIN, OUTPUT); // This is the onboard LED ? Turns out this is also the SPI1 clock. niiiiice.

//pinMode(GPIO_PIN_6, OUTPUT); // GPIO pin available
pinMode(GPIO_PIN_3, OUTPUT); // in use for 5v booster
pinMode(BOOST_5V_ENABLE, OUTPUT); // in use for 5v booster

//testing all pins
pinMode(PC10, OUTPUT); //no
Expand Down
1 change: 1 addition & 0 deletions src/system/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define ANALOG_INPUT_5_PIN PC3 // A6

#define ONBOARD_LED_PIN PA5
#define BOOST_5V_ENABLE PB12


#define GPIO_PIN_1 PA1
Expand Down

0 comments on commit 77861bc

Please sign in to comment.