better conditional compilation
This commit is contained in:
parent
565d5c22db
commit
7582f8d8cf
|
@ -18,11 +18,11 @@
|
|||
|
||||
#include "accelerometer.h"
|
||||
#include "hardware.h"
|
||||
#include "mpu_util.h"
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
#if EFI_MEMS || defined(__DOXYGEN__)
|
||||
#include "mpu_util.h"
|
||||
#include "lis302dl.h"
|
||||
|
||||
static SPIDriver *driver;
|
||||
|
|
|
@ -21,8 +21,10 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "engine.h"
|
||||
#include "global.h"
|
||||
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
#include "engine.h"
|
||||
#include "board_test.h"
|
||||
#include "pin_repository.h"
|
||||
#include "efiGpio.h"
|
||||
|
@ -229,3 +231,4 @@ void initBoardTest(void) {
|
|||
chThdSleepSeconds(1);
|
||||
}
|
||||
}
|
||||
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
#ifndef CAN_HW_H_
|
||||
#define CAN_HW_H_
|
||||
|
||||
#include "efifeatures.h"
|
||||
#if EFI_TUNER_STUDIO
|
||||
#include "tunerstudio_configuration.h"
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
// CAN Bus ID for broadcast
|
||||
/**
|
||||
|
@ -33,13 +36,16 @@
|
|||
#define CAN_VAG_CLT 0x289
|
||||
|
||||
void initCan(void);
|
||||
void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void commonTxInit(int eid);
|
||||
void sendCanMessage();
|
||||
void setCanType(int type);
|
||||
void setTxBit(int offset, int index);
|
||||
|
||||
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__)
|
||||
void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void postCanState(TunerStudioOutputChannels *tsOutputChannels);
|
||||
#endif
|
||||
|
||||
#endif /* CAN_HW_H_ */
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
|
||||
#include "cdm_ion_sense.h"
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
void ionPostState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
#define HW_LAYER_CDM_ION_SENSE_H_
|
||||
|
||||
#include "global.h"
|
||||
#include "tunerstudio_configuration.h"
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
#include "tunerstudio_configuration.h"
|
||||
void ionPostState(TunerStudioOutputChannels *tsOutputChannels);
|
||||
#endif
|
||||
|
||||
#endif /* HW_LAYER_CDM_ION_SENSE_H_ */
|
||||
|
|
|
@ -12,12 +12,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "pwm_generator.h"
|
||||
#include "global.h"
|
||||
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
#include "pwm_generator.h"
|
||||
#include "pin_repository.h"
|
||||
#include "datalogging.h"
|
||||
|
||||
|
||||
void initPwmGenerator(void) {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -12,9 +12,12 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2018
|
||||
*/
|
||||
|
||||
#include "engine.h"
|
||||
|
||||
// todo: EFI_SERVO macro
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
#include "servo.h"
|
||||
#include "pin_repository.h"
|
||||
#include "engine.h"
|
||||
|
||||
// todo: remove this hack once we have next incompatible configuration change
|
||||
#define TEMP_FOR_COMPATIBILITY GPIOA_0
|
||||
|
@ -81,5 +84,5 @@ void initServo(void) {
|
|||
|
||||
chThdCreateStatic(seThreadStack, sizeof(seThreadStack), NORMALPRIO, (tfunc_t)(void*) seThread, NULL);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2018
|
||||
*/
|
||||
|
||||
#include "engine.h"
|
||||
|
||||
// todo: EFI_STEPPER macro
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
#include "stepper.h"
|
||||
#include "pin_repository.h"
|
||||
#include "engine.h"
|
||||
#include "tps.h"
|
||||
#include "engine_controller.h"
|
||||
#include "adc_inputs.h"
|
||||
|
@ -181,3 +184,4 @@ void StepperMotor::initialize(brain_pin_e stepPin, brain_pin_e directionPin, pin
|
|||
chThdCreateStatic(stThreadStack, sizeof(stThreadStack), NORMALPRIO, (tfunc_t)(void*) stThread, this);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
|
||||
#if (EFI_SHAFT_POSITION_INPUT && EFI_PROD_CODE) || defined(__DOXYGEN__)
|
||||
|
||||
#include "trigger_input.h"
|
||||
#include "digital_input_hw.h"
|
||||
|
@ -193,4 +193,4 @@ void applyNewTriggerInputPins(void) {
|
|||
rememberPrimaryChannel();
|
||||
}
|
||||
|
||||
#endif /* EFI_SHAFT_POSITION_INPUT */
|
||||
#endif /* EFI_SHAFT_POSITION_INPUT && EFI_PROD_CODE */
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#define EFI_HIP_9011 TRUE
|
||||
#define EFI_CJ125 TRUE
|
||||
#define EFI_CAN_SUPPORT FALSE
|
||||
#define EFI_MAX_31855 FALSE
|
||||
#define EFI_ELECTRONIC_THROTTLE_BODY FALSE
|
||||
#define EFI_AUX_PID FALSE
|
||||
#define EFI_HAS_RESET FALSE
|
||||
|
|
Loading…
Reference in New Issue