defined(__DOXYGEN__) ? #748

This commit is contained in:
rusefi 2019-04-12 20:52:51 -04:00
parent 24733f586c
commit fe1f871a69
40 changed files with 118 additions and 118 deletions

View File

@ -7,7 +7,7 @@
#ifndef ADCCONFIGURATION_H_ #ifndef ADCCONFIGURATION_H_
#define ADCCONFIGURATION_H_ #define ADCCONFIGURATION_H_
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
class AdcDevice { class AdcDevice {
public: public:

View File

@ -17,7 +17,7 @@
#include "global.h" #include "global.h"
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
#include "engine.h" #include "engine.h"
#include "adc_inputs.h" #include "adc_inputs.h"
@ -207,7 +207,7 @@ void doSlowAdc(void) {
#endif /* EFI_INTERNAL_ADC */ #endif /* EFI_INTERNAL_ADC */
} }
#if HAL_USE_PWM || defined(__DOXYGEN__) #if HAL_USE_PWM
static void pwmpcb_slow(PWMDriver *pwmp) { static void pwmpcb_slow(PWMDriver *pwmp) {
(void) pwmp; (void) pwmp;
doSlowAdc(); doSlowAdc();
@ -215,7 +215,7 @@ static void pwmpcb_slow(PWMDriver *pwmp) {
static void pwmpcb_fast(PWMDriver *pwmp) { static void pwmpcb_fast(PWMDriver *pwmp) {
efiAssertVoid(CUSTOM_ERR_6659, getCurrentRemainingStack()> 32, "lwStAdcFast"); efiAssertVoid(CUSTOM_ERR_6659, getCurrentRemainingStack()> 32, "lwStAdcFast");
#if EFI_INTERNAL_ADC || defined(__DOXYGEN__) #if EFI_INTERNAL_ADC
(void) pwmp; (void) pwmp;
/* /*
@ -243,7 +243,7 @@ static void pwmpcb_fast(PWMDriver *pwmp) {
#endif /* HAL_USE_PWM */ #endif /* HAL_USE_PWM */
float getMCUInternalTemperature(void) { float getMCUInternalTemperature(void) {
#if defined(ADC_CHANNEL_SENSOR) || defined(__DOXYGEN__) #if defined(ADC_CHANNEL_SENSOR)
float TemperatureValue = adcToVolts(slowAdc.getAdcValueByHwChannel(ADC_CHANNEL_SENSOR)); float TemperatureValue = adcToVolts(slowAdc.getAdcValueByHwChannel(ADC_CHANNEL_SENSOR));
TemperatureValue -= 0.760; // Subtract the reference voltage at 25°C TemperatureValue -= 0.760; // Subtract the reference voltage at 25°C
TemperatureValue /= .0025; // Divide by slope 2.5mV TemperatureValue /= .0025; // Divide by slope 2.5mV
@ -281,7 +281,7 @@ int getInternalAdcValue(const char *msg, adc_channel_e hwChannel) {
return slowAdc.getAdcValueByHwChannel(hwChannel); return slowAdc.getAdcValueByHwChannel(hwChannel);
} }
#if HAL_USE_PWM || defined(__DOXYGEN__) #if HAL_USE_PWM
static PWMConfig pwmcfg_slow = { PWM_FREQ_SLOW, PWM_PERIOD_SLOW, pwmpcb_slow, { { static PWMConfig pwmcfg_slow = { PWM_FREQ_SLOW, PWM_PERIOD_SLOW, pwmpcb_slow, { {
PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL }, {
PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL } }, PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL } },
@ -509,7 +509,7 @@ void initAdcInputs(bool boardTestMode) {
// migrate to 'enable adcdebug' // migrate to 'enable adcdebug'
addConsoleActionI("adcdebug", &setAdcDebugReporting); addConsoleActionI("adcdebug", &setAdcDebugReporting);
#if EFI_INTERNAL_ADC || defined(__DOXYGEN__) #if EFI_INTERNAL_ADC
/* /*
* Initializes the ADC driver. * Initializes the ADC driver.
*/ */
@ -530,13 +530,13 @@ void initAdcInputs(bool boardTestMode) {
} }
} }
#if defined(ADC_CHANNEL_SENSOR) || defined(__DOXYGEN__) #if defined(ADC_CHANNEL_SENSOR)
// Internal temperature sensor, Available on ADC1 only // Internal temperature sensor, Available on ADC1 only
slowAdc.enableChannel((adc_channel_e)ADC_CHANNEL_SENSOR); slowAdc.enableChannel((adc_channel_e)ADC_CHANNEL_SENSOR);
#endif /* ADC_CHANNEL_SENSOR */ #endif /* ADC_CHANNEL_SENSOR */
slowAdc.init(); slowAdc.init();
#if HAL_USE_PWM || defined(__DOXYGEN__) #if HAL_USE_PWM
pwmStart(EFI_INTERNAL_SLOW_ADC_PWM, &pwmcfg_slow); pwmStart(EFI_INTERNAL_SLOW_ADC_PWM, &pwmcfg_slow);
pwmEnablePeriodicNotification(EFI_INTERNAL_SLOW_ADC_PWM); pwmEnablePeriodicNotification(EFI_INTERNAL_SLOW_ADC_PWM);
#endif /* HAL_USE_PWM */ #endif /* HAL_USE_PWM */
@ -546,7 +546,7 @@ void initAdcInputs(bool boardTestMode) {
/* /*
* Initializes the PWM driver. * Initializes the PWM driver.
*/ */
#if HAL_USE_PWM || defined(__DOXYGEN__) #if HAL_USE_PWM
pwmStart(EFI_INTERNAL_FAST_ADC_PWM, &pwmcfg_fast); pwmStart(EFI_INTERNAL_FAST_ADC_PWM, &pwmcfg_fast);
pwmEnablePeriodicNotification(EFI_INTERNAL_FAST_ADC_PWM); pwmEnablePeriodicNotification(EFI_INTERNAL_FAST_ADC_PWM);
#endif /* HAL_USE_PWM */ #endif /* HAL_USE_PWM */

View File

@ -12,7 +12,7 @@
#include "global.h" #include "global.h"
#include "adc_math.h" #include "adc_math.h"
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
const char * getAdcMode(adc_channel_e hwChannel); const char * getAdcMode(adc_channel_e hwChannel);
void initAdcInputs(bool boardTestMode); void initAdcInputs(bool boardTestMode);

View File

@ -8,7 +8,7 @@
uint32_t backupRamLoad(backup_ram_e idx) { uint32_t backupRamLoad(backup_ram_e idx) {
switch (idx) { switch (idx) {
#if HAL_USE_RTC || defined(__DOXYGEN__) #if HAL_USE_RTC
case BACKUP_STEPPER_POS: case BACKUP_STEPPER_POS:
return RTCD1.rtc->BKP0R & 0xffff; return RTCD1.rtc->BKP0R & 0xffff;
case BACKUP_IGNITION_SWITCH_COUNTER: case BACKUP_IGNITION_SWITCH_COUNTER:
@ -26,7 +26,7 @@ uint32_t backupRamLoad(backup_ram_e idx) {
void backupRamSave(backup_ram_e idx, uint32_t value) { void backupRamSave(backup_ram_e idx, uint32_t value) {
switch (idx) { switch (idx) {
#if HAL_USE_RTC || defined(__DOXYGEN__) #if HAL_USE_RTC
case BACKUP_STEPPER_POS: case BACKUP_STEPPER_POS:
RTCD1.rtc->BKP0R = (RTCD1.rtc->BKP0R & ~0x0000ffff) | (value & 0xffff); RTCD1.rtc->BKP0R = (RTCD1.rtc->BKP0R & ~0x0000ffff) | (value & 0xffff);
break; break;

View File

@ -23,7 +23,7 @@
#include "global.h" #include "global.h"
#if EFI_BOARD_TEST || defined(__DOXYGEN__) #if EFI_BOARD_TEST
#include "engine.h" #include "engine.h"
#include "board_test.h" #include "board_test.h"
#include "pin_repository.h" #include "pin_repository.h"
@ -38,7 +38,7 @@ static bool isTimeForNextStep(int copy) {
return copy != stepCoutner; return copy != stepCoutner;
} }
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
extern AdcDevice slowAdc; extern AdcDevice slowAdc;
extern AdcDevice fastAdc; extern AdcDevice fastAdc;
@ -148,7 +148,7 @@ bool isBoardTestMode(void) {
void printBoardTestState(void) { void printBoardTestState(void) {
print("Current index=%d\r\n", currentIndex); print("Current index=%d\r\n", currentIndex);
print("'n' for next step and 'set X' to return to step X\r\n"); print("'n' for next step and 'set X' to return to step X\r\n");
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
print("ADC count: slow %d/fast %d\r\n", slowAdc.size(), fastAdc.size()); print("ADC count: slow %d/fast %d\r\n", slowAdc.size(), fastAdc.size());
#endif #endif
@ -204,7 +204,7 @@ void initBoardTest(void) {
chThdCreateStatic(btThreadStack, sizeof(btThreadStack), NORMALPRIO, (tfunc_t)(void*) ivThread, NULL); chThdCreateStatic(btThreadStack, sizeof(btThreadStack), NORMALPRIO, (tfunc_t)(void*) ivThread, NULL);
// this code is ugly as hell, I had no time to think. Todo: refactor // this code is ugly as hell, I had no time to think. Todo: refactor
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
/** /**
* in board test mode all currently enabled ADC channels are running in slow mode * in board test mode all currently enabled ADC channels are running in slow mode
*/ */

View File

@ -11,7 +11,7 @@
#include "global.h" #include "global.h"
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT
#include "engine_configuration.h" #include "engine_configuration.h"
#include "pin_repository.h" #include "pin_repository.h"
@ -265,7 +265,7 @@ static msg_t canThread(void *arg) {
chThdSleepMilliseconds(engineConfiguration->canSleepPeriodMs); chThdSleepMilliseconds(engineConfiguration->canSleepPeriodMs);
} }
#if defined __GNUC__ || defined(__DOXYGEN__) #if defined __GNUC__
return -1; return -1;
#endif #endif
} }
@ -325,7 +325,7 @@ void initCan(void) {
if (!isCanEnabled) if (!isCanEnabled)
return; return;
#if STM32_CAN_USE_CAN2 || defined(__DOXYGEN__) #if STM32_CAN_USE_CAN2
// CAN1 is required for CAN2 // CAN1 is required for CAN2
canStart(&CAND1, &canConfig500); canStart(&CAND1, &canConfig500);
canStart(&CAND2, &canConfig500); canStart(&CAND2, &canConfig500);

View File

@ -41,7 +41,7 @@ void sendCanMessage();
void setCanType(int type); void setCanType(int type);
void setTxBit(int offset, int index); void setTxBit(int offset, int index);
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT
void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE); void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE);

View File

@ -7,7 +7,7 @@
#include "global.h" #include "global.h"
#if HAL_USE_PAL && EFI_PROD_CODE || defined(__DOXYGEN__) #if HAL_USE_PAL && EFI_PROD_CODE
#include "digital_input_exti.h" #include "digital_input_exti.h"
#include "efi_gpio.h" #include "efi_gpio.h"

View File

@ -10,7 +10,7 @@
#include "global.h" #include "global.h"
#if HAL_USE_PAL || defined(__DOXYGEN__) #if HAL_USE_PAL
void enableExti(brain_pin_e pin, uint32_t mode, palcallback_t cb); void enableExti(brain_pin_e pin, uint32_t mode, palcallback_t cb);
#endif /* HAL_USE_PAL */ #endif /* HAL_USE_PAL */

View File

@ -27,7 +27,7 @@
#include "digital_input_hw.h" #include "digital_input_hw.h"
#include "fl_stack.h" #include "fl_stack.h"
#if EFI_ICU_INPUTS || defined(__DOXYGEN__) #if EFI_ICU_INPUTS
#include "mpu_util.h" #include "mpu_util.h"
#include "eficonsole.h" #include "eficonsole.h"

View File

@ -10,7 +10,7 @@
#include "global.h" #include "global.h"
#if HAL_USE_ICU || defined(__DOXYGEN__) #if HAL_USE_ICU
#include "listener_array.h" #include "listener_array.h"

View File

@ -14,7 +14,7 @@
#include "global.h" #include "global.h"
#if EFI_TLE8888 || defined(__DOXYGEN__) #if EFI_TLE8888
/* to be removed */ /* to be removed */
#include "engine_configuration.h" #include "engine_configuration.h"
@ -27,7 +27,7 @@ EXTERN_CONFIG;
#include "gpio/tle8888.h" #include "gpio/tle8888.h"
#include "pin_repository.h" #include "pin_repository.h"
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) #if EFI_TUNER_STUDIO
#include "tunerstudio.h" #include "tunerstudio.h"
extern TunerStudioOutputChannels tsOutputChannels; extern TunerStudioOutputChannels tsOutputChannels;
#endif /* EFI_TUNER_STUDIO */ #endif /* EFI_TUNER_STUDIO */
@ -168,7 +168,7 @@ static int tle8888_spi_rw(struct tle8888_priv *chip, uint16_t tx, uint16_t *rx)
/* Ownership release. */ /* Ownership release. */
spiReleaseBus(spi); spiReleaseBus(spi);
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) #if EFI_TUNER_STUDIO
if (engineConfiguration->debugMode == DBG_TLE8888) { if (engineConfiguration->debugMode == DBG_TLE8888) {
tsOutputChannels.debugIntField1++; tsOutputChannels.debugIntField1++;
tsOutputChannels.debugIntField2 = tx; tsOutputChannels.debugIntField2 = tx;

View File

@ -9,7 +9,7 @@
#include "global.h" #include "global.h"
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__) #if EFI_INTERNAL_FLASH
#include "flash.h" #include "flash.h"
#include <string.h> #include <string.h>

View File

@ -10,7 +10,7 @@
/** /**
* @brief Number of sectors in the flash memory. * @brief Number of sectors in the flash memory.
*/ */
#if !defined(FLASH_SECTOR_COUNT) || defined(__DOXYGEN__) #if !defined(FLASH_SECTOR_COUNT)
#define FLASH_SECTOR_COUNT 12 #define FLASH_SECTOR_COUNT 12
#endif #endif
@ -42,9 +42,9 @@ extern "C" {
* 11 to program 64 bits per step * 11 to program 64 bits per step
*/ */
// Warning, flashdata_t must be unsigned!!! // Warning, flashdata_t must be unsigned!!!
#if defined(STM32F4XX) || defined(STM32F7XX) || defined(__DOXYGEN__) #if defined(STM32F4XX) || defined(STM32F7XX)
#define FLASH_CR_PSIZE_MASK FLASH_CR_PSIZE_0 | FLASH_CR_PSIZE_1 #define FLASH_CR_PSIZE_MASK FLASH_CR_PSIZE_0 | FLASH_CR_PSIZE_1
#if ((STM32_VDD >= 270) && (STM32_VDD <= 360)) || defined(__DOXYGEN__) #if ((STM32_VDD >= 270) && (STM32_VDD <= 360))
#define FLASH_CR_PSIZE_VALUE FLASH_CR_PSIZE_1 #define FLASH_CR_PSIZE_VALUE FLASH_CR_PSIZE_1
typedef uint32_t flashdata_t; typedef uint32_t flashdata_t;
#elif (STM32_VDD >= 240) && (STM32_VDD < 270) #elif (STM32_VDD >= 240) && (STM32_VDD < 270)

View File

@ -76,7 +76,7 @@ static mutex_t spiMtx;
// todo: rename this to 'rusefiMaxISRNesting' one day // todo: rename this to 'rusefiMaxISRNesting' one day
int maxNesting = 0; int maxNesting = 0;
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
extern bool isSpiInitialized[5]; extern bool isSpiInitialized[5];
/** /**
@ -118,17 +118,17 @@ SPIDriver * getSpiDevice(spi_device_e spiDevice) {
if (spiDevice == SPI_NONE) { if (spiDevice == SPI_NONE) {
return NULL; return NULL;
} }
#if STM32_SPI_USE_SPI1 || defined(__DOXYGEN__) #if STM32_SPI_USE_SPI1
if (spiDevice == SPI_DEVICE_1) { if (spiDevice == SPI_DEVICE_1) {
return &SPID1; return &SPID1;
} }
#endif #endif
#if STM32_SPI_USE_SPI2 || defined(__DOXYGEN__) #if STM32_SPI_USE_SPI2
if (spiDevice == SPI_DEVICE_2) { if (spiDevice == SPI_DEVICE_2) {
return &SPID2; return &SPID2;
} }
#endif #endif
#if STM32_SPI_USE_SPI3 || defined(__DOXYGEN__) #if STM32_SPI_USE_SPI3
if (spiDevice == SPI_DEVICE_3) { if (spiDevice == SPI_DEVICE_3) {
return &SPID3; return &SPID3;
} }
@ -138,7 +138,7 @@ SPIDriver * getSpiDevice(spi_device_e spiDevice) {
} }
#endif #endif
#if HAL_USE_I2C || defined(__DOXYGEN__) #if HAL_USE_I2C
#if defined(STM32F7XX) #if defined(STM32F7XX)
// values calculated with STM32CubeMX tool, 100kHz I2C clock for Nucleo-767 @168 MHz, PCK1=42MHz // values calculated with STM32CubeMX tool, 100kHz I2C clock for Nucleo-767 @168 MHz, PCK1=42MHz
#define HAL_I2C_F7_100_TIMINGR 0x00A0A3F7 #define HAL_I2C_F7_100_TIMINGR 0x00A0A3F7
@ -204,7 +204,7 @@ void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
#if EFI_MAP_AVERAGING #if EFI_MAP_AVERAGING
mapAveragingAdcCallback(fastAdc.samples[fastMapSampleIndex]); mapAveragingAdcCallback(fastAdc.samples[fastMapSampleIndex]);
#endif /* EFI_MAP_AVERAGING */ #endif /* EFI_MAP_AVERAGING */
#if EFI_HIP_9011 || defined(__DOXYGEN__) #if EFI_HIP_9011
if (CONFIGB(isHip9011Enabled)) { if (CONFIGB(isHip9011Enabled)) {
hipAdcCallback(fastAdc.samples[hipSampleIndex]); hipAdcCallback(fastAdc.samples[hipSampleIndex]);
} }
@ -237,7 +237,7 @@ static void adcConfigListener(Engine *engine) {
} }
void turnOnHardware(Logging *sharedLogger) { void turnOnHardware(Logging *sharedLogger) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT
turnOnTriggerInputPins(sharedLogger); turnOnTriggerInputPins(sharedLogger);
#endif /* EFI_SHAFT_POSITION_INPUT */ #endif /* EFI_SHAFT_POSITION_INPUT */
} }
@ -249,7 +249,7 @@ static void unregisterPin(brain_pin_e currentPin, brain_pin_e prevPin) {
} }
void stopSpi(spi_device_e device) { void stopSpi(spi_device_e device) {
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
if (!isSpiInitialized[device]) if (!isSpiInitialized[device])
return; // not turned on return; // not turned on
isSpiInitialized[device] = false; isSpiInitialized[device] = false;
@ -262,25 +262,25 @@ void stopSpi(spi_device_e device) {
void applyNewHardwareSettings(void) { void applyNewHardwareSettings(void) {
// all 'stop' methods need to go before we begin starting pins // all 'stop' methods need to go before we begin starting pins
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT
stopTriggerInputPins(); stopTriggerInputPins();
#endif /* EFI_SHAFT_POSITION_INPUT */ #endif /* EFI_SHAFT_POSITION_INPUT */
enginePins.stopInjectionPins(); enginePins.stopInjectionPins();
enginePins.stopIgnitionPins(); enginePins.stopIgnitionPins();
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT
stopCanPins(); stopCanPins();
#endif /* EFI_CAN_SUPPORT */ #endif /* EFI_CAN_SUPPORT */
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__) #if EFI_ELECTRONIC_THROTTLE_BODY
bool etbRestartNeeded = isETBRestartNeeded(); bool etbRestartNeeded = isETBRestartNeeded();
if (etbRestartNeeded) { if (etbRestartNeeded) {
stopETBPins(); stopETBPins();
} }
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */ #endif /* EFI_ELECTRONIC_THROTTLE_BODY */
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__) #if EFI_VEHICLE_SPEED
stopVSSPins(); stopVSSPins();
#endif /* EFI_VEHICLE_SPEED */ #endif /* EFI_VEHICLE_SPEED */
#if EFI_AUX_PID || defined(__DOXYGEN__) #if EFI_AUX_PID
stopAuxPins(); stopAuxPins();
#endif /* EFI_AUX_PID */ #endif /* EFI_AUX_PID */
@ -304,24 +304,24 @@ void applyNewHardwareSettings(void) {
enginePins.unregisterPins(); enginePins.unregisterPins();
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT
startTriggerInputPins(); startTriggerInputPins();
#endif /* EFI_SHAFT_POSITION_INPUT */ #endif /* EFI_SHAFT_POSITION_INPUT */
enginePins.startInjectionPins(); enginePins.startInjectionPins();
enginePins.startIgnitionPins(); enginePins.startIgnitionPins();
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT
startCanPins(); startCanPins();
#endif /* EFI_CAN_SUPPORT */ #endif /* EFI_CAN_SUPPORT */
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__) #if EFI_ELECTRONIC_THROTTLE_BODY
if (etbRestartNeeded) { if (etbRestartNeeded) {
startETBPins(); startETBPins();
} }
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */ #endif /* EFI_ELECTRONIC_THROTTLE_BODY */
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__) #if EFI_VEHICLE_SPEED
startVSSPins(); startVSSPins();
#endif /* EFI_VEHICLE_SPEED */ #endif /* EFI_VEHICLE_SPEED */
#if EFI_AUX_PID || defined(__DOXYGEN__) #if EFI_AUX_PID
startAuxPins(); startAuxPins();
#endif /* EFI_AUX_PID */ #endif /* EFI_AUX_PID */
@ -410,7 +410,7 @@ void initHardware(Logging *l) {
return; return;
} }
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT
initTriggerDecoder(); initTriggerDecoder();
#endif #endif
@ -426,11 +426,11 @@ void initHardware(Logging *l) {
isBoardTestMode_b = false; isBoardTestMode_b = false;
} }
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
initAdcInputs(isBoardTestMode_b); initAdcInputs(isBoardTestMode_b);
#endif #endif
#if EFI_BOARD_TEST || defined(__DOXYGEN__) #if EFI_BOARD_TEST
if (isBoardTestMode_b) { if (isBoardTestMode_b) {
// this method never returns // this method never returns
initBoardTest(); initBoardTest();
@ -452,7 +452,7 @@ void initHardware(Logging *l) {
// init_adc_mcp3208(&adcState, &SPID2); // init_adc_mcp3208(&adcState, &SPID2);
// requestAdcValue(&adcState, 0); // requestAdcValue(&adcState, 0);
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT
// todo: figure out better startup logic // todo: figure out better startup logic
initTriggerCentral(sharedLogger); initTriggerCentral(sharedLogger);
#endif /* EFI_SHAFT_POSITION_INPUT */ #endif /* EFI_SHAFT_POSITION_INPUT */
@ -460,7 +460,7 @@ void initHardware(Logging *l) {
turnOnHardware(sharedLogger); turnOnHardware(sharedLogger);
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
initSpiModules(boardConfiguration); initSpiModules(boardConfiguration);
#endif #endif
@ -475,27 +475,27 @@ void initHardware(Logging *l) {
initTle8888(PASS_ENGINE_PARAMETER_SIGNATURE); initTle8888(PASS_ENGINE_PARAMETER_SIGNATURE);
#endif #endif
#if EFI_HIP_9011 || defined(__DOXYGEN__) #if EFI_HIP_9011
initHip9011(sharedLogger); initHip9011(sharedLogger);
#endif /* EFI_HIP_9011 */ #endif /* EFI_HIP_9011 */
#if EFI_FILE_LOGGING || defined(__DOXYGEN__) #if EFI_FILE_LOGGING
initMmcCard(); initMmcCard();
#endif /* EFI_FILE_LOGGING */ #endif /* EFI_FILE_LOGGING */
#if EFI_MEMS || defined(__DOXYGEN__) #if EFI_MEMS
initAccelerometer(PASS_ENGINE_PARAMETER_SIGNATURE); initAccelerometer(PASS_ENGINE_PARAMETER_SIGNATURE);
#endif #endif
// initFixedLeds(); // initFixedLeds();
#if EFI_BOSCH_YAW || defined(__DOXYGEN__) #if EFI_BOSCH_YAW
initBoschYawRateSensor(); initBoschYawRateSensor();
#endif /* EFI_BOSCH_YAW */ #endif /* EFI_BOSCH_YAW */
// initBooleanInputs(); // initBooleanInputs();
#if EFI_UART_GPS || defined(__DOXYGEN__) #if EFI_UART_GPS
initGps(); initGps();
#endif #endif
@ -503,11 +503,11 @@ void initHardware(Logging *l) {
initServo(); initServo();
#endif #endif
#if ADC_SNIFFER || defined(__DOXYGEN__) #if ADC_SNIFFER
initAdcDriver(); initAdcDriver();
#endif #endif
#if HAL_USE_I2C || defined(__DOXYGEN__) #if HAL_USE_I2C
addConsoleActionII("i2c", sendI2Cbyte); addConsoleActionII("i2c", sendI2Cbyte);
#endif #endif
@ -525,7 +525,7 @@ void initHardware(Logging *l) {
// } // }
// } // }
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__) #if EFI_VEHICLE_SPEED
initVehicleSpeed(sharedLogger); initVehicleSpeed(sharedLogger);
#endif #endif
@ -533,7 +533,7 @@ void initHardware(Logging *l) {
cdmIonInit(); cdmIonInit();
#endif #endif
#if (HAL_USE_PAL && EFI_JOYSTICK) || defined(__DOXYGEN__) #if (HAL_USE_PAL && EFI_JOYSTICK)
initJoystick(sharedLogger); initJoystick(sharedLogger);
#endif /* HAL_USE_PAL && EFI_JOYSTICK */ #endif /* HAL_USE_PAL && EFI_JOYSTICK */
@ -546,7 +546,7 @@ void initHardware(Logging *l) {
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */ #endif /* EFI_PROD_CODE || EFI_SIMULATOR */
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
// this is F4 implementation but we will keep it here for now for simplicity // this is F4 implementation but we will keep it here for now for simplicity
int getSpiPrescaler(spi_speed_e speed, spi_device_e device) { int getSpiPrescaler(spi_speed_e speed, spi_device_e device) {
switch (speed) { switch (speed) {

View File

@ -10,7 +10,7 @@
#include "global.h" #include "global.h"
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
// Peripherial Clock 42MHz SPI2 SPI3 // Peripherial Clock 42MHz SPI2 SPI3
// Peripherial Clock 84MHz SPI1 SPI1 SPI2/3 // Peripherial Clock 84MHz SPI1 SPI1 SPI2/3

View File

@ -49,7 +49,7 @@
#include "pin_repository.h" #include "pin_repository.h"
#endif #endif
#if EFI_HIP_9011 || defined(__DOXYGEN__) #if EFI_HIP_9011
static NamedOutputPin intHold(HIP_NAME); static NamedOutputPin intHold(HIP_NAME);

View File

@ -21,7 +21,7 @@
EXTERN_ENGINE; EXTERN_ENGINE;
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__) #if EFI_ENGINE_CONTROL
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#endif /* EFI_ENGINE_CONTROL */ #endif /* EFI_ENGINE_CONTROL */
@ -111,7 +111,7 @@ iomode_t getInputMode(pin_input_mode_e mode) {
} }
} }
#if HAL_USE_ICU || defined(__DOXYGEN__) #if HAL_USE_ICU
void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config) { void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config) {
if (icup->state != ICU_STOP && icup->state != ICU_READY) { if (icup->state != ICU_STOP && icup->state != ICU_READY) {
static char icuError[30]; static char icuError[30];

View File

@ -51,13 +51,13 @@
// LED_HUGE_19, // LED_HUGE_19,
// LED_HUGE_20, // LED_HUGE_20,
#if EFI_GPIO_HARDWARE || defined(__DOXYGEN__) #if EFI_GPIO_HARDWARE
void efiSetPadMode(const char *msg, brain_pin_e pin, iomode_t mode); void efiSetPadMode(const char *msg, brain_pin_e pin, iomode_t mode);
bool efiReadPin(brain_pin_e pin); bool efiReadPin(brain_pin_e pin);
iomode_t getInputMode(pin_input_mode_e mode); iomode_t getInputMode(pin_input_mode_e mode);
#if HAL_USE_ICU || defined(__DOXYGEN__) #if HAL_USE_ICU
void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config); void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config);
#endif /* HAL_USE_ICU */ #endif /* HAL_USE_ICU */
#endif /* EFI_GPIO_HARDWARE */ #endif /* EFI_GPIO_HARDWARE */

View File

@ -11,7 +11,7 @@
#include "global.h" #include "global.h"
#include "engine_configuration.h" #include "engine_configuration.h"
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
void initMax31855(Logging *sharedLogger, spi_device_e device, egt_cs_array_t max31855_cs); void initMax31855(Logging *sharedLogger, spi_device_e device, egt_cs_array_t max31855_cs);
#endif /* HAL_USE_SPI */ #endif /* HAL_USE_SPI */

View File

@ -8,7 +8,7 @@
#include "global.h" #include "global.h"
#if EFI_MCP_3208 || defined(__DOXYGEN__) #if EFI_MCP_3208
#include "mcp3208.h" #include "mcp3208.h"
#include "pin_repository.h" #include "pin_repository.h"

View File

@ -18,7 +18,7 @@
#include "global.h" #include "global.h"
#if EFI_MCP_3208 || defined(__DOXYGEN__) #if EFI_MCP_3208
#define MCP3208_CS_PORT GPIOD #define MCP3208_CS_PORT GPIOD
#define MCP3208_CS_PIN 11 #define MCP3208_CS_PIN 11

View File

@ -18,7 +18,7 @@
// https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fInterrupt%20on%20CEN%20bit%20setting%20in%20TIM7&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=474 // https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fInterrupt%20on%20CEN%20bit%20setting%20in%20TIM7&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=474
#if (EFI_PROD_CODE && HAL_USE_GPT) || defined(__DOXYGEN__) #if EFI_PROD_CODE && HAL_USE_GPT
#include "periodic_controller.h" #include "periodic_controller.h"

View File

@ -14,7 +14,7 @@
#include "global.h" #include "global.h"
#if EFI_FILE_LOGGING || defined(__DOXYGEN__) #if EFI_FILE_LOGGING
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -16,7 +16,7 @@
#include <time.h> #include <time.h>
#include "global.h" #include "global.h"
#if EFI_UART_GPS || defined(__DOXYGEN__) #if EFI_UART_GPS
#include "console_io.h" #include "console_io.h"
#include "eficonsole.h" #include "eficonsole.h"

View File

@ -17,7 +17,7 @@ ioportid_t PORTS[] = { GPIOA, GPIOB, GPIOC, GPIOD, GPIOF};
#endif /* defined(STM32F4XX) || defined(STM32F7XX) */ #endif /* defined(STM32F4XX) || defined(STM32F7XX) */
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
// ADC_CHANNEL_IN0 // PA0 // ADC_CHANNEL_IN0 // PA0
// ADC_CHANNEL_IN1 // PA1 // ADC_CHANNEL_IN1 // PA1

View File

@ -60,7 +60,7 @@ extern uint32_t CSTACK$$Base; /* symbol created by the IAR linker */
extern uint32_t IRQSTACK$$Base; /* symbol created by the IAR linker */ extern uint32_t IRQSTACK$$Base; /* symbol created by the IAR linker */
int getRemainingStack(thread_t *otp) { int getRemainingStack(thread_t *otp) {
#if CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__) #if CH_DBG_ENABLE_STACK_CHECK
int remainingStack; int remainingStack;
if (ch.dbg.isr_cnt > 0) { if (ch.dbg.isr_cnt > 0) {
remainingStack = (__get_SP() - sizeof(port_intctx)) - (int)&IRQSTACK$$Base; remainingStack = (__get_SP() - sizeof(port_intctx)) - (int)&IRQSTACK$$Base;
@ -217,7 +217,7 @@ void HardFaultVector(void) {
} }
} }
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
bool isSpiInitialized[5] = { false, false, false, false, false }; bool isSpiInitialized[5] = { false, false, false, false, false };
static int getSpiAf(SPIDriver *driver) { static int getSpiAf(SPIDriver *driver) {
@ -386,7 +386,7 @@ BOR_Result_t BOR_Set(BOR_Level_t BORValue) {
return BOR_Result_Ok; return BOR_Result_Ok;
} }
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT
static bool isValidCan1RxPin(brain_pin_e pin) { static bool isValidCan1RxPin(brain_pin_e pin) {
return pin == GPIOA_11 || pin == GPIOB_8 || pin == GPIOD_0; return pin == GPIOA_11 || pin == GPIOB_8 || pin == GPIOD_0;

View File

@ -58,7 +58,7 @@ extern uint32_t CSTACK$$Base; /* symbol created by the IAR linker */
extern uint32_t IRQSTACK$$Base; /* symbol created by the IAR linker */ extern uint32_t IRQSTACK$$Base; /* symbol created by the IAR linker */
int getRemainingStack(thread_t *otp) { int getRemainingStack(thread_t *otp) {
#if CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__) #if CH_DBG_ENABLE_STACK_CHECK
int remainingStack; int remainingStack;
if (ch.dbg.isr_cnt > 0) { if (ch.dbg.isr_cnt > 0) {
remainingStack = (__get_SP() - sizeof(port_intctx)) - (int)&IRQSTACK$$Base; remainingStack = (__get_SP() - sizeof(port_intctx)) - (int)&IRQSTACK$$Base;
@ -212,7 +212,7 @@ void HardFaultVector(void) {
} }
} }
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
bool isSpiInitialized[5] = { false, false, false, false, false }; bool isSpiInitialized[5] = { false, false, false, false, false };
static int getSpiAf(SPIDriver *driver) { static int getSpiAf(SPIDriver *driver) {
@ -375,7 +375,7 @@ BOR_Result_t BOR_Set(BOR_Level_t BORValue) {
return BOR_Result_Ok; return BOR_Result_Ok;
} }
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT
static bool isValidCan1RxPin(brain_pin_e pin) { static bool isValidCan1RxPin(brain_pin_e pin) {
return pin == GPIOA_11 || pin == GPIOB_8 || pin == GPIOD_0; return pin == GPIOA_11 || pin == GPIOB_8 || pin == GPIOD_0;

View File

@ -86,7 +86,7 @@ void HardFaultVector(void);
#endif /* MPU_UTIL_H_ */ #endif /* MPU_UTIL_H_ */
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso, void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
brain_pin_e mosi, brain_pin_e mosi,
int sckMode, int sckMode,
@ -98,7 +98,7 @@ void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin); void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin);
#endif /* HAL_USE_SPI */ #endif /* HAL_USE_SPI */
#if HAL_USE_CAN || defined(__DOXYGEN__) #if HAL_USE_CAN
bool isValidCanTxPin(brain_pin_e pin); bool isValidCanTxPin(brain_pin_e pin);
bool isValidCanRxPin(brain_pin_e pin); bool isValidCanRxPin(brain_pin_e pin);
CANDriver * detectCanDevice(brain_pin_e pinRx, brain_pin_e pinTx); CANDriver * detectCanDevice(brain_pin_e pinRx, brain_pin_e pinTx);

View File

@ -12,7 +12,7 @@
#include "rfiutil.h" #include "rfiutil.h"
#include "rtc_helper.h" #include "rtc_helper.h"
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
static LoggingWithStorage logger("RTC"); static LoggingWithStorage logger("RTC");
static RTCDateTime timespec; static RTCDateTime timespec;
@ -22,21 +22,21 @@ extern bool rtcWorks;
void date_set_tm(struct tm *timp) { void date_set_tm(struct tm *timp) {
(void)timp; (void)timp;
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
rtcConvertStructTmToDateTime(timp, 0, &timespec); rtcConvertStructTmToDateTime(timp, 0, &timespec);
rtcSetTime(&RTCD1, &timespec); rtcSetTime(&RTCD1, &timespec);
#endif /* EFI_RTC */ #endif /* EFI_RTC */
} }
void date_get_tm(struct tm *timp) { void date_get_tm(struct tm *timp) {
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
rtcGetTime(&RTCD1, &timespec); rtcGetTime(&RTCD1, &timespec);
rtcConvertDateTimeToStructTm(&timespec, timp, NULL); rtcConvertDateTimeToStructTm(&timespec, timp, NULL);
#endif /* EFI_RTC */ #endif /* EFI_RTC */
} }
static time_t GetTimeUnixSec(void) { static time_t GetTimeUnixSec(void) {
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
struct tm tim; struct tm tim;
rtcGetTime(&RTCD1, &timespec); rtcGetTime(&RTCD1, &timespec);
@ -48,7 +48,7 @@ static time_t GetTimeUnixSec(void) {
} }
static void SetTimeUnixSec(time_t unix_time) { static void SetTimeUnixSec(time_t unix_time) {
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
struct tm tim; struct tm tim;
#if defined __GNUC__ #if defined __GNUC__
@ -84,7 +84,7 @@ static void put2(int offset, char *lcd_str, int value) {
* @return true if we seem to know current date, false if no valid RTC state * @return true if we seem to know current date, false if no valid RTC state
*/ */
bool dateToStringShort(char *lcd_str) { bool dateToStringShort(char *lcd_str) {
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
strcpy(lcd_str, "0000_000000\0"); strcpy(lcd_str, "0000_000000\0");
struct tm timp; struct tm timp;
date_get_tm(&timp); date_get_tm(&timp);
@ -107,7 +107,7 @@ bool dateToStringShort(char *lcd_str) {
} }
void dateToString(char *lcd_str) { void dateToString(char *lcd_str) {
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
// todo: // todo:
// re-implement this along the lines of chvprintf("%04u-%02u-%02u %02u:%02u:%02u\r\n", timp.tm_year + 1900, timp.tm_mon + 1, timp.tm_mday, timp.tm_hour, // re-implement this along the lines of chvprintf("%04u-%02u-%02u %02u:%02u:%02u\r\n", timp.tm_year + 1900, timp.tm_mon + 1, timp.tm_mday, timp.tm_hour,
// timp.tm_min, timp.tm_sec); // timp.tm_min, timp.tm_sec);
@ -128,7 +128,7 @@ void dateToString(char *lcd_str) {
#endif /* EFI_RTC */ #endif /* EFI_RTC */
} }
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
void printDateTime(void) { void printDateTime(void) {
static time_t unix_time; static time_t unix_time;
struct tm timp; struct tm timp;
@ -162,7 +162,7 @@ void setDateTime(const char *strDate) {
#endif /* EFI_RTC */ #endif /* EFI_RTC */
void initRtc(void) { void initRtc(void) {
#if EFI_RTC || defined(__DOXYGEN__) #if EFI_RTC
GetTimeUnixSec(); // this would test RTC, see 'rtcWorks' variable, see #311 GetTimeUnixSec(); // this would test RTC, see 'rtcWorks' variable, see #311
printMsg(&logger, "initRtc()"); printMsg(&logger, "initRtc()");
#endif /* EFI_RTC */ #endif /* EFI_RTC */

View File

@ -21,7 +21,7 @@
EXTERN_ENGINE; EXTERN_ENGINE;
#if EFI_MEMS || defined(__DOXYGEN__) #if EFI_MEMS
#include "mpu_util.h" #include "mpu_util.h"
#include "lis302dl.h" #include "lis302dl.h"
#include "periodic_controller.h" #include "periodic_controller.h"
@ -53,7 +53,7 @@ void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
#if EFI_MEMS || defined(__DOXYGEN__) #if EFI_MEMS
static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE); static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE);
@ -78,7 +78,7 @@ void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
if (!CONFIGB(is_enabled_spi_1)) if (!CONFIGB(is_enabled_spi_1))
return; // temporary return; // temporary
#if HAL_USE_SPI || defined(__DOXYGEN__) #if HAL_USE_SPI
driver = getSpiDevice(engineConfiguration->accelerometerSpiDevice); driver = getSpiDevice(engineConfiguration->accelerometerSpiDevice);
if (driver == NULL) { if (driver == NULL) {
// error already reported // error already reported

View File

@ -11,7 +11,7 @@
#include "pwm_generator.h" #include "pwm_generator.h"
#include "rpm_calculator.h" #include "rpm_calculator.h"
#if (EFI_CJ125 && HAL_USE_SPI) || defined(__DOXYGEN__) #if EFI_CJ125 && HAL_USE_SPI
// looks like 3v range should be enough, divider not needed // looks like 3v range should be enough, divider not needed
#define EFI_CJ125_DIRECTLY_CONNECTED_UR TRUE #define EFI_CJ125_DIRECTLY_CONNECTED_UR TRUE
@ -70,7 +70,7 @@ static const float cjLSULambda[2][CJ125_LSU_CURVE_SIZE] = { {
static int cjReadRegister(unsigned char regAddr) { static int cjReadRegister(unsigned char regAddr) {
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__) #if ! EFI_UNIT_TEST
spiSelect(driver); spiSelect(driver);
tx_buff[0] = regAddr; tx_buff[0] = regAddr;
spiSend(driver, 1, tx_buff); spiSend(driver, 1, tx_buff);
@ -225,7 +225,7 @@ static void cjCalibrate(void) {
cjUpdateAnalogValues(); cjUpdateAnalogValues();
cjPrintData(); cjPrintData();
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) #if EFI_TUNER_STUDIO
if (engineConfiguration->debugMode == DBG_CJ125) { if (engineConfiguration->debugMode == DBG_CJ125) {
cjPostState(&tsOutputChannels); cjPostState(&tsOutputChannels);
} }
@ -456,7 +456,7 @@ static msg_t cjThread(void)
return -1; return -1;
} }
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__) #if ! EFI_UNIT_TEST
static bool cjCheckConfig(void) { static bool cjCheckConfig(void) {
if (!CONFIGB(isCJ125Enabled)) { if (!CONFIGB(isCJ125Enabled)) {
scheduleMsg(logger, "cj125 is disabled. Failed!"); scheduleMsg(logger, "cj125 is disabled. Failed!");
@ -519,7 +519,7 @@ bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
return globalInstance.isValidState(); return globalInstance.isValidState();
} }
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) #if EFI_TUNER_STUDIO
// used by DBG_CJ125 // used by DBG_CJ125
void cjPostState(TunerStudioOutputChannels *tsOutputChannels) { void cjPostState(TunerStudioOutputChannels *tsOutputChannels) {
tsOutputChannels->debugFloatField1 = globalInstance.heaterDuty; tsOutputChannels->debugFloatField1 = globalInstance.heaterDuty;

View File

@ -99,7 +99,7 @@
#define CJ125_AFR_NAN 0.0f #define CJ125_AFR_NAN 0.0f
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) #if EFI_TUNER_STUDIO
void cjPostState(TunerStudioOutputChannels *tsOutputChannels); void cjPostState(TunerStudioOutputChannels *tsOutputChannels);
#endif /* EFI_TUNER_STUDIO */ #endif /* EFI_TUNER_STUDIO */

View File

@ -18,7 +18,7 @@
#include "engine.h" #include "engine.h"
#if (HAL_USE_PAL && EFI_JOYSTICK) || defined(__DOXYGEN__) #if (HAL_USE_PAL && EFI_JOYSTICK)
#include "joystick.h" #include "joystick.h"
#include "pin_repository.h" #include "pin_repository.h"
#include "digital_input_exti.h" #include "digital_input_exti.h"
@ -74,7 +74,7 @@ static void extCallback(int channel) {
// unexpected channel // unexpected channel
return; return;
} }
#if EFI_HD44780_LCD || defined(__DOXYGEN__) #if EFI_HD44780_LCD
onJoystick(button); onJoystick(button);
#else #else
UNUSED(button); UNUSED(button);

View File

@ -19,7 +19,7 @@
#include "yaw_rate_sensor.h" #include "yaw_rate_sensor.h"
#if EFI_BOSCH_YAW || defined(__DOXYGEN__) #if EFI_BOSCH_YAW
EXTERN_ENGINE; EXTERN_ENGINE;

View File

@ -16,7 +16,7 @@
#include "global.h" #include "global.h"
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__) #if HAL_USE_SERIAL_USB
/* Virtual serial port over USB.*/ /* Virtual serial port over USB.*/
SerialUSBDriver SDU1; SerialUSBDriver SDU1;

View File

@ -8,7 +8,7 @@
#include "global.h" #include "global.h"
#if EFI_USB_SERIAL || defined(__DOXYGEN__) #if EFI_USB_SERIAL
#include "usbconsole.h" #include "usbconsole.h"
#include "usbcfg.h" #include "usbcfg.h"

View File

@ -23,13 +23,13 @@ static Logging *logger;
static void saveStepperPos(int pos) { static void saveStepperPos(int pos) {
// use backup-power RTC registers to store the data // use backup-power RTC registers to store the data
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE
backupRamSave(BACKUP_STEPPER_POS, pos + 1); backupRamSave(BACKUP_STEPPER_POS, pos + 1);
#endif #endif
} }
static int loadStepperPos() { static int loadStepperPos() {
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE
return (int)backupRamLoad(BACKUP_STEPPER_POS) - 1; return (int)backupRamLoad(BACKUP_STEPPER_POS) - 1;
#else #else
return 0; return 0;
@ -42,11 +42,11 @@ static msg_t stThread(StepperMotor *motor) {
// try to get saved stepper position (-1 for no data) // try to get saved stepper position (-1 for no data)
motor->currentPosition = loadStepperPos(); motor->currentPosition = loadStepperPos();
#if HAL_USE_ADC || defined(__DOXYGEN__) #if HAL_USE_ADC
// first wait until at least 1 slowADC sampling is complete // first wait until at least 1 slowADC sampling is complete
waitForSlowAdc(); waitForSlowAdc();
#endif #endif
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT
bool isRunning = engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE); bool isRunning = engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE);
#else #else
bool isRunning = false; bool isRunning = false;
@ -100,7 +100,7 @@ static msg_t stThread(StepperMotor *motor) {
} }
motor->pulse(); motor->pulse();
// save position to backup RTC register // save position to backup RTC register
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE
saveStepperPos(motor->currentPosition); saveStepperPos(motor->currentPosition);
#endif #endif
} }
@ -171,7 +171,7 @@ void StepperMotor::initialize(brain_pin_e stepPin, brain_pin_e directionPin, pin
return; return;
} }
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE
stepPort = getHwPort("step", stepPin); stepPort = getHwPort("step", stepPin);
this->stepPin = getHwPin("step", stepPin); this->stepPin = getHwPin("step", stepPin);
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */
@ -179,7 +179,7 @@ void StepperMotor::initialize(brain_pin_e stepPin, brain_pin_e directionPin, pin
this->directionPinMode = directionPinMode; this->directionPinMode = directionPinMode;
this->directionPin.initPin("stepper dir", directionPin, &this->directionPinMode); this->directionPin.initPin("stepper dir", directionPin, &this->directionPinMode);
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE
enablePort = getHwPort("enable", enablePin); enablePort = getHwPort("enable", enablePin);
this->enablePin = getHwPin("enable", enablePin); this->enablePin = getHwPin("enable", enablePin);
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */

View File

@ -14,7 +14,7 @@
#include "global.h" #include "global.h"
#if (EFI_SHAFT_POSITION_INPUT && (HAL_USE_PAL == TRUE || HAL_USE_ICU == TRUE)) || defined(__DOXYGEN__) #if EFI_SHAFT_POSITION_INPUT && (HAL_USE_PAL == TRUE || HAL_USE_ICU == TRUE)
#include "trigger_input.h" #include "trigger_input.h"
#include "digital_input_hw.h" #include "digital_input_hw.h"

View File

@ -7,7 +7,7 @@
#include "vehicle_speed.h" #include "vehicle_speed.h"
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__) #if EFI_VEHICLE_SPEED
#include "engine.h" #include "engine.h"
#include "digital_input_hw.h" #include "digital_input_hw.h"