2018-11-16 04:40:06 -08:00
|
|
|
/**
|
|
|
|
* @file boards/NUCLEO_F767/board_configuration.cpp
|
|
|
|
*
|
|
|
|
* @brief In this file we can override engine_configuration.cpp.
|
|
|
|
*
|
|
|
|
* @author andreika, (c) 2018
|
|
|
|
*/
|
|
|
|
|
2021-08-03 19:05:01 -07:00
|
|
|
#include "pch.h"
|
2018-11-16 04:40:06 -08:00
|
|
|
|
|
|
|
// Warning! This is a test config!
|
|
|
|
|
|
|
|
#undef SERIAL_SPEED
|
|
|
|
#define SERIAL_SPEED 115200
|
|
|
|
|
2022-01-11 19:26:24 -08:00
|
|
|
void setSerialConfigurationOverrides() {
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->useSerialPort = true;
|
2022-04-28 14:32:39 -07:00
|
|
|
engineConfiguration->binarySerialTxPin = Gpio::D8;
|
|
|
|
engineConfiguration->binarySerialRxPin = Gpio::D9;
|
|
|
|
// engineConfiguration->consoleSerialTxPin = Gpio::D8;
|
|
|
|
// engineConfiguration->consoleSerialRxPin = Gpio::D9;
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
|
2018-11-16 04:40:06 -08:00
|
|
|
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
|
|
|
|
}
|
|
|
|
|
2022-01-11 19:26:24 -08:00
|
|
|
void setSdCardConfigurationOverrides() {
|
2018-11-16 04:40:06 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-03-22 11:15:09 -07:00
|
|
|
* @brief Board-specific configuration defaults.
|
2018-11-16 04:40:06 -08:00
|
|
|
* @todo Add your board-specific code, if any.
|
|
|
|
*/
|
2022-01-11 19:26:24 -08:00
|
|
|
void setBoardDefaultConfiguration() {
|
2018-11-16 04:40:06 -08:00
|
|
|
setSerialConfigurationOverrides();
|
|
|
|
|
2022-04-28 14:32:39 -07:00
|
|
|
engineConfiguration->runningLedPin = Gpio::B0; //green LED
|
|
|
|
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
2018-11-16 04:40:06 -08:00
|
|
|
#if 0
|
|
|
|
engineConfiguration->vbattAdcChannel = EFI_ADC_13;
|
|
|
|
engineConfiguration->adcVcc = ADC_VCC;
|
|
|
|
#endif
|
|
|
|
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
|
2019-02-06 15:05:32 -08:00
|
|
|
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
|
2018-11-16 04:40:06 -08:00
|
|
|
|
|
|
|
// not used
|
2019-03-12 14:40:07 -07:00
|
|
|
for (int i = 0; i < DIGIPOT_COUNT ; i++) {
|
2022-04-28 14:32:39 -07:00
|
|
|
engineConfiguration->digitalPotentiometerChipSelect[i] = Gpio::Unassigned;
|
2019-03-12 14:40:07 -07:00
|
|
|
}
|
2022-04-28 14:32:39 -07:00
|
|
|
engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
|
|
|
|
engineConfiguration->triggerSimulatorPins[2] = Gpio::Unassigned;
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
|
|
|
|
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
|
2022-04-28 14:32:39 -07:00
|
|
|
engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
|
2019-08-01 22:36:02 -07:00
|
|
|
|
2018-11-16 04:40:06 -08:00
|
|
|
/////////////////////////////////////////////////////////
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->is_enabled_spi_1 = false;
|
|
|
|
engineConfiguration->is_enabled_spi_2 = false;
|
|
|
|
engineConfiguration->is_enabled_spi_3 = false;
|
2018-11-16 04:40:06 -08:00
|
|
|
}
|