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