This commit is contained in:
parent
46c245cfa2
commit
059b4cd82f
|
@ -12,7 +12,6 @@
|
|||
#include "hellen_meta.h"
|
||||
#include "defaults.h"
|
||||
|
||||
static OutputPin alphaEn;
|
||||
static OutputPin alphaTachPullUp;
|
||||
static OutputPin alphaTempPullUp;
|
||||
static OutputPin alphaCrankPPullUp;
|
||||
|
@ -106,9 +105,6 @@ static bool is_F_OrOlder() {
|
|||
}
|
||||
|
||||
void boardInitHardware() {
|
||||
alphaEn.initPin("a-EN", H144_OUT_IO3);
|
||||
alphaEn.setValue(1);
|
||||
|
||||
alphaTachPullUp.initPin("a-tach", H144_OUT_IO1);
|
||||
alphaTempPullUp.initPin("a-temp", H144_OUT_IO4);
|
||||
alphaCrankPPullUp.initPin("a-crank-p", H144_OUT_IO2);
|
||||
|
@ -149,12 +145,12 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
|
||||
void setBoardConfigOverrides() {
|
||||
setupVbatt();
|
||||
// todo: do we need this conditional on boardId or not really?
|
||||
setHellenMegaEnPin();
|
||||
|
||||
if (is_F_OrOlder()) {
|
||||
setHellenEnPin(H144_OUT_IO3);
|
||||
setHellenSdCardSpi2();
|
||||
} else {
|
||||
setHellenMegaEnPin();
|
||||
// rev G and newer uses hellen mega-module
|
||||
setHellenSdCardSpi1();
|
||||
configureHellenMegaAccCS2Pin();
|
||||
|
|
|
@ -17,7 +17,7 @@ void setHellen64Can() {
|
|||
|
||||
static OutputPin megaEn;
|
||||
|
||||
static void setHellenMegaEnPin(Gpio pin) {
|
||||
void setHellenEnPin(Gpio pin) {
|
||||
static bool initialized = false;
|
||||
if (!initialized) {
|
||||
initialized = true;
|
||||
|
@ -27,11 +27,11 @@ static void setHellenMegaEnPin(Gpio pin) {
|
|||
}
|
||||
|
||||
void setHellenMegaEnPin() {
|
||||
setHellenMegaEnPin(H144_GP8); // OUT_PWR_EN
|
||||
setHellenEnPin(H144_GP8); // OUT_PWR_EN
|
||||
}
|
||||
|
||||
void setHellen64MegaEnPin() {
|
||||
setHellenMegaEnPin(H64_IO1); // OUT_PWR_EN
|
||||
setHellenEnPin(H64_IO1); // OUT_PWR_EN
|
||||
}
|
||||
|
||||
void hellenBoardStandBy() {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
void hellenWbo();
|
||||
|
||||
void setHellenMegaEnPin();
|
||||
void setHellenEnPin(Gpio pin);
|
||||
void setHellen64MegaEnPin();
|
||||
void hellenBoardStandBy();
|
||||
void configureHellenMegaAccCS2Pin();
|
||||
|
|
Loading…
Reference in New Issue