boards: hellen: honda-k: set accel SPI params

This commit is contained in:
Andrey Gusakov 2023-12-14 00:18:29 +03:00 committed by rusefillc
parent e80c57fa5f
commit 0959d10c00
3 changed files with 6 additions and 2 deletions

View File

@ -145,6 +145,10 @@ void setBoardDefaultConfiguration() {
setTPS1Calibration(100, 650);
hellenWbo();
/* accel SPI is shared with SD card SPI */
engineConfiguration->accelerometerSpiDevice = SPI_DEVICE_1;
engineConfiguration->accelerometerCsPin = H_SPI1_CS2;
}
static Gpio OUTPUTS[] = {

View File

@ -64,7 +64,7 @@ void configureHellenMegaAccCS2Pin() {
static OutputPin cs2pin;
if (!initialized) {
initialized = true;
cs2pin.initPin("mm-CS2", Gpio::H_SPI1_CS2);
cs2pin.initPin("mm-CS2", H_SPI1_CS2);
cs2pin.setValue(1);
}
}

View File

@ -216,7 +216,7 @@ void detectHellenBoardType();
#define H_SPI1_MISO Gpio::B4
#define H_SPI1_SCK B3
#define H_SPI1_CS1 Gpio::B6
#define H_SPI1_CS2 B7
#define H_SPI1_CS2 Gpio::B7
// looks like same pins 144 and 176
#define H_SPI2_MOSI Gpio::B15