2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file efifeatures.h
|
|
|
|
*
|
|
|
|
* @brief In this header we can configure which firmware modules are used.
|
2024-05-23 06:17:10 -07:00
|
|
|
* See config/boards which are often overriding some of the defaults via .mk and/or .env files
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
|
|
|
* @date Aug 29, 2013
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2019-11-03 07:36:35 -08:00
|
|
|
#pragma once
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2024-05-23 15:23:52 -07:00
|
|
|
#include <rusefi/true_false.h>
|
|
|
|
|
2017-04-21 12:14:37 -07:00
|
|
|
#define EFI_GPIO_HARDWARE TRUE
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-06-22 11:46:04 -07:00
|
|
|
#ifndef SENT_CHANNELS_NUM
|
2022-10-19 20:45:21 -07:00
|
|
|
#define SENT_CHANNELS_NUM 1
|
2023-06-22 11:46:04 -07:00
|
|
|
#endif
|
2022-10-19 20:45:21 -07:00
|
|
|
|
2022-04-15 05:15:48 -07:00
|
|
|
#ifndef EFI_BOOST_CONTROL
|
2020-01-31 11:29:52 -08:00
|
|
|
#define EFI_BOOST_CONTROL TRUE
|
2022-04-15 05:15:48 -07:00
|
|
|
#endif
|
2020-03-23 17:44:34 -07:00
|
|
|
|
2024-05-24 09:09:28 -07:00
|
|
|
#ifndef EFI_BOSCH_YAW
|
|
|
|
#define EFI_BOSCH_YAW FALSE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_WIFI
|
|
|
|
#define EFI_WIFI FALSE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_WS2812
|
|
|
|
#define EFI_WS2812 FALSE
|
|
|
|
#endif
|
|
|
|
|
2023-10-09 07:51:21 -07:00
|
|
|
#ifndef EFI_DAC
|
|
|
|
#define EFI_DAC FALSE
|
|
|
|
#endif
|
|
|
|
|
2022-04-15 05:15:48 -07:00
|
|
|
#ifndef EFI_LAUNCH_CONTROL
|
2020-09-22 13:25:27 -07:00
|
|
|
#define EFI_LAUNCH_CONTROL TRUE
|
2022-04-15 05:15:48 -07:00
|
|
|
#endif
|
2020-03-23 17:44:34 -07:00
|
|
|
|
2022-12-16 15:58:39 -08:00
|
|
|
#ifndef EFI_ANTILAG_SYSTEM
|
|
|
|
#define EFI_ANTILAG_SYSTEM TRUE
|
2023-05-24 05:57:01 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_BACKUP_SRAM
|
|
|
|
#define EFI_BACKUP_SRAM TRUE
|
2023-05-24 06:58:22 -07:00
|
|
|
#endif
|
|
|
|
|
2024-05-23 15:23:52 -07:00
|
|
|
#ifndef EFI_HELLA_OIL
|
|
|
|
#define EFI_HELLA_OIL FALSE
|
|
|
|
#endif
|
|
|
|
|
2023-11-05 15:12:27 -08:00
|
|
|
#ifndef EFI_USE_OPENBLT
|
|
|
|
#define EFI_USE_OPENBLT FALSE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_ETHERNET
|
|
|
|
#define EFI_ETHERNET FALSE
|
|
|
|
#endif
|
|
|
|
|
2023-05-24 06:58:22 -07:00
|
|
|
#ifndef EFI_DFU_JUMP
|
|
|
|
#define EFI_DFU_JUMP TRUE
|
2023-05-24 08:07:31 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_BOR_LEVEL
|
|
|
|
#define EFI_BOR_LEVEL TRUE
|
2022-12-16 15:58:39 -08:00
|
|
|
#endif
|
|
|
|
|
2024-01-29 18:12:52 -08:00
|
|
|
#ifndef EFI_DYNO_VIEW
|
2020-12-04 17:28:48 -08:00
|
|
|
#define EFI_DYNO_VIEW TRUE
|
2024-01-29 18:12:52 -08:00
|
|
|
#endif
|
2020-12-04 17:28:48 -08:00
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_CDM_INTEGRATION
|
2020-10-04 16:29:26 -07:00
|
|
|
#define EFI_CDM_INTEGRATION FALSE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2019-01-04 20:47:39 -08:00
|
|
|
|
2019-07-07 12:22:46 -07:00
|
|
|
#ifndef EFI_TOOTH_LOGGER
|
|
|
|
#define EFI_TOOTH_LOGGER TRUE
|
|
|
|
#endif
|
|
|
|
|
2024-01-29 18:12:52 -08:00
|
|
|
#ifndef EFI_TEXT_LOGGING
|
2018-09-16 20:54:14 -07:00
|
|
|
#define EFI_TEXT_LOGGING TRUE
|
2024-01-29 18:12:52 -08:00
|
|
|
#endif
|
2018-09-16 20:54:14 -07:00
|
|
|
|
2020-12-16 19:24:19 -08:00
|
|
|
#define EFI_ACTIVE_CONFIGURATION_IN_FLASH FALSE
|
|
|
|
|
2022-12-17 14:10:15 -08:00
|
|
|
#ifndef EFI_MC33816
|
2024-02-21 14:43:04 -08:00
|
|
|
#define EFI_MC33816 FALSE
|
2022-12-17 14:10:15 -08:00
|
|
|
#endif
|
2019-05-03 18:13:25 -07:00
|
|
|
|
2022-04-15 05:15:48 -07:00
|
|
|
#ifndef EFI_HPFP
|
2020-11-09 19:53:23 -08:00
|
|
|
#define EFI_HPFP TRUE
|
2022-04-15 05:15:48 -07:00
|
|
|
#endif
|
2020-11-09 19:53:23 -08:00
|
|
|
|
2023-10-30 23:02:20 -07:00
|
|
|
#ifndef EFI_HD_ACR
|
|
|
|
#define EFI_HD_ACR FALSE
|
|
|
|
#endif
|
|
|
|
|
2020-08-26 20:08:48 -07:00
|
|
|
#ifndef SC_BUFFER_SIZE
|
|
|
|
#define SC_BUFFER_SIZE 4000
|
|
|
|
#endif
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* if you have a 60-2 trigger, or if you just want better performance, you
|
|
|
|
* probably want EFI_ENABLE_ASSERTS to be FALSE. Also you would probably want to FALSE
|
|
|
|
* CH_DBG_ENABLE_CHECKS
|
|
|
|
* CH_DBG_ENABLE_ASSERTS
|
|
|
|
* in chconf.h
|
|
|
|
*
|
|
|
|
*/
|
2019-04-12 19:10:57 -07:00
|
|
|
#if !defined(EFI_ENABLE_ASSERTS)
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_ENABLE_ASSERTS TRUE
|
|
|
|
#endif /* EFI_ENABLE_ASSERTS */
|
|
|
|
|
2022-10-16 19:32:48 -07:00
|
|
|
#ifndef EFI_CLOCK_LOCKS
|
2022-09-13 11:07:25 -07:00
|
|
|
#define EFI_CLOCK_LOCKS TRUE
|
2022-10-16 19:32:48 -07:00
|
|
|
#endif
|
2022-09-13 11:07:25 -07:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
//#define EFI_UART_ECHO_TEST_MODE TRUE
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build-in logic analyzer support. Logic analyzer viewer is one of the java console panes.
|
|
|
|
*/
|
2019-12-03 22:11:10 -08:00
|
|
|
#ifndef EFI_LOGIC_ANALYZER
|
2022-06-22 17:13:17 -07:00
|
|
|
#define EFI_LOGIC_ANALYZER TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-08-06 19:33:27 -07:00
|
|
|
#ifndef HAL_TRIGGER_USE_PAL
|
2022-06-22 15:43:39 -07:00
|
|
|
#define HAL_TRIGGER_USE_PAL TRUE
|
2019-08-06 19:33:27 -07:00
|
|
|
#endif /* HAL_TRIGGER_USE_PAL */
|
|
|
|
|
2020-09-07 12:27:29 -07:00
|
|
|
#ifndef HAL_TRIGGER_USE_ADC
|
|
|
|
#define HAL_TRIGGER_USE_ADC FALSE
|
|
|
|
#endif /* HAL_TRIGGER_USE_ADC */
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* TunerStudio support.
|
|
|
|
*/
|
2022-04-17 16:04:18 -07:00
|
|
|
#ifndef EFI_TUNER_STUDIO
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_TUNER_STUDIO TRUE
|
2022-04-17 16:04:18 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2024-03-07 12:09:30 -08:00
|
|
|
#ifndef EFI_TS_SCATTER
|
|
|
|
#define EFI_TS_SCATTER TRUE
|
|
|
|
#endif
|
|
|
|
|
2017-06-04 05:50:31 -07:00
|
|
|
/**
|
|
|
|
* Bluetooth UART setup support.
|
|
|
|
*/
|
2021-12-01 19:57:04 -08:00
|
|
|
#ifndef EFI_BLUETOOTH_SETUP
|
2020-05-02 19:34:31 -07:00
|
|
|
#define EFI_BLUETOOTH_SETUP TRUE
|
2021-12-01 19:57:04 -08:00
|
|
|
#endif /* EFI_BLUETOOTH_SETUP */
|
2017-06-04 05:50:31 -07:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* TunerStudio debug output
|
|
|
|
*/
|
|
|
|
#define EFI_TUNER_STUDIO_VERBOSE TRUE
|
|
|
|
|
|
|
|
#define EFI_DEFAILED_LOGGING FALSE
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dev console support.
|
|
|
|
*/
|
2022-04-17 16:04:18 -07:00
|
|
|
#ifndef EFI_CLI_SUPPORT
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_CLI_SUPPORT TRUE
|
2022-04-17 16:04:18 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2022-10-16 19:32:48 -07:00
|
|
|
#ifndef EFI_RTC
|
2019-09-20 15:22:39 -07:00
|
|
|
#define EFI_RTC TRUE
|
2022-10-16 19:32:48 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2022-04-17 16:04:18 -07:00
|
|
|
#ifndef EFI_ALTERNATOR_CONTROL
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_ALTERNATOR_CONTROL TRUE
|
2022-04-17 16:04:18 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-03-04 23:07:34 -08:00
|
|
|
#ifndef EFI_VVT_PID
|
|
|
|
#define EFI_VVT_PID TRUE
|
2022-04-17 21:03:56 -07:00
|
|
|
#endif
|
2016-06-27 19:02:41 -07:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE
|
|
|
|
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
|
|
|
|
|
2016-08-26 14:02:37 -07:00
|
|
|
#define FUEL_MATH_EXTREME_LOGGING FALSE
|
|
|
|
|
2016-10-28 20:01:36 -07:00
|
|
|
#define SPARK_EXTREME_LOGGING FALSE
|
|
|
|
|
2016-10-31 17:02:09 -07:00
|
|
|
#define TRIGGER_EXTREME_LOGGING FALSE
|
|
|
|
|
2023-11-03 10:08:35 -07:00
|
|
|
#ifndef EFI_STORAGE_INT_FLASH
|
2024-05-01 16:44:55 -07:00
|
|
|
// historically we've started with low-level flash access with our own redundancy logic
|
|
|
|
// todo: migrate to EFI_STORAGE_MFS which provides same functionality and more!
|
2023-11-03 10:08:35 -07:00
|
|
|
#define EFI_STORAGE_INT_FLASH TRUE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_STORAGE_MFS
|
2024-05-01 16:44:55 -07:00
|
|
|
// todo: this higher level API should replace EFI_STORAGE_INT_FLASH legacy implementation
|
2023-11-03 10:08:35 -07:00
|
|
|
#define EFI_STORAGE_MFS FALSE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-11-03 10:08:35 -07:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* Usually you need shaft position input, but maybe you do not need it?
|
|
|
|
*/
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_SHAFT_POSITION_INPUT
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_SHAFT_POSITION_INPUT TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Maybe we are just sniffing what's going on?
|
2023-11-05 10:54:06 -08:00
|
|
|
* EFI_ENGINE_CONTROL is covering injectors and spark control
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
2023-11-05 10:54:06 -08:00
|
|
|
#ifndef EFI_ENGINE_CONTROL
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_ENGINE_CONTROL TRUE
|
2023-11-05 10:54:06 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* MCP42010 digital potentiometer support. This could be useful if you are stimulating some
|
|
|
|
* stock ECU
|
|
|
|
*/
|
2024-01-29 18:12:52 -08:00
|
|
|
#ifndef EFI_POTENTIOMETER
|
2021-02-24 05:14:21 -08:00
|
|
|
#define EFI_POTENTIOMETER FALSE
|
2024-01-29 18:12:52 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-04-13 13:35:45 -07:00
|
|
|
#ifndef BOARD_TLE6240_COUNT
|
2021-08-27 03:18:05 -07:00
|
|
|
#define BOARD_TLE6240_COUNT 0
|
2019-04-13 13:35:45 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef BOARD_MC33972_COUNT
|
2021-08-27 03:18:05 -07:00
|
|
|
#define BOARD_MC33972_COUNT 0
|
2019-04-13 13:35:45 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef BOARD_TLE8888_COUNT
|
2023-11-21 17:44:33 -08:00
|
|
|
#define BOARD_TLE8888_COUNT 0
|
2019-04-13 13:35:45 -07:00
|
|
|
#endif
|
2019-04-13 07:58:52 -07:00
|
|
|
|
2022-01-10 16:15:04 -08:00
|
|
|
#ifndef BOARD_L9779_COUNT
|
2023-11-21 17:44:33 -08:00
|
|
|
#define BOARD_L9779_COUNT 0
|
2022-01-10 16:15:04 -08:00
|
|
|
#endif
|
|
|
|
|
2020-09-07 12:27:29 -07:00
|
|
|
#ifndef BOARD_DRV8860_COUNT
|
|
|
|
#define BOARD_DRV8860_COUNT 0
|
|
|
|
#endif
|
|
|
|
|
2021-01-06 15:29:47 -08:00
|
|
|
#ifndef BOARD_MC33810_COUNT
|
|
|
|
#define BOARD_MC33810_COUNT 0
|
|
|
|
#endif
|
|
|
|
|
2022-08-02 16:02:03 -07:00
|
|
|
#ifndef BOARD_TLE9104_COUNT
|
|
|
|
#define BOARD_TLE9104_COUNT 0
|
|
|
|
#endif
|
|
|
|
|
2024-11-07 05:44:08 -08:00
|
|
|
#ifndef BOARD_TLE9201_COUNT
|
|
|
|
#define BOARD_TLE9201_COUNT 0
|
|
|
|
#endif
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_ANALOG_SENSORS TRUE
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_MAX_31855
|
2023-11-21 17:44:33 -08:00
|
|
|
#define EFI_MAX_31855 FALSE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#define EFI_MCP_3208 FALSE
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_HIP_9011
|
2020-06-21 18:50:41 -07:00
|
|
|
// disabling for now - DMA conflict with SPI1
|
|
|
|
#define EFI_HIP_9011 FALSE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-12-13 08:08:28 -08:00
|
|
|
#if !defined(EFI_ONBOARD_MEMS)
|
|
|
|
#define EFI_ONBOARD_MEMS FALSE
|
2017-08-16 23:49:07 -07:00
|
|
|
#endif
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_INTERNAL_ADC
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_INTERNAL_ADC TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-02-28 04:30:19 -08:00
|
|
|
#define EFI_USE_FAST_ADC TRUE
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_CAN_SUPPORT
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_CAN_SUPPORT TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-03-04 17:50:22 -08:00
|
|
|
#if !defined(EFI_CAN_SERIAL) && EFI_CAN_SUPPORT
|
2022-08-10 21:36:00 -07:00
|
|
|
#define EFI_CAN_SERIAL TRUE
|
|
|
|
#endif
|
|
|
|
|
2023-03-04 17:50:22 -08:00
|
|
|
#if !defined(EFI_CAN_GPIO) && EFI_CAN_SUPPORT
|
|
|
|
// see CAN_PIN_0
|
|
|
|
#define EFI_CAN_GPIO TRUE
|
|
|
|
#endif
|
|
|
|
|
2020-12-16 05:28:53 -08:00
|
|
|
#define EFI_WIDEBAND_FIRMWARE_UPDATE TRUE
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_IDLE_CONTROL
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_IDLE_CONTROL TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2024-01-29 18:12:52 -08:00
|
|
|
#ifndef EFI_IDLE_PID_CIC
|
2020-07-12 18:53:55 -07:00
|
|
|
#define EFI_IDLE_PID_CIC TRUE
|
2024-01-29 18:12:52 -08:00
|
|
|
#endif
|
2017-12-27 14:56:04 -08:00
|
|
|
|
2017-06-12 15:14:39 -07:00
|
|
|
/**
|
|
|
|
* Control the main power relay based on measured ignition voltage (Vbatt)
|
|
|
|
*/
|
2019-09-02 08:48:49 -07:00
|
|
|
#ifndef EFI_MAIN_RELAY_CONTROL
|
2017-06-12 15:14:39 -07:00
|
|
|
#define EFI_MAIN_RELAY_CONTROL FALSE
|
2019-09-02 08:48:49 -07:00
|
|
|
#endif
|
2017-06-12 15:14:39 -07:00
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_VEHICLE_SPEED
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_VEHICLE_SPEED TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2022-04-23 04:34:39 -07:00
|
|
|
#ifndef EFI_TCU
|
2024-01-02 18:49:28 -08:00
|
|
|
#define EFI_TCU FALSE
|
2022-04-23 04:34:39 -07:00
|
|
|
#endif
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_ENGINE_EMULATOR
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_ENGINE_EMULATOR TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_EMULATE_POSITION_SENSORS
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_EMULATE_POSITION_SENSORS TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Do we need file logging (like SD card) logic?
|
2022-12-17 16:01:40 -08:00
|
|
|
* See also USE_FATFS
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_FILE_LOGGING
|
2018-01-23 19:23:24 -08:00
|
|
|
#define EFI_FILE_LOGGING TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-03-03 04:50:53 -08:00
|
|
|
#ifndef EFI_EMBED_INI_MSD
|
|
|
|
#define EFI_EMBED_INI_MSD TRUE
|
|
|
|
#endif
|
|
|
|
|
2017-05-30 15:37:13 -07:00
|
|
|
#ifndef EFI_USB_SERIAL
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_USB_SERIAL TRUE
|
2017-05-30 15:37:13 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2020-09-11 00:54:07 -07:00
|
|
|
#define EFI_CONSOLE_USB_DEVICE SDU1
|
2020-09-07 12:27:29 -07:00
|
|
|
|
2022-01-09 19:44:22 -08:00
|
|
|
#if defined(EFI_HAS_EXT_SDRAM)
|
2024-05-27 03:18:27 -07:00
|
|
|
#ifndef ENABLE_PERF_TRACE
|
|
|
|
#define ENABLE_PERF_TRACE TRUE
|
|
|
|
#endif // ENABLE_PERF_TRACE
|
|
|
|
#define LUA_USER_HEAP (1 * 1024 * 1024)
|
2022-01-09 19:44:22 -08:00
|
|
|
#elif defined(EFI_IS_F42x)
|
2024-05-27 03:18:27 -07:00
|
|
|
// F42x has more memory, so we can:
|
|
|
|
// - use compressed USB MSD image (requires 32k of memory)
|
|
|
|
// - use perf trace (requires ~16k of memory)
|
2024-10-20 13:45:15 -07:00
|
|
|
// - use spectorgram (requires ~12k of memory), need disable perf trace or compressed USB MSD image
|
|
|
|
#ifndef KNOCK_SPECTROGRAM
|
|
|
|
#define EFI_USE_COMPRESSED_INI_MSD TRUE
|
|
|
|
#endif
|
2021-05-20 13:05:18 -07:00
|
|
|
#define ENABLE_PERF_TRACE TRUE
|
2021-10-09 06:02:30 -07:00
|
|
|
|
2022-02-27 21:19:35 -08:00
|
|
|
#define LUA_USER_HEAP 25000
|
2021-05-03 22:03:17 -07:00
|
|
|
#else
|
2024-05-27 03:18:27 -07:00
|
|
|
#ifndef ENABLE_PERF_TRACE
|
2021-05-20 13:05:18 -07:00
|
|
|
// small memory F40x can't fit perf trace
|
|
|
|
#define ENABLE_PERF_TRACE FALSE
|
2024-05-27 03:18:27 -07:00
|
|
|
#endif // ENABLE_PERF_TRACE
|
2021-10-09 06:02:30 -07:00
|
|
|
|
2023-06-21 20:37:19 -07:00
|
|
|
#ifndef LUA_USER_HEAP
|
2024-10-22 03:33:07 -07:00
|
|
|
#define LUA_USER_HEAP 18000
|
2023-06-21 20:37:19 -07:00
|
|
|
#endif
|
2021-05-20 13:05:18 -07:00
|
|
|
#endif
|
|
|
|
|
2024-05-27 01:12:08 -07:00
|
|
|
#ifndef EFI_USE_COMPRESSED_INI_MSD
|
|
|
|
#define EFI_USE_COMPRESSED_INI_MSD FALSE
|
|
|
|
#endif
|
|
|
|
|
2021-05-20 13:05:18 -07:00
|
|
|
#ifndef EFI_LUA
|
|
|
|
#define EFI_LUA TRUE
|
2021-03-13 04:26:58 -08:00
|
|
|
#endif
|
|
|
|
|
2023-07-22 12:34:48 -07:00
|
|
|
#ifndef EFI_LUA_LOOKUP
|
|
|
|
#define EFI_LUA_LOOKUP TRUE
|
|
|
|
#endif
|
|
|
|
|
2019-01-31 16:14:29 -08:00
|
|
|
#ifndef EFI_ENGINE_SNIFFER
|
2015-07-15 18:01:45 -07:00
|
|
|
#define EFI_ENGINE_SNIFFER TRUE
|
2019-01-31 16:14:29 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#define EFI_HISTOGRAMS FALSE
|
2023-06-21 20:37:19 -07:00
|
|
|
|
|
|
|
#ifndef EFI_SENSOR_CHART
|
2015-09-13 09:01:42 -07:00
|
|
|
#define EFI_SENSOR_CHART TRUE
|
2023-06-21 20:37:19 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-11-05 15:12:27 -08:00
|
|
|
#ifndef EFI_PERF_METRICS
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_PERF_METRICS FALSE
|
2023-11-05 15:12:27 -08:00
|
|
|
#endif
|
2023-06-21 20:37:19 -07:00
|
|
|
|
|
|
|
#ifndef DL_OUTPUT_BUFFER
|
2015-07-10 06:01:56 -07:00
|
|
|
#define DL_OUTPUT_BUFFER 6500
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Do we need GPS logic?
|
|
|
|
*/
|
2024-01-29 18:12:52 -08:00
|
|
|
#ifndef EFI_UART_GPS
|
2020-04-27 11:36:26 -07:00
|
|
|
#define EFI_UART_GPS FALSE
|
2024-01-29 18:12:52 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-06-22 11:34:01 -07:00
|
|
|
#ifndef EFI_ELECTRONIC_THROTTLE_BODY
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE
|
2023-06-22 11:34:01 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Do we need Malfunction Indicator blinking logic?
|
|
|
|
*/
|
2022-04-17 21:03:56 -07:00
|
|
|
#ifndef EFI_MALFUNCTION_INDICATOR
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_MALFUNCTION_INDICATOR TRUE
|
2022-04-17 21:03:56 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2022-04-17 21:03:56 -07:00
|
|
|
#ifndef CONSOLE_MAX_ACTIONS
|
2017-01-06 07:04:41 -08:00
|
|
|
#define CONSOLE_MAX_ACTIONS 180
|
2022-04-17 21:03:56 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2023-06-22 12:45:32 -07:00
|
|
|
#ifndef EFI_MAP_AVERAGING
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_MAP_AVERAGING TRUE
|
2023-06-22 12:45:32 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
// todo: most of this should become configurable
|
|
|
|
|
2021-01-28 17:43:23 -08:00
|
|
|
// todo: switch to continuous ADC conversion for fast ADC?
|
2020-04-23 19:50:18 -07:00
|
|
|
#define EFI_INTERNAL_FAST_ADC_GPT &GPTD6
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#define EFI_SPI1_AF 5
|
|
|
|
#define EFI_SPI2_AF 5
|
|
|
|
#define EFI_SPI3_AF 6
|
2024-02-26 11:30:08 -08:00
|
|
|
#define EFI_SPI4_AF 5
|
|
|
|
#define EFI_SPI5_AF 5
|
|
|
|
#define EFI_SPI6_AF 6
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Patched version of ChibiOS/RT support extra details in the system error messages
|
|
|
|
*/
|
|
|
|
#define EFI_CUSTOM_PANIC_METHOD TRUE
|
|
|
|
|
|
|
|
#define ADC_CHANNEL_VREF ADC_CHANNEL_IN14
|
|
|
|
|
|
|
|
/**
|
|
|
|
* currently ChibiOS uses only first and second channels of each timer for input capture
|
|
|
|
*
|
|
|
|
* So, our options are:
|
|
|
|
*
|
|
|
|
* TIM2_CH1
|
|
|
|
* PA5
|
|
|
|
*
|
|
|
|
* TIM4_CH1
|
|
|
|
* PB6
|
|
|
|
* PD12
|
|
|
|
*
|
|
|
|
* TIM9_CH1
|
|
|
|
* PE5
|
|
|
|
*/
|
|
|
|
|
2021-03-28 06:06:36 -07:00
|
|
|
#ifndef EFI_USE_UART_DMA
|
|
|
|
#define EFI_USE_UART_DMA TRUE
|
2021-02-18 14:04:51 -08:00
|
|
|
#endif
|
2020-06-21 20:22:45 -07:00
|
|
|
|
2024-06-24 14:17:15 -07:00
|
|
|
#ifndef AUX_SERIAL_DEVICE
|
2020-05-11 09:17:42 -07:00
|
|
|
#define AUX_SERIAL_DEVICE (&SD6)
|
2024-06-24 14:17:15 -07:00
|
|
|
#endif
|
2020-05-11 09:17:42 -07:00
|
|
|
|
2020-05-02 20:47:10 -07:00
|
|
|
#ifndef EFI_CONSOLE_TX_BRAIN_PIN
|
2022-04-28 14:32:39 -07:00
|
|
|
#define EFI_CONSOLE_TX_BRAIN_PIN Gpio::C10
|
2017-04-16 09:57:48 -07:00
|
|
|
#endif
|
2022-06-23 16:42:09 -07:00
|
|
|
|
2020-05-02 20:47:10 -07:00
|
|
|
#ifndef EFI_CONSOLE_RX_BRAIN_PIN
|
2022-04-28 14:32:39 -07:00
|
|
|
#define EFI_CONSOLE_RX_BRAIN_PIN Gpio::C11
|
2017-04-16 09:57:48 -07:00
|
|
|
#endif
|
2015-10-22 14:01:29 -07:00
|
|
|
// todo: this should be detected automatically based on pin selection
|
2021-11-11 18:29:18 -08:00
|
|
|
// https://github.com/rusefi/rusefi/issues/3536
|
2021-11-13 01:13:11 -08:00
|
|
|
#ifndef EFI_CONSOLE_AF
|
2015-07-10 06:01:56 -07:00
|
|
|
#define EFI_CONSOLE_AF 7
|
2021-11-13 01:13:11 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2024-11-04 05:05:54 -08:00
|
|
|
// Rx pin should have either internal either external pull up to avoid floating and receiving random garbage
|
|
|
|
#ifndef EFI_CONSOLE_RX_BRAIN_PIN_MODE
|
|
|
|
#define EFI_CONSOLE_RX_BRAIN_PIN_MODE (PAL_MODE_ALTERNATE(EFI_CONSOLE_AF) | PAL_STM32_PUPDR_PULLUP)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EFI_CONSOLE_TX_BRAIN_PIN_MODE
|
|
|
|
#define EFI_CONSOLE_TX_BRAIN_PIN_MODE (PAL_MODE_ALTERNATE(EFI_CONSOLE_AF))
|
|
|
|
#endif
|
|
|
|
|
2015-10-22 14:01:29 -07:00
|
|
|
// todo: this should be detected automatically based on pin selection
|
2021-11-11 18:29:18 -08:00
|
|
|
// https://github.com/rusefi/rusefi/issues/3536
|
2021-11-13 01:13:11 -08:00
|
|
|
#ifndef TS_SERIAL_AF
|
2015-07-10 06:01:56 -07:00
|
|
|
#define TS_SERIAL_AF 7
|
2021-11-13 01:13:11 -08:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2024-11-04 05:05:54 -08:00
|
|
|
#ifndef TS_SERIAL_RX_BRAIN_PIN_MODE
|
|
|
|
#define TS_SERIAL_RX_BRAIN_PIN_MODE (PAL_MODE_ALTERNATE(TS_SERIAL_AF) | PAL_STM32_PUPDR_PULLUP)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TS_SERIAL_TX_BRAIN_PIN_MODE
|
|
|
|
#define TS_SERIAL_TX_BRAIN_PIN_MODE (PAL_MODE_ALTERNATE(TS_SERIAL_AF))
|
|
|
|
#endif
|
|
|
|
|
2020-05-11 15:22:51 -07:00
|
|
|
#ifndef LED_CRITICAL_ERROR_BRAIN_PIN
|
2022-04-28 14:32:39 -07:00
|
|
|
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14
|
2019-09-09 18:44:48 -07:00
|
|
|
#endif
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
// USART1 -> check defined STM32_SERIAL_USE_USART1
|
|
|
|
// For GPS we have USART1. We can start with PB7 USART1_RX and PB6 USART1_TX
|
|
|
|
#define GPS_SERIAL_DEVICE &SD1
|
|
|
|
#define GPS_SERIAL_SPEED 38400
|
|
|
|
|
2022-10-09 03:38:28 -07:00
|
|
|
#ifndef EFI_SENT_SUPPORT
|
|
|
|
#define EFI_SENT_SUPPORT FALSE
|
|
|
|
#endif
|
2024-08-07 16:13:09 -07:00
|
|
|
|
|
|
|
#ifndef EFI_FLASH_WRITE_THREAD
|
|
|
|
#define EFI_FLASH_WRITE_THREAD FALSE
|
|
|
|
#endif
|