2019-03-12 14:41:30 -07:00
|
|
|
/**
|
|
|
|
* @file boards/ME7_PNP/board_configuration.cpp
|
|
|
|
*
|
|
|
|
* @brief In this file we can override engine_configuration.cpp.
|
|
|
|
*
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2019
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "global.h"
|
|
|
|
#include "engine.h"
|
|
|
|
#include "engine_math.h"
|
|
|
|
#include "allsensors.h"
|
|
|
|
#include "fsio_impl.h"
|
|
|
|
#include "engine_configuration.h"
|
|
|
|
|
|
|
|
EXTERN_ENGINE;
|
|
|
|
|
|
|
|
void setPinConfigurationOverrides(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void setSerialConfigurationOverrides(void) {
|
|
|
|
boardConfiguration->useSerialPort = true;
|
|
|
|
engineConfiguration->binarySerialTxPin = GPIOD_8;
|
|
|
|
engineConfiguration->binarySerialRxPin = GPIOD_9;
|
|
|
|
engineConfiguration->consoleSerialTxPin = GPIOD_8;
|
|
|
|
engineConfiguration->consoleSerialRxPin = GPIOD_9;
|
|
|
|
// boardConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
|
|
|
|
// engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setSdCardConfigurationOverrides(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Board-specific configuration code overrides.
|
|
|
|
* @todo Add your board-specific code, if any.
|
|
|
|
*/
|
|
|
|
void setBoardConfigurationOverrides(void) {
|
|
|
|
setSerialConfigurationOverrides();
|
|
|
|
|
|
|
|
engineConfiguration->runningLedPin = GPIOB_0; //green LED
|
2019-04-28 20:04:52 -07:00
|
|
|
engineConfiguration->warningLedPin = GPIO_UNASSIGNED;
|
2019-03-12 14:41:30 -07:00
|
|
|
#if 0
|
|
|
|
engineConfiguration->vbattAdcChannel = EFI_ADC_13;
|
|
|
|
engineConfiguration->adcVcc = ADC_VCC;
|
|
|
|
#endif
|
|
|
|
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
|
|
|
|
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
|
|
|
|
|
|
|
|
// not used
|
|
|
|
engineConfiguration->dizzySparkOutputPin = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->externalKnockSenseAdc = EFI_ADC_NONE;
|
|
|
|
engineConfiguration->displayMode = DM_NONE;
|
|
|
|
boardConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
|
|
|
for (int i = 0; i < DIGIPOT_COUNT ; i++) {
|
|
|
|
boardConfiguration->digitalPotentiometerChipSelect[i] = GPIO_UNASSIGNED;
|
|
|
|
}
|
|
|
|
boardConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
|
|
|
|
boardConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
|
|
|
|
boardConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->boardTestModeJumperPin = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->acRelayPin = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->digitalPotentiometerSpiDevice = SPI_NONE;
|
|
|
|
boardConfiguration->max31855spiDevice = SPI_NONE;
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
|
|
boardConfiguration->is_enabled_spi_1 = false;
|
|
|
|
boardConfiguration->is_enabled_spi_2 = false;
|
|
|
|
boardConfiguration->is_enabled_spi_3 = false;
|
|
|
|
}
|
|
|
|
|