hellen SD card presets (#4273)
* hellen SD card presets * copy paste missed some semicolons
This commit is contained in:
parent
c6bd2df879
commit
09ebf9c7a9
|
@ -118,12 +118,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -158,12 +158,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -138,12 +138,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -99,12 +99,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
|
|
|
@ -87,12 +87,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -92,18 +92,7 @@ static void setupDefaultSensorInputs() {
|
|||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
setHellenSdCardSpi3();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -99,16 +99,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
setHellenSdCardSpi3();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -149,12 +149,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
setHellen128ETBConfig();
|
||||
|
||||
|
|
|
@ -102,12 +102,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -92,16 +92,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
setHellenSdCardSpi3();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -92,18 +92,8 @@ static void setupDefaultSensorInputs() {
|
|||
void setBoardConfigOverrides() {
|
||||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
setHellenSdCardSpi3();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->spi3mosiPin = H_SPI3_MOSI;
|
||||
engineConfiguration->spi3misoPin = H_SPI3_MISO;
|
||||
engineConfiguration->spi3sckPin = H_SPI3_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI3_CS;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::C7; // out_pwm3
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::C8; // out_pwm4
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::C6; // ETB_EN out_pwm2
|
||||
|
|
|
@ -103,23 +103,9 @@ void setBoardConfigOverrides() {
|
|||
|
||||
// Hellen81a uses SPI2 for SD-card
|
||||
#if 1
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
|
||||
engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
#else
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
setHellenSdCardSpi3();
|
||||
#endif
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
|
|
|
@ -89,16 +89,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
setHellenSdCardSpi3();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -87,12 +87,7 @@ void setBoardConfigOverrides() {
|
|||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
setHellenSdCardSpi2();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
|
|
@ -189,3 +189,21 @@ void detectHellenBoardType();
|
|||
#define H_SPI3_MISO Gpio::C11
|
||||
#define H_SPI3_SCK Gpio::C10
|
||||
#define H_SPI3_CS Gpio::A15
|
||||
|
||||
static void setHellenSdCardSpi2() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
}
|
||||
|
||||
static void setHellenSdCardSpi3() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->spi3mosiPin = H_SPI3_MOSI;
|
||||
engineConfiguration->spi3misoPin = H_SPI3_MISO;
|
||||
engineConfiguration->spi3sckPin = H_SPI3_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI3_CS;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue