Hellen says fix cypress build (#1818)
* fix compilation * fresh generated files * more files Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
This commit is contained in:
parent
1491a0c229
commit
6e5a3fbbe9
|
@ -22,6 +22,6 @@ BOARDSRC_CPP += $(CONTROLLERS_ALGO_AUTO_GENERATED_ENUMS)
|
|||
# Define linker script file here
|
||||
LDSCRIPT= $(STARTUPLD)/cypress_S6E2CxAH.ld
|
||||
|
||||
PLATFORMSRC += $(PLATFORMSRC_CONTRIB)
|
||||
PLATFORMINC += $(PLATFORMINC_CONTRIB)
|
||||
#PLATFORMSRC += $(PLATFORMSRC_CONTRIB)
|
||||
#PLATFORMINC += $(PLATFORMINC_CONTRIB)
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ void setBoardConfigurationOverrides(void) {
|
|||
|
||||
engineConfiguration->isEngineChartEnabled = false;
|
||||
|
||||
engineConfiguration->consoleLoopPeriodMs = 200;
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
|
|
|
@ -58,41 +58,7 @@
|
|||
#endif /* EFI_CLOCK_LOCKS */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
#ifndef __ASSEMBLER__
|
||||
#if EFI_CLOCK_LOCKS
|
||||
void irqEnterHook(void);
|
||||
void irqExitHook(void);
|
||||
#else /* EFI_CLOCK_LOCKS */
|
||||
#define irqEnterHook() {}
|
||||
#define irqExitHook() {}
|
||||
#endif /*EFI_CLOCK_LOCKS */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if EFI_CLOCK_LOCKS
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
#ifndef __ASSEMBLER__
|
||||
void onLockHook(void);
|
||||
void onUnlockHook(void);
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#define ON_LOCK_HOOK onLockHook()
|
||||
#define ON_UNLOCK_HOOK onUnlockHook()
|
||||
#else /* EFI_CLOCK_LOCKS */
|
||||
#define ON_LOCK_HOOK
|
||||
#define ON_UNLOCK_HOOK
|
||||
#endif /* EFI_CLOCK_LOCKS */
|
||||
#include "chconf_common.h"
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
|
@ -676,26 +642,6 @@ extern "C"
|
|||
/* Add threads initialization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Threads descriptor structure extension.
|
||||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
void *activeStack; \
|
||||
int remainingStack; \
|
||||
/* Add threads custom fields here.*/
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
* @details User initialization code added to the @p chThdInit() API.
|
||||
*
|
||||
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||
* the threads creation APIs.
|
||||
*/
|
||||
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||
/* Add threads initialization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Threads finalization hook.
|
||||
* @details User finalization code added to the @p chThdExit() API.
|
||||
|
@ -708,30 +654,6 @@ extern "C"
|
|||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
/* Context switch code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
irqEnterHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
irqExitHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
|
@ -807,9 +729,9 @@ void chDbgPanic3(const char *msg, const char * file, int line);
|
|||
* so that it would not crash the error handler in case of stack issues
|
||||
*/
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
#define hasFatalError() (ch.dbg.panic_msg != NULL)
|
||||
#define hasOsPanicError() (ch.dbg.panic_msg != NULL)
|
||||
#else
|
||||
#define hasFatalError() (FALSE)
|
||||
#define hasOsPanicError() (FALSE)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,36 +1,3 @@
|
|||
@echo off
|
||||
|
||||
rem This batch files reads rusefi_config.txt and produses firmware persistent configuration headers
|
||||
rem the storage section of rusefi.ini is updated as well
|
||||
|
||||
cd ../../../../..
|
||||
|
||||
pwd
|
||||
|
||||
java ^
|
||||
-DSystemOut.name=gen_config ^
|
||||
-cp ../java_tools/ConfigDefinition.jar;../java_tools/configuration_definition/lib/snakeyaml.jar ^
|
||||
com.rusefi.board_generator.BoardReader ^
|
||||
-board hellen/cypress ^
|
||||
-firmware_path . ^
|
||||
-out config/boards/hellen/cypress/config/tunerstudio ^
|
||||
-enumInputFile controllers/algo/rusefi_enums.h ^
|
||||
-enumInputFile config/boards/hellen/cypress/rusefi_hw_enums.h
|
||||
|
||||
mkdir build_cypress
|
||||
|
||||
java ^
|
||||
-DSystemOut.name=gen_config ^
|
||||
-Drusefi.generator.lazyfile.enabled=true ^
|
||||
-jar ../java_tools/ConfigDefinition.jar ^
|
||||
-definition integration/rusefi_config.txt ^
|
||||
-ts_destination tunerstudio ^
|
||||
-with_c_defines false ^
|
||||
-initialize_to_zero false ^
|
||||
-ts_output_name rusefi_cypress.ini ^
|
||||
-c_defines config/boards/hellen/cypress/config/controllers/algo/rusefi_generated.h ^
|
||||
-c_destination config/boards/hellen/cypress/config/controllers/algo/engine_configuration_generated_structures.h ^
|
||||
-prepend config/boards/hellen/cypress/config/rusefi_config_cypress.txt ^
|
||||
-prepend config/boards/hellen/cypress/config/tunerstudio/cypress_prefix.txt ^
|
||||
-skip build_cypress/config.gen
|
||||
|
||||
sh.exe gen_config.sh
|
|
@ -1,12 +0,0 @@
|
|||
@echo off
|
||||
|
||||
rem This batch files reads rusefi_enums.h and produses auto_generated_enums.* files
|
||||
|
||||
cd ../../../../..
|
||||
|
||||
java -jar ../java_tools/enum2string.jar ^
|
||||
-inputPath . ^
|
||||
-outputPath config/boards/hellen/cypress/config/controllers/algo ^
|
||||
-enumInputFile controllers/algo/rusefi_enums.h ^
|
||||
-enumInputFile config/boards/hellen/cypress/rusefi_hw_enums.h ^
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
#include "global.h"
|
||||
#include "rusefi_enums.h"
|
||||
#include "rusefi_hw_enums.h"
|
||||
// was generated automatically by rusEfi tool from rusefi_hw_enums.h
|
||||
// was generated automatically by rusEfi tool from rusefi_enums.h
|
||||
// by enum2string.jar tool
|
||||
// on Sun May 10 15:34:04 EEST 2020
|
||||
// was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Thu Sep 17 10:01:50 EEST 2020
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -125,10 +122,27 @@ case Force_4_bytes_size_adc_channel_mode:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getAfr_override_e(afr_override_e value){
|
||||
switch(value) {
|
||||
case AFR_AccPedal:
|
||||
return "AFR_AccPedal";
|
||||
case AFR_CylFilling:
|
||||
return "AFR_CylFilling";
|
||||
case AFR_MAP:
|
||||
return "AFR_MAP";
|
||||
case AFR_None:
|
||||
return "AFR_None";
|
||||
case AFR_Tps:
|
||||
return "AFR_Tps";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getAir_pressure_sensor_type_e(air_pressure_sensor_type_e value){
|
||||
switch(value) {
|
||||
case Force_4_bytes_size_cranking_map_type:
|
||||
return "Force_4_bytes_size_cranking_map_type";
|
||||
case MT_BOSCH_2_5:
|
||||
return "MT_BOSCH_2_5";
|
||||
case MT_CUSTOM:
|
||||
return "MT_CUSTOM";
|
||||
case MT_DENSO183:
|
||||
|
@ -139,6 +153,8 @@ case MT_GM_3_BAR:
|
|||
return "MT_GM_3_BAR";
|
||||
case MT_HONDA3BAR:
|
||||
return "MT_HONDA3BAR";
|
||||
case MT_MAZDA_1_BAR:
|
||||
return "MT_MAZDA_1_BAR";
|
||||
case MT_MPX4100:
|
||||
return "MT_MPX4100";
|
||||
case MT_MPX4250:
|
||||
|
@ -152,6 +168,47 @@ case MT_TOYOTA_89420_02010:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getAntiLagActivationMode_e(antiLagActivationMode_e value){
|
||||
switch(value) {
|
||||
case ALWAYS_ON_ANTILAG:
|
||||
return "ALWAYS_ON_ANTILAG";
|
||||
case Force_4bytes_size_antiLagActivationMode_e:
|
||||
return "Force_4bytes_size_antiLagActivationMode_e";
|
||||
case SWITCH_INPUT_ANTILAG:
|
||||
return "SWITCH_INPUT_ANTILAG";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getBoostType_e(boostType_e value){
|
||||
switch(value) {
|
||||
case CLOSED_LOOP:
|
||||
return "CLOSED_LOOP";
|
||||
case Force_4bytes_size_boostType_e:
|
||||
return "Force_4bytes_size_boostType_e";
|
||||
case OPEN_LOOP:
|
||||
return "OPEN_LOOP";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getBrain_pin_diag_e(brain_pin_diag_e value){
|
||||
switch(value) {
|
||||
case PIN_DRIVER_OVERTEMP:
|
||||
return "PIN_DRIVER_OVERTEMP";
|
||||
case PIN_INVALID:
|
||||
return "PIN_INVALID";
|
||||
case PIN_OK:
|
||||
return "PIN_OK";
|
||||
case PIN_OPEN:
|
||||
return "PIN_OPEN";
|
||||
case PIN_OVERLOAD:
|
||||
return "PIN_OVERLOAD";
|
||||
case PIN_SHORT_TO_BAT:
|
||||
return "PIN_SHORT_TO_BAT";
|
||||
case PIN_SHORT_TO_GND:
|
||||
return "PIN_SHORT_TO_GND";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getBrain_pin_e(brain_pin_e value){
|
||||
switch(value) {
|
||||
case DRV8860_PIN_1:
|
||||
|
@ -545,34 +602,51 @@ case GPIO_UNASSIGNED:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getCan_device_mode_e(can_device_mode_e value){
|
||||
const char *getCan_baudrate_e(can_baudrate_e value){
|
||||
switch(value) {
|
||||
case CD_OFF:
|
||||
return "CD_OFF";
|
||||
case CD_USE_CAN1:
|
||||
return "CD_USE_CAN1";
|
||||
case CD_USE_CAN2:
|
||||
return "CD_USE_CAN2";
|
||||
case Internal_ForceMyEnumIntSize_can_device_mode:
|
||||
return "Internal_ForceMyEnumIntSize_can_device_mode";
|
||||
case B100KBPS:
|
||||
return "B100KBPS";
|
||||
case B1MBPS:
|
||||
return "B1MBPS";
|
||||
case B250KBPS:
|
||||
return "B250KBPS";
|
||||
case B500KBPS:
|
||||
return "B500KBPS";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getCan_nbc_e(can_nbc_e value){
|
||||
switch(value) {
|
||||
case CAN_BUS_BMW_E90:
|
||||
return "CAN_BUS_BMW_E90";
|
||||
case CAN_BUS_MAZDA_RX8:
|
||||
return "CAN_BUS_MAZDA_RX8";
|
||||
case CAN_BUS_NBC_BMW:
|
||||
return "CAN_BUS_NBC_BMW";
|
||||
case CAN_BUS_NBC_FIAT:
|
||||
return "CAN_BUS_NBC_FIAT";
|
||||
case CAN_BUS_NBC_NONE:
|
||||
return "CAN_BUS_NBC_NONE";
|
||||
case CAN_BUS_NBC_VAG:
|
||||
return "CAN_BUS_NBC_VAG";
|
||||
case CAN_BUS_W202_C180:
|
||||
return "CAN_BUS_W202_C180";
|
||||
case Internal_ForceMyEnumIntSize_can_nbc:
|
||||
return "Internal_ForceMyEnumIntSize_can_nbc";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getCan_vss_nbc_e(can_vss_nbc_e value){
|
||||
switch(value) {
|
||||
case BMW_e46:
|
||||
return "BMW_e46";
|
||||
case Force_4_bytes_size_can_vss_nbc_e:
|
||||
return "Force_4_bytes_size_can_vss_nbc_e";
|
||||
case W202:
|
||||
return "W202";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getChamber_style_e(chamber_style_e value){
|
||||
switch(value) {
|
||||
case CS_CLOSED:
|
||||
|
@ -599,12 +673,16 @@ case Force_4_bytes_size_cranking_ignition_mode:
|
|||
}
|
||||
const char *getDebug_mode_e(debug_mode_e value){
|
||||
switch(value) {
|
||||
case DBG_16:
|
||||
return "DBG_16";
|
||||
case DBG_2:
|
||||
return "DBG_2";
|
||||
case DBG_36:
|
||||
return "DBG_36";
|
||||
case DBG_37:
|
||||
return "DBG_37";
|
||||
case DBG_34:
|
||||
return "DBG_34";
|
||||
case DBG_43:
|
||||
return "DBG_43";
|
||||
case DBG_44:
|
||||
return "DBG_44";
|
||||
case DBG_ALTERNATOR_PID:
|
||||
return "DBG_ALTERNATOR_PID";
|
||||
case DBG_ANALOG_INPUTS:
|
||||
|
@ -613,16 +691,18 @@ case DBG_ANALOG_INPUTS2:
|
|||
return "DBG_ANALOG_INPUTS2";
|
||||
case DBG_AUX_PID_1:
|
||||
return "DBG_AUX_PID_1";
|
||||
case DBG_AUX_TEMPERATURE:
|
||||
return "DBG_AUX_TEMPERATURE";
|
||||
case DBG_AUX_VALVES:
|
||||
return "DBG_AUX_VALVES";
|
||||
case DBG_BENCH_TEST:
|
||||
return "DBG_BENCH_TEST";
|
||||
case DBG_BOOST:
|
||||
return "DBG_BOOST";
|
||||
case DBG_CAN:
|
||||
return "DBG_CAN";
|
||||
case DBG_CJ125:
|
||||
return "DBG_CJ125";
|
||||
case DBG_COMPOSITE_LOG:
|
||||
return "DBG_COMPOSITE_LOG";
|
||||
case DBG_CRANKING_DETAILS:
|
||||
return "DBG_CRANKING_DETAILS";
|
||||
case DBG_DWELL_METRIC:
|
||||
|
@ -633,14 +713,20 @@ case DBG_ELECTRONIC_THROTTLE_PID:
|
|||
return "DBG_ELECTRONIC_THROTTLE_PID";
|
||||
case DBG_EL_ACCEL:
|
||||
return "DBG_EL_ACCEL";
|
||||
case DBG_ETB_AUTOTUNE:
|
||||
return "DBG_ETB_AUTOTUNE";
|
||||
case DBG_ETB_LOGIC:
|
||||
return "DBG_ETB_LOGIC";
|
||||
case DBG_EXECUTOR:
|
||||
return "DBG_EXECUTOR";
|
||||
case DBG_FSIO_ADC:
|
||||
return "DBG_FSIO_ADC";
|
||||
case DBG_FSIO_EXPRESSION:
|
||||
return "DBG_FSIO_EXPRESSION";
|
||||
case DBG_FSIO_EXPRESSION_1_7:
|
||||
return "DBG_FSIO_EXPRESSION_1_7";
|
||||
case DBG_FSIO_EXPRESSION_8_14:
|
||||
return "DBG_FSIO_EXPRESSION_8_14";
|
||||
case DBG_FSIO_SPECIAL:
|
||||
return "DBG_FSIO_SPECIAL";
|
||||
case DBG_FUEL_PID_CORRECTION:
|
||||
return "DBG_FUEL_PID_CORRECTION";
|
||||
case DBG_IDLE_CONTROL:
|
||||
|
@ -653,6 +739,8 @@ case DBG_ION:
|
|||
return "DBG_ION";
|
||||
case DBG_KNOCK:
|
||||
return "DBG_KNOCK";
|
||||
case DBG_LAUNCH:
|
||||
return "DBG_LAUNCH";
|
||||
case DBG_MAP:
|
||||
return "DBG_MAP";
|
||||
case DBG_METRICS:
|
||||
|
@ -661,6 +749,8 @@ case DBG_SD_CARD:
|
|||
return "DBG_SD_CARD";
|
||||
case DBG_SR5_PROTOCOL:
|
||||
return "DBG_SR5_PROTOCOL";
|
||||
case DBG_START_STOP:
|
||||
return "DBG_START_STOP";
|
||||
case DBG_STATUS:
|
||||
return "DBG_STATUS";
|
||||
case DBG_TLE8888:
|
||||
|
@ -669,8 +759,6 @@ case DBG_TPS_ACCEL:
|
|||
return "DBG_TPS_ACCEL";
|
||||
case DBG_TRIGGER_COUNTERS:
|
||||
return "DBG_TRIGGER_COUNTERS";
|
||||
case DBG_TRIGGER_SYNC:
|
||||
return "DBG_TRIGGER_SYNC";
|
||||
case DBG_VEHICLE_SPEED_SENSOR:
|
||||
return "DBG_VEHICLE_SPEED_SENSOR";
|
||||
case DBG_VVT:
|
||||
|
@ -718,12 +806,10 @@ const char *getEngine_load_mode_e(engine_load_mode_e value){
|
|||
switch(value) {
|
||||
case Force_4_bytes_size_engine_load_mode:
|
||||
return "Force_4_bytes_size_engine_load_mode";
|
||||
case LM_ALPHA_N:
|
||||
return "LM_ALPHA_N";
|
||||
case LM_MAP:
|
||||
return "LM_MAP";
|
||||
case LM_PLAIN_MAF:
|
||||
return "LM_PLAIN_MAF";
|
||||
case LM_ALPHA_N_2:
|
||||
return "LM_ALPHA_N_2";
|
||||
case LM_MOCK:
|
||||
return "LM_MOCK";
|
||||
case LM_REAL_MAF:
|
||||
return "LM_REAL_MAF";
|
||||
case LM_SPEED_DENSITY:
|
||||
|
@ -741,6 +827,12 @@ case BMW_M73_F:
|
|||
return "BMW_M73_F";
|
||||
case BMW_M73_M:
|
||||
return "BMW_M73_M";
|
||||
case BMW_M73_MRE:
|
||||
return "BMW_M73_MRE";
|
||||
case BMW_M73_MRE_SLAVE:
|
||||
return "BMW_M73_MRE_SLAVE";
|
||||
case BMW_M73_PROTEUS:
|
||||
return "BMW_M73_PROTEUS";
|
||||
case CAMARO_4:
|
||||
return "CAMARO_4";
|
||||
case CHEVY_C20_1973:
|
||||
|
@ -753,8 +845,6 @@ case DEFAULT_FRANKENSO:
|
|||
return "DEFAULT_FRANKENSO";
|
||||
case DODGE_NEON_1995:
|
||||
return "DODGE_NEON_1995";
|
||||
case DODGE_NEON_2003_CAM:
|
||||
return "DODGE_NEON_2003_CAM";
|
||||
case DODGE_NEON_2003_CRANK:
|
||||
return "DODGE_NEON_2003_CRANK";
|
||||
case DODGE_RAM:
|
||||
|
@ -819,14 +909,22 @@ case MINIMAL_PINS:
|
|||
return "MINIMAL_PINS";
|
||||
case MITSU_4G93:
|
||||
return "MITSU_4G93";
|
||||
case MRE_BOARD_TEST:
|
||||
return "MRE_BOARD_TEST";
|
||||
case MRE_MIATA_NA6:
|
||||
return "MRE_MIATA_NA6";
|
||||
case MRE_MIATA_NB2:
|
||||
return "MRE_MIATA_NB2";
|
||||
case MRE_MIATA_NB2_MTB:
|
||||
return "MRE_MIATA_NB2_MTB";
|
||||
case MRE_BOARD_NEW_TEST:
|
||||
return "MRE_BOARD_NEW_TEST";
|
||||
case MRE_BOARD_OLD_TEST:
|
||||
return "MRE_BOARD_OLD_TEST";
|
||||
case MRE_BODY_CONTROL:
|
||||
return "MRE_BODY_CONTROL";
|
||||
case MRE_MIATA_NA6_MAP:
|
||||
return "MRE_MIATA_NA6_MAP";
|
||||
case MRE_MIATA_NA6_VAF:
|
||||
return "MRE_MIATA_NA6_VAF";
|
||||
case MRE_MIATA_NB2_ETB:
|
||||
return "MRE_MIATA_NB2_ETB";
|
||||
case MRE_MIATA_NB2_MAF:
|
||||
return "MRE_MIATA_NB2_MAF";
|
||||
case MRE_MIATA_NB2_MAP:
|
||||
return "MRE_MIATA_NB2_MAP";
|
||||
case NISSAN_PRIMERA:
|
||||
return "NISSAN_PRIMERA";
|
||||
case PROMETHEUS_DEFAULTS:
|
||||
|
@ -843,6 +941,8 @@ case SUBARU_2003_WRX:
|
|||
return "SUBARU_2003_WRX";
|
||||
case SUZUKI_VITARA:
|
||||
return "SUZUKI_VITARA";
|
||||
case TEST_33816:
|
||||
return "TEST_33816";
|
||||
case TEST_CIVIC_4_0_BOTH:
|
||||
return "TEST_CIVIC_4_0_BOTH";
|
||||
case TEST_CIVIC_4_0_RISE:
|
||||
|
@ -884,6 +984,34 @@ case GEAR_4:
|
|||
return "GEAR_4";
|
||||
case NEUTRAL:
|
||||
return "NEUTRAL";
|
||||
case REVERSE:
|
||||
return "REVERSE";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getGppwm_channel_e(gppwm_channel_e value){
|
||||
switch(value) {
|
||||
case GPPWM_Clt:
|
||||
return "GPPWM_Clt";
|
||||
case GPPWM_FuelLoad:
|
||||
return "GPPWM_FuelLoad";
|
||||
case GPPWM_Iat:
|
||||
return "GPPWM_Iat";
|
||||
case GPPWM_IgnLoad:
|
||||
return "GPPWM_IgnLoad";
|
||||
case GPPWM_Map:
|
||||
return "GPPWM_Map";
|
||||
case GPPWM_Tps:
|
||||
return "GPPWM_Tps";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getGppwm_compare_mode_e(gppwm_compare_mode_e value){
|
||||
switch(value) {
|
||||
case GPPWM_GreaterThan:
|
||||
return "GPPWM_GreaterThan";
|
||||
case GPPWM_LessThan:
|
||||
return "GPPWM_LessThan";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -917,8 +1045,6 @@ case IM_MANUAL:
|
|||
}
|
||||
const char *getIdle_state_e(idle_state_e value){
|
||||
switch(value) {
|
||||
case ADJUSTING:
|
||||
return "ADJUSTING";
|
||||
case BLIP:
|
||||
return "BLIP";
|
||||
case Force_4bytes_size_idle_state_e:
|
||||
|
@ -929,8 +1055,6 @@ case PID_UPPER:
|
|||
return "PID_UPPER";
|
||||
case PID_VALUE:
|
||||
return "PID_VALUE";
|
||||
case PWM_PRETTY_CLOSE:
|
||||
return "PWM_PRETTY_CLOSE";
|
||||
case RPM_DEAD_ZONE:
|
||||
return "RPM_DEAD_ZONE";
|
||||
case TPS_THRESHOLD:
|
||||
|
@ -968,6 +1092,19 @@ case IM_SINGLE_POINT:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getLaunchActivationMode_e(launchActivationMode_e value){
|
||||
switch(value) {
|
||||
case ALWAYS_ACTIVE_LAUNCH:
|
||||
return "ALWAYS_ACTIVE_LAUNCH";
|
||||
case CLUTCH_INPUT_LAUNCH:
|
||||
return "CLUTCH_INPUT_LAUNCH";
|
||||
case Force_4bytes_size_launchActivationMode_e:
|
||||
return "Force_4bytes_size_launchActivationMode_e";
|
||||
case SWITCH_INPUT_LAUNCH:
|
||||
return "SWITCH_INPUT_LAUNCH";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getLog_format_e(log_format_e value){
|
||||
switch(value) {
|
||||
case Force_4_bytes_size_log_format:
|
||||
|
@ -1015,6 +1152,8 @@ case FOUR_STROKE_CRANK_SENSOR:
|
|||
return "FOUR_STROKE_CRANK_SENSOR";
|
||||
case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR:
|
||||
return "FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR";
|
||||
case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR:
|
||||
return "FOUR_STROKE_THREE_TIMES_CRANK_SENSOR";
|
||||
case Force_4_bytes_size_operation_mode_e:
|
||||
return "Force_4_bytes_size_operation_mode_e";
|
||||
case OM_NONE:
|
||||
|
@ -1130,6 +1269,19 @@ case TM_FIXED:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getTle8888_mode_e(tle8888_mode_e value){
|
||||
switch(value) {
|
||||
case TL_AUTO:
|
||||
return "TL_AUTO";
|
||||
case TL_HALL:
|
||||
return "TL_HALL";
|
||||
case TL_MANUAL:
|
||||
return "TL_MANUAL";
|
||||
case TL_SEMI_AUTO:
|
||||
return "TL_SEMI_AUTO";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getTrigger_event_e(trigger_event_e value){
|
||||
switch(value) {
|
||||
case SHAFT_3RD_FALLING:
|
||||
|
@ -1195,6 +1347,8 @@ case TT_HONDA_CBR_600:
|
|||
return "TT_HONDA_CBR_600";
|
||||
case TT_HONDA_CBR_600_CUSTOM:
|
||||
return "TT_HONDA_CBR_600_CUSTOM";
|
||||
case TT_HONDA_K_12_1:
|
||||
return "TT_HONDA_K_12_1";
|
||||
case TT_JEEP_18_2_2_2:
|
||||
return "TT_JEEP_18_2_2_2";
|
||||
case TT_JEEP_4_CYL:
|
||||
|
@ -1225,20 +1379,32 @@ case TT_ONE:
|
|||
return "TT_ONE";
|
||||
case TT_ONE_PLUS_ONE:
|
||||
return "TT_ONE_PLUS_ONE";
|
||||
case TT_ONE_PLUS_TOOTHED_WHEEL_60_2:
|
||||
return "TT_ONE_PLUS_TOOTHED_WHEEL_60_2";
|
||||
case TT_RENIX_44_2_2:
|
||||
return "TT_RENIX_44_2_2";
|
||||
case TT_RENIX_66_2_2_2:
|
||||
return "TT_RENIX_66_2_2_2";
|
||||
case TT_ROVER_K:
|
||||
return "TT_ROVER_K";
|
||||
case TT_SUBARU_7_6:
|
||||
return "TT_SUBARU_7_6";
|
||||
case TT_SUBARU_SVX:
|
||||
return "TT_SUBARU_SVX";
|
||||
case TT_TOOTHED_WHEEL:
|
||||
return "TT_TOOTHED_WHEEL";
|
||||
case TT_TOOTHED_WHEEL_36_1:
|
||||
return "TT_TOOTHED_WHEEL_36_1";
|
||||
case TT_TOOTHED_WHEEL_36_2:
|
||||
return "TT_TOOTHED_WHEEL_36_2";
|
||||
case TT_TOOTHED_WHEEL_60_2:
|
||||
return "TT_TOOTHED_WHEEL_60_2";
|
||||
case TT_UNUSED:
|
||||
return "TT_UNUSED";
|
||||
case TT_VVT_BOSCH_QUICK_START:
|
||||
return "TT_VVT_BOSCH_QUICK_START";
|
||||
case TT_VVT_JZ:
|
||||
return "TT_VVT_JZ";
|
||||
case TT_VVT_MIATA_NB2:
|
||||
return "TT_VVT_MIATA_NB2";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1279,16 +1445,31 @@ case UART_NONE:
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getVe_override_e(ve_override_e value){
|
||||
switch(value) {
|
||||
case VE_MAP:
|
||||
return "VE_MAP";
|
||||
case VE_None:
|
||||
return "VE_None";
|
||||
case VE_TPS:
|
||||
return "VE_TPS";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
const char *getVvt_mode_e(vvt_mode_e value){
|
||||
switch(value) {
|
||||
case Force_4_bytes_size_vvt_mode:
|
||||
return "Force_4_bytes_size_vvt_mode";
|
||||
case MIATA_NB2:
|
||||
return "MIATA_NB2";
|
||||
case VVT_2GZ:
|
||||
return "VVT_2GZ";
|
||||
case VVT_2JZ:
|
||||
return "VVT_2JZ";
|
||||
case VVT_BOSCH_QUICK_START:
|
||||
return "VVT_BOSCH_QUICK_START";
|
||||
case VVT_FIRST_HALF:
|
||||
return "VVT_FIRST_HALF";
|
||||
case VVT_INACTIVE:
|
||||
return "VVT_INACTIVE";
|
||||
case VVT_SECOND_HALF:
|
||||
return "VVT_SECOND_HALF";
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
// was generated automatically by rusEfi tool from rusefi_hw_enums.h
|
||||
// was generated automatically by rusEfi tool from rusefi_enums.h
|
||||
// by enum2string.jar tool
|
||||
// on Sun May 10 15:34:04 EEST 2020
|
||||
// was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Thu Sep 17 08:26:48 EEST 2020
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
||||
#include "rusefi_enums.h"
|
||||
#include "rusefi_hw_enums.h"
|
||||
#ifndef _A_H_HEADER_
|
||||
#define _A_H_HEADER_
|
||||
#pragma once
|
||||
const char *getPidAutoTune_AutoTunerState(PidAutoTune_AutoTunerState value);
|
||||
const char *getPidAutoTune_Peak(PidAutoTune_Peak value);
|
||||
const char *getAdc_channel_e(adc_channel_e value);
|
||||
const char *getAdc_channel_mode_e(adc_channel_mode_e value);
|
||||
const char *getAfr_override_e(afr_override_e value);
|
||||
const char *getAir_pressure_sensor_type_e(air_pressure_sensor_type_e value);
|
||||
const char *getAntiLagActivationMode_e(antiLagActivationMode_e value);
|
||||
const char *getBoostType_e(boostType_e value);
|
||||
const char *getBrain_pin_diag_e(brain_pin_diag_e value);
|
||||
const char *getBrain_pin_e(brain_pin_e value);
|
||||
const char *getCan_device_mode_e(can_device_mode_e value);
|
||||
const char *getCan_baudrate_e(can_baudrate_e value);
|
||||
const char *getCan_nbc_e(can_nbc_e value);
|
||||
const char *getCan_vss_nbc_e(can_vss_nbc_e value);
|
||||
const char *getChamber_style_e(chamber_style_e value);
|
||||
const char *getCranking_ignition_mode_e(cranking_ignition_mode_e value);
|
||||
const char *getDebug_mode_e(debug_mode_e value);
|
||||
|
@ -27,11 +27,14 @@ const char *getEgo_sensor_e(ego_sensor_e value);
|
|||
const char *getEngine_load_mode_e(engine_load_mode_e value);
|
||||
const char *getEngine_type_e(engine_type_e value);
|
||||
const char *getGear_e(gear_e value);
|
||||
const char *getGppwm_channel_e(gppwm_channel_e value);
|
||||
const char *getGppwm_compare_mode_e(gppwm_compare_mode_e value);
|
||||
const char *getHip_state_e(hip_state_e value);
|
||||
const char *getIdle_mode_e(idle_mode_e value);
|
||||
const char *getIdle_state_e(idle_state_e value);
|
||||
const char *getIgnition_mode_e(ignition_mode_e value);
|
||||
const char *getInjection_mode_e(injection_mode_e value);
|
||||
const char *getLaunchActivationMode_e(launchActivationMode_e value);
|
||||
const char *getLog_format_e(log_format_e value);
|
||||
const char *getMaf_sensor_type_e(maf_sensor_type_e value);
|
||||
const char *getMass_storage_e(mass_storage_e value);
|
||||
|
@ -44,10 +47,11 @@ const char *getSpi_device_e(spi_device_e value);
|
|||
const char *getSpi_speed_e(spi_speed_e value);
|
||||
const char *getTChargeMode_e(tChargeMode_e value);
|
||||
const char *getTiming_mode_e(timing_mode_e value);
|
||||
const char *getTle8888_mode_e(tle8888_mode_e value);
|
||||
const char *getTrigger_event_e(trigger_event_e value);
|
||||
const char *getTrigger_type_e(trigger_type_e value);
|
||||
const char *getTrigger_value_e(trigger_value_e value);
|
||||
const char *getTrigger_wheel_e(trigger_wheel_e value);
|
||||
const char *getUart_device_e(uart_device_e value);
|
||||
const char *getVe_override_e(ve_override_e value);
|
||||
const char *getVvt_mode_e(vvt_mode_e value);
|
||||
#endif /*_A_H_HEADER_ */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
# This script files reads rusefi_config.txt and produces firmware persistent configuration headers
|
||||
# the storage section of rusefi.ini is updated as well
|
||||
#
|
||||
# many of the files generated here require time consuming full compilation thus we have an aggressive caching mechanism
|
||||
# to make sure that we do not regenerate for no reason
|
||||
# the primary input files are rusefi_config.txt and rusefi.input, also mapping.yaml etc
|
||||
# see inside cache.zip for all input files
|
||||
#
|
||||
|
||||
cd ../../../../..
|
||||
|
||||
pwd
|
||||
|
||||
bash gen_signature.sh hellen_cypress
|
||||
|
||||
java \
|
||||
-DSystemOut.name=gen_config_hellen_cypress_board \
|
||||
-cp ../java_tools/ConfigDefinition.jar \
|
||||
com.rusefi.board_generator.BoardReader \
|
||||
-yaml config/boards/hellen/cypress/mapping.yaml \
|
||||
-firmware_path . \
|
||||
-output_file tunerstudio/generated/hellen_cypress_prefix.txt \
|
||||
-enumInputFile controllers/algo/rusefi_enums.h \
|
||||
-enumInputFile config/boards/hellen/cypress/rusefi_hw_enums.h
|
||||
|
||||
[ $? -eq 0 ] || { echo "ERROR generating TunerStudio board config for hellen_cypress"; exit 1; }
|
||||
|
||||
java \
|
||||
-DSystemOut.name=gen_config_hellen_cypress \
|
||||
-Drusefi.generator.lazyfile.enabled=true \
|
||||
-jar ../java_tools/ConfigDefinition.jar \
|
||||
-definition integration/rusefi_config.txt \
|
||||
-cache hellen_cypress \
|
||||
-cache_zip_file tunerstudio/generated/cache.zip \
|
||||
-ts_destination tunerstudio \
|
||||
-tool hellen_cypress_gen_config.bat \
|
||||
-firing_order controllers/algo/firing_order.h \
|
||||
-with_c_defines false \
|
||||
-initialize_to_zero false \
|
||||
-ts_output_name generated/rusefi_hellen_cypress.ini \
|
||||
-c_defines config/boards/hellen/cypress/config/controllers/algo/rusefi_generated.h \
|
||||
-c_destination config/boards/hellen/cypress/config/controllers/algo/engine_configuration_generated_structures.h \
|
||||
-signature tunerstudio/generated/signature_hellen_cypress.txt \
|
||||
-signature_destination controllers/generated/signature_hellen_cypress.h \
|
||||
-enumInputFile controllers/algo/rusefi_enums.h \
|
||||
-prepend config/boards/hellen/cypress/config/rusefi_config_hellen_cypress.txt \
|
||||
-prepend config/boards/hellen/cypress/config/tunerstudio/generated/hellen_cypress_prefix.txt
|
||||
|
||||
[ $? -eq 0 ] || { echo "ERROR generating TunerStudio config for hellen_cypress"; exit 1; }
|
|
@ -0,0 +1,5 @@
|
|||
@echo off
|
||||
|
||||
sh.exe hellen_cypress_gen_enum_to_string.sh
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This batch files reads rusefi_enums.h and produses auto_generated_enums.* files
|
||||
|
||||
cd ../../../../..
|
||||
|
||||
java -DSystemOut.name=gen_enum_to_string_hellen_cypress \
|
||||
-jar ../java_tools/enum2string.jar \
|
||||
-outputPath config/boards/hellen/cypress/config/controllers/algo \
|
||||
-enumInputFile controllers/algo/rusefi_enums.h \
|
||||
-enumInputFile config/boards/hellen/cypress/rusefi_hw_enums.h
|
||||
|
|
@ -4,13 +4,13 @@
|
|||
! all these #defines are in priority over the "default" values in rusefi_config.txt
|
||||
|
||||
! see firmware/config/boards/hellen/cypress/rusefi_hw_enums.h
|
||||
#define brain_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
|
||||
#define brain_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16"
|
||||
|
||||
! Based on Cypress S6E2Cx pinout (144-pin package)
|
||||
#define brain_input_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
|
||||
#define switch_input_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
|
||||
#define output_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
|
||||
#define adc_channel_e_enum "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "P2A (C_10)", "P29 (C_9)", "P28 (C_8)", "P27 (C_7)", "P25 (C_5)", "P24 (C_4)", "P23 (C_3)", "P22 (C_2)", "Disabled", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
|
||||
#define brain_input_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16"
|
||||
#define switch_input_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16"
|
||||
#define output_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16"
|
||||
#define adc_channel_e_enum "Disabled", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "P2A (C_10)", "P29 (C_9)", "P28 (C_8)", "P27 (C_7)", "P25 (C_5)", "P24 (C_4)", "P23 (C_3)", "P22 (C_2)"
|
||||
|
||||
! = (ADC_MAX_CHANNELS_COUNT + 1)
|
||||
#define HW_MAX_ADC_INDEX 33
|
|
@ -304,7 +304,8 @@
|
|||
//#define TS_USB_DEVICE SDU1
|
||||
#undef TS_USB_DEVICE
|
||||
|
||||
#define TS_CAN_DEVICE CAND1
|
||||
// todo: add CAN support
|
||||
//#define TS_CAN_DEVICE CAND1
|
||||
#define TS_CAN_AF PAL_MODE_ALTERNATIVE_CAN
|
||||
#define TS_CAN_DEVICE_SHORT_PACKETS_IN_ONE_FRAME
|
||||
|
||||
|
@ -345,7 +346,7 @@
|
|||
|
||||
#define LED_WARNING_BRAIN_PIN GPIOA_0
|
||||
|
||||
#define LED_ERROR_BRAIN_PIN GPIOJ_15
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOJ_15
|
||||
#define LED_ERROR_BRAIN_PIN_MODE INVERTED_OUTPUT
|
||||
|
||||
#define EFI_WARNING_LED FALSE
|
||||
|
@ -367,16 +368,11 @@
|
|||
|
||||
//#define CONSOLE_THREAD_STACK_SIZE UTILITY_THREAD_STACK_SIZE
|
||||
|
||||
#define BOARD_EXT_GPIOCHIPS 1
|
||||
|
||||
#define BOARD_TLE6240_COUNT 0
|
||||
#define BOARD_MC33972_COUNT 0
|
||||
#define BOARD_TLE8888_COUNT 0
|
||||
#define BOARD_DRV8860_COUNT 1
|
||||
|
||||
// todo: move this outside of efifeatures.h
|
||||
#define BOARD_EXT_PINREPOPINS 24
|
||||
|
||||
#define DRV8860_SS_PORT GPIOH
|
||||
#define DRV8860_SS_PAD 11U
|
||||
#define DRV8860_RESET_PORT NULL
|
||||
|
|
|
@ -251,41 +251,42 @@ typedef enum __attribute__ ((__packed__))
|
|||
} brain_pin_diag_e;
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
EFI_ADC_0 = 0,
|
||||
EFI_ADC_1 = 1,
|
||||
EFI_ADC_2 = 2,
|
||||
EFI_ADC_3 = 3,
|
||||
EFI_ADC_4 = 4,
|
||||
EFI_ADC_5 = 5,
|
||||
EFI_ADC_6 = 6,
|
||||
EFI_ADC_7 = 7,
|
||||
EFI_ADC_8 = 8,
|
||||
EFI_ADC_9 = 9,
|
||||
EFI_ADC_10 = 10,
|
||||
EFI_ADC_11 = 11,
|
||||
EFI_ADC_12 = 12,
|
||||
EFI_ADC_13 = 13,
|
||||
EFI_ADC_14 = 14,
|
||||
EFI_ADC_15 = 15,
|
||||
EFI_ADC_16 = 16,
|
||||
EFI_ADC_17 = 17,
|
||||
EFI_ADC_18 = 18,
|
||||
EFI_ADC_19 = 19,
|
||||
EFI_ADC_20 = 20,
|
||||
EFI_ADC_21 = 21,
|
||||
EFI_ADC_22 = 22,
|
||||
EFI_ADC_23 = 23,
|
||||
EFI_ADC_24 = 24,
|
||||
EFI_ADC_25 = 25,
|
||||
EFI_ADC_26 = 26,
|
||||
EFI_ADC_27 = 27,
|
||||
EFI_ADC_28 = 28,
|
||||
EFI_ADC_29 = 29,
|
||||
EFI_ADC_30 = 30,
|
||||
EFI_ADC_31 = 31,
|
||||
EFI_ADC_NONE = 0,
|
||||
|
||||
EFI_ADC_0 = 1,
|
||||
EFI_ADC_1 = 2,
|
||||
EFI_ADC_2 = 3,
|
||||
EFI_ADC_3 = 4,
|
||||
EFI_ADC_4 = 5,
|
||||
EFI_ADC_5 = 6,
|
||||
EFI_ADC_6 = 7,
|
||||
EFI_ADC_7 = 8,
|
||||
EFI_ADC_8 = 9,
|
||||
EFI_ADC_9 = 10,
|
||||
EFI_ADC_10 = 11,
|
||||
EFI_ADC_11 = 12,
|
||||
EFI_ADC_12 = 13,
|
||||
EFI_ADC_13 = 14,
|
||||
EFI_ADC_14 = 15,
|
||||
EFI_ADC_15 = 16,
|
||||
EFI_ADC_16 = 17,
|
||||
EFI_ADC_17 = 18,
|
||||
EFI_ADC_18 = 19,
|
||||
EFI_ADC_19 = 20,
|
||||
EFI_ADC_20 = 21,
|
||||
EFI_ADC_21 = 22,
|
||||
EFI_ADC_22 = 23,
|
||||
EFI_ADC_23 = 24,
|
||||
EFI_ADC_24 = 25,
|
||||
EFI_ADC_25 = 26,
|
||||
EFI_ADC_26 = 27,
|
||||
EFI_ADC_27 = 28,
|
||||
EFI_ADC_28 = 29,
|
||||
EFI_ADC_29 = 30,
|
||||
EFI_ADC_30 = 31,
|
||||
EFI_ADC_31 = 32,
|
||||
|
||||
// todo: bad choice of value since now we have ADC_CHANNEL_SENSOR and could end up with 17 and 18 also
|
||||
EFI_ADC_NONE = 32,
|
||||
EFI_ADC_ERROR = 33,
|
||||
#if EFI_UNIT_TEST
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ extern SERIAL_USB_DRIVER TS_USB_DEVICE;
|
|||
#endif /* TS_USB_DEVICE */
|
||||
|
||||
#ifdef TS_CAN_DEVICE
|
||||
#include "tunerstudio_can.h"
|
||||
#include "serial_can.h"
|
||||
#endif /* TS_CAN_DEVICE */
|
||||
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#pragma once
|
||||
#include "global.h"
|
||||
|
||||
#if HAL_USE_SERIAL_USB
|
||||
#if EFI_USB_SERIAL
|
||||
#include "usbconsole.h"
|
||||
#endif // HAL_USE_SERIAL_USB
|
||||
#endif // EFI_USB_SERIAL
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
#include "pin_repository.h"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
//
|
||||
// was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt
|
||||
//
|
||||
|
||||
#define SIGNATURE_BOARD hellen_cypress
|
||||
#define SIGNATURE_DATE 2020.09.21
|
||||
#define SIGNATURE_HASH 2762854905
|
||||
#define TS_SIGNATURE "rusEFI 2020.09.21.hellen_cypress.2762854905"
|
|
@ -20,4 +20,8 @@ cd config/boards/kinetis/config
|
|||
bash gen_config.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
|
||||
|
||||
#cd config/boards/hellen/cypress/config
|
||||
#bash gen_config.sh
|
||||
#[ $? -eq 0 ] || { echo "ERROR generating board hellen_cypress hellen_cypress"; exit 1; }
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
/**
|
||||
* @file backup_ram.cpp
|
||||
* @brief NVRAM emulation using Internal Flash (flash_int driver)
|
||||
*
|
||||
* @date May 22, 2020
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "backup_ram.h"
|
||||
#include "flash.h"
|
||||
#include "flash_int.h"
|
||||
|
||||
#define BACKUP_NOT_INITIALIZED 0xFFFF
|
||||
#define BACKUP_SAVED 0x5555
|
||||
|
@ -23,7 +24,7 @@ static void backupInit(void) {
|
|||
static_assert(backupSize <= BACKUP_FLASH_SIZE, "Backup flash overflow");
|
||||
|
||||
// first, load the whole buffer into the memory
|
||||
flashRead((flashaddr_t)BACKUP_FLASH_ADDR, (char *)backupRam, backupSize);
|
||||
intFlashRead((flashaddr_t)BACKUP_FLASH_ADDR, (char *)backupRam, backupSize);
|
||||
// check if we have a reliable properly saved data
|
||||
if (backupRam[backupStateOffset] != BACKUP_SAVED) {
|
||||
// zero is the default value
|
||||
|
@ -33,7 +34,7 @@ static void backupInit(void) {
|
|||
// we cannot trust the saved data anymore, until it's saved in backupRamFlush()
|
||||
// so we mark is as 'pending'
|
||||
backupRam[backupStateOffset] = BACKUP_PENDING;
|
||||
flashWrite(BACKUP_FLASH_ADDR + backupStateOffset, (char *)backupRam, sizeof(backupRam[backupStateOffset]));
|
||||
intFlashWrite(BACKUP_FLASH_ADDR + backupStateOffset, (char *)backupRam, sizeof(backupRam[backupStateOffset]));
|
||||
|
||||
wasLoaded = true;
|
||||
}
|
||||
|
@ -64,11 +65,11 @@ void backupRamFlush(void) {
|
|||
syssts_t sts = chSysGetStatusAndLockX();
|
||||
|
||||
// rewrite the whole sector
|
||||
flashErase((flashaddr_t)BACKUP_FLASH_ADDR, BACKUP_FLASH_SIZE);
|
||||
intFlashErase((flashaddr_t)BACKUP_FLASH_ADDR, BACKUP_FLASH_SIZE);
|
||||
// mark the data as valid & saved
|
||||
backupRam[backupStateOffset] = BACKUP_SAVED;
|
||||
// save the data to the flash
|
||||
flashWrite((flashaddr_t)BACKUP_FLASH_ADDR, (char *)backupRam, backupSize);
|
||||
intFlashWrite((flashaddr_t)BACKUP_FLASH_ADDR, (char *)backupRam, backupSize);
|
||||
|
||||
// Leaving the critical zone
|
||||
chSysRestoreStatusX(sts);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#if EFI_INTERNAL_FLASH
|
||||
|
||||
#include "flash.h"
|
||||
#include "flash_int.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ static __attribute__((optimize("O0"))) int flashSectorEraseAtAddress(volatile u
|
|||
return MFlash_SectorErase((uint16_t*)sectorStart) != Ok ? FLASH_RETURN_BAD_FLASH : FLASH_RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
int __attribute__((optimize("O0"))) flashErase(flashaddr_t address, size_t size) {
|
||||
int __attribute__((optimize("O0"))) intFlashErase(flashaddr_t address, size_t size) {
|
||||
// todo: this is a temporary hack
|
||||
// todo: why the code below doesn't work with -O2?!
|
||||
if (flashSectorEraseAtAddress(address) != FLASH_RETURN_SUCCESS) {
|
||||
|
@ -80,13 +80,13 @@ int __attribute__((optimize("O0"))) flashErase(flashaddr_t address, size_t size
|
|||
return FLASH_RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
int flashWrite(flashaddr_t address, const char* buffer, size_t size) {
|
||||
int intFlashWrite(flashaddr_t address, const char* buffer, size_t size) {
|
||||
uint32_t sizeInWords = alignToWord(size) >> 1;
|
||||
return MFlash_WriteData16Bit((uint16_t*)address, (uint16_t*)buffer, sizeInWords) == Ok ? FLASH_RETURN_SUCCESS : FLASH_RETURN_BAD_FLASH;
|
||||
//return MFlash_WriteData16Bit_Fm0Type3CrSecureArea((uint16_t*)address, (uint16_t*)buffer, sizeInWords) == Ok ? 0 : -1;
|
||||
}
|
||||
|
||||
bool flashIsErased(flashaddr_t address, size_t size) {
|
||||
bool intFlashIsErased(flashaddr_t address, size_t size) {
|
||||
/* Check for default set bits in the flash memory
|
||||
* For efficiency, compare flashdata_t values as much as possible,
|
||||
* then, fallback to byte per byte comparison. */
|
||||
|
@ -106,7 +106,7 @@ bool flashIsErased(flashaddr_t address, size_t size) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool flashCompare(flashaddr_t address, const char* buffer, size_t size) {
|
||||
bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) {
|
||||
/* For efficiency, compare flashdata_t values as much as possible,
|
||||
* then, fallback to byte per byte comparison. */
|
||||
while (size >= sizeof(flashdata_t)) {
|
||||
|
@ -127,7 +127,7 @@ bool flashCompare(flashaddr_t address, const char* buffer, size_t size) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int flashRead(flashaddr_t address, char* buffer, size_t size) {
|
||||
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
|
||||
memcpy(buffer, (char*) address, size);
|
||||
return FLASH_RETURN_SUCCESS;
|
||||
}
|
|
@ -5,7 +5,7 @@ endif
|
|||
HW_LAYER_EGT = $(PROJECT_DIR)/hw_layer/ports/cypress/serial_over_usb/usbconfig.c \
|
||||
$(PROJECT_DIR)/hw_layer/ports/cypress/serial_over_usb/usbconsole.c
|
||||
|
||||
HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/cypress/flash.c
|
||||
HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/cypress/flash_int.c
|
||||
|
||||
HW_LAYER_EMS_CPP += $(PROJECT_DIR)/hw_layer/ports/cypress/mpu_util.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/ports/cypress/cypress_pins.cpp \
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#if EFI_PROD_CODE
|
||||
|
||||
#include "mpu_util.h"
|
||||
#include "flash.h"
|
||||
#include "flash_int.h"
|
||||
#include "engine.h"
|
||||
#include "pin_repository.h"
|
||||
#include "os_util.h"
|
||||
|
@ -249,5 +249,13 @@ size_t flashSectorSize(flashsector_t sector) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uintptr_t getFlashAddrFirstCopy() {
|
||||
return FLASH_ADDR;
|
||||
}
|
||||
|
||||
uintptr_t getFlashAddrSecondCopy() {
|
||||
return FLASH_ADDR_SECOND_COPY;
|
||||
}
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
/**
|
||||
* @file mpu_util.h
|
||||
*
|
||||
* @date Jul 27, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||
* @author andreika <prometheus.pcb@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef MPU_UTIL_H_
|
||||
#define MPU_UTIL_H_
|
||||
|
||||
// we are lucky - all CAN pins use the same AF
|
||||
#define EFI_CAN_RX_AF 9
|
||||
#define EFI_CAN_TX_AF 9
|
||||
|
||||
// burnout or 'Burn Out'
|
||||
typedef enum {
|
||||
BOR_Level_None = 0,
|
||||
BOR_Level_1 = 1,
|
||||
BOR_Level_2 = 2,
|
||||
BOR_Level_3 = 3
|
||||
} BOR_Level_t;
|
||||
|
||||
typedef enum {
|
||||
BOR_Result_Ok = 0x00,
|
||||
BOR_Result_Error
|
||||
} BOR_Result_t;
|
||||
|
||||
BOR_Level_t BOR_Get(void);
|
||||
BOR_Result_t BOR_Set(BOR_Level_t BORValue);
|
||||
|
||||
#ifndef ADC_TwoSamplingDelay_5Cycles
|
||||
#define ADC_TwoSamplingDelay_5Cycles ((uint32_t)0x00000000)
|
||||
#endif
|
||||
|
||||
#ifndef ADC_TwoSamplingDelay_20Cycles
|
||||
#define ADC_TwoSamplingDelay_20Cycles ((uint32_t)0x00000F00)
|
||||
#endif
|
||||
|
||||
#ifndef ADC_CR2_SWSTART
|
||||
#define ADC_CR2_SWSTART ((uint32_t)0x40000000)
|
||||
#endif
|
||||
|
||||
#define SPI_CR1_8BIT_MODE 0
|
||||
#define SPI_CR2_8BIT_MODE 0
|
||||
|
||||
#define SPI_CR1_16BIT_MODE SPI_CR1_DFF
|
||||
#define SPI_CR2_16BIT_MODE 0
|
||||
|
||||
// TODO
|
||||
#define SPI_CR1_24BIT_MODE 0
|
||||
#define SPI_CR2_24BIT_MODE 0
|
||||
|
||||
void baseMCUInit(void);
|
||||
void turnOnSpi(spi_device_e device);
|
||||
void jump_to_bootloader();
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
// these need to be declared C style for the linker magic to work
|
||||
|
||||
void DebugMonitorVector(void);
|
||||
void UsageFaultVector(void);
|
||||
void BusFaultVector(void);
|
||||
void HardFaultVector(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if HAL_USE_SPI
|
||||
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
||||
brain_pin_e mosi,
|
||||
int sckMode,
|
||||
int mosiMode,
|
||||
int misoMode);
|
||||
/**
|
||||
* @see getSpiDevice
|
||||
*/
|
||||
void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin);
|
||||
#endif /* HAL_USE_SPI */
|
||||
|
||||
bool isValidCanTxPin(brain_pin_e pin);
|
||||
bool isValidCanRxPin(brain_pin_e pin);
|
||||
#if HAL_USE_CAN
|
||||
CANDriver * detectCanDevice(brain_pin_e pinRx, brain_pin_e pinTx);
|
||||
#endif /* HAL_USE_CAN */
|
||||
|
||||
#endif /* MPU_UTIL_H_ */
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* @file port_mpu_util.h
|
||||
*
|
||||
* @date Jul 27, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||
* @author andreika <prometheus.pcb@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef enum {
|
||||
BOR_Level_None = 0,
|
||||
BOR_Level_1 = 1,
|
||||
BOR_Level_2 = 2,
|
||||
BOR_Level_3 = 3
|
||||
} BOR_Level_t;
|
||||
|
||||
// we are lucky - all CAN pins use the same AF
|
||||
#define EFI_CAN_RX_AF 9
|
||||
#define EFI_CAN_TX_AF 9
|
||||
|
||||
#ifndef ADC_TwoSamplingDelay_5Cycles
|
||||
#define ADC_TwoSamplingDelay_5Cycles ((uint32_t)0x00000000)
|
||||
#endif
|
||||
|
||||
#ifndef ADC_TwoSamplingDelay_20Cycles
|
||||
#define ADC_TwoSamplingDelay_20Cycles ((uint32_t)0x00000F00)
|
||||
#endif
|
||||
|
||||
#ifndef ADC_CR2_SWSTART
|
||||
#define ADC_CR2_SWSTART ((uint32_t)0x40000000)
|
||||
#endif
|
||||
|
||||
#define SPI_CR1_8BIT_MODE 0
|
||||
#define SPI_CR2_8BIT_MODE 0
|
||||
|
||||
#define SPI_CR1_16BIT_MODE SPI_CR1_DFF
|
||||
#define SPI_CR2_16BIT_MODE 0
|
||||
|
||||
// TODO
|
||||
#define SPI_CR1_24BIT_MODE 0
|
||||
#define SPI_CR2_24BIT_MODE 0
|
|
@ -166,9 +166,9 @@ const uint8_t au8ReportDescriptor2[1]; // Not used
|
|||
|
||||
const stc_usbdevice_stringdescriptor_t pstcStringDescriptors[] =
|
||||
{
|
||||
{"Spansion International Inc.",NULL}, //Manufacturer String
|
||||
{"rusEFI ECU Comm Port",NULL}, //Product String
|
||||
{"1.0",NULL}, //Serial Number String
|
||||
{(uint8_t*)"Spansion International Inc.",NULL}, //Manufacturer String
|
||||
{(uint8_t*)"rusEFI ECU Comm Port",NULL}, //Product String
|
||||
{(uint8_t*)"1.0",NULL}, //Serial Number String
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,13 @@
|
|||
#include "drivers/gpio/tle6240.h"
|
||||
#include "drivers/gpio/mc33972.h"
|
||||
#include "drivers/gpio/tle8888.h"
|
||||
#define BOARD_EXT_PINREPOPINS (BOARD_TLE6240_COUNT * TLE6240_OUTPUTS + BOARD_MC33972_COUNT * MC33972_INPUTS + BOARD_TLE8888_COUNT * TLE8888_OUTPUTS)
|
||||
#include "drivers/gpio/drv8860.h"
|
||||
|
||||
#define BOARD_EXT_PINREPOPINS (\
|
||||
BOARD_TLE6240_COUNT * TLE6240_OUTPUTS + \
|
||||
BOARD_MC33972_COUNT * MC33972_INPUTS + \
|
||||
BOARD_TLE8888_COUNT * TLE8888_OUTPUTS + \
|
||||
BOARD_DRV8860_COUNT * DRV8860_OUTPUTS)
|
||||
|
||||
#else /* EFI_PROD_CODE */
|
||||
#define BOARD_EXT_PINREPOPINS 0
|
||||
|
|
|
@ -388,15 +388,15 @@ void triggerAdcCallback(adcsample_t value) {
|
|||
}
|
||||
else {
|
||||
//!!!!!!!!!!
|
||||
toggleLed(2, 0);
|
||||
//toggleLed(2, 0);
|
||||
|
||||
return; // both are positive/negative/zero: not interested!
|
||||
}
|
||||
|
||||
//!!!!!!!!!!
|
||||
toggleLed(2, -1);
|
||||
//toggleLed(2, -1);
|
||||
//!!!!!!!!!!
|
||||
toggleLed(3, 0);
|
||||
//toggleLed(3, 0);
|
||||
|
||||
if (isSignalWeak) {
|
||||
if (minDeltaThresholdCntPos >= DELTA_THRESHOLD_CNT_LOW && minDeltaThresholdCntNeg >= DELTA_THRESHOLD_CNT_LOW) {
|
||||
|
|
Loading…
Reference in New Issue