proteus SD card defaults (#1796)
* proteus SD defaults * disable serial console pins
This commit is contained in:
parent
e3056bb397
commit
2a1e2c53e3
|
@ -22,7 +22,7 @@ else
|
|||
endif
|
||||
|
||||
# Override DEFAULT_ENGINE_TYPE
|
||||
DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE -DEFI_SOFTWARE_KNOCK=TRUE
|
||||
DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE -DEFI_SOFTWARE_KNOCK=TRUE -DEFI_CONSOLE_TX_BRAIN_PIN=GPIO_UNASSIGNED -DEFI_CONSOLE_RX_BRAIN_PIN=GPIO_UNASSIGNED
|
||||
|
||||
# Proteus <=v0.2 needs ADC hack - vbatt is on ADC3
|
||||
ifeq ($(PROTEUS_LEGACY),TRUE)
|
||||
|
|
|
@ -139,6 +139,18 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_10;
|
||||
}
|
||||
|
||||
static void setupSdCard() {
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->sdCardCsPin = GPIOD_2;
|
||||
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
}
|
||||
|
||||
void setPinConfigurationOverrides(void) {
|
||||
}
|
||||
|
||||
|
@ -164,6 +176,7 @@ void setBoardConfigurationOverrides(void) {
|
|||
setLedPins();
|
||||
setupVbatt();
|
||||
setupEtb();
|
||||
setupSdCard();
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
|
|
@ -48,6 +48,11 @@ bool efiReadPin(brain_pin_e pin) {
|
|||
*/
|
||||
void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode)
|
||||
{
|
||||
if (brainPin == GPIO_UNASSIGNED) {
|
||||
// No pin configured, nothing to do here.
|
||||
return;
|
||||
}
|
||||
|
||||
bool wasUsed = brain_pin_markUsed(brainPin, msg);
|
||||
|
||||
if (!wasUsed) {
|
||||
|
|
Loading…
Reference in New Issue