* Move HIP states enum out of rusefi_enums.h

-this is internal driver stuff. No need to have it defined globaly.

* Auto-generated configs and docs
This commit is contained in:
Andrey G 2021-05-08 17:08:18 +03:00 committed by GitHub
parent afcc8848c5
commit 15811a6ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 31 additions and 106 deletions

View File

@ -1,7 +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 Tue May 04 14:13:02 UTC 2021
// 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 Sat May 08 16:52:30 MSK 2021
// see also gen_config_and_enums.bat
@ -1070,23 +1070,6 @@ case GPPWM_LessThan:
}
return NULL;
}
const char *getHip_state_e(hip_state_e value){
switch(value) {
case IS_INTEGRATING:
return "IS_INTEGRATING";
case IS_SENDING_SPI_COMMAND:
return "IS_SENDING_SPI_COMMAND";
case NOT_READY:
return "NOT_READY";
case READY_TO_INTEGRATE:
return "READY_TO_INTEGRATE";
case WAITING_FOR_ADC_TO_SKIP:
return "WAITING_FOR_ADC_TO_SKIP";
case WAITING_FOR_RESULT_ADC:
return "WAITING_FOR_RESULT_ADC";
}
return NULL;
}
const char *getIdle_mode_e(idle_mode_e value){
switch(value) {
case Force_4_bytes_size_idle_mode:

View File

@ -1,4 +1,4 @@
// 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 Fri Apr 30 05:39:10 UTC 2021
// 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 Sat May 08 16:52:30 MSK 2021
// see also gen_config_and_enums.bat
@ -30,7 +30,6 @@ const char *getEtb_function_e(etb_function_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);

View File

@ -1,7 +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 Tue May 04 14:13:02 UTC 2021
// 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 Sat May 08 16:52:29 MSK 2021
// see also gen_config_and_enums.bat
@ -866,23 +866,6 @@ case GPPWM_LessThan:
}
return NULL;
}
const char *getHip_state_e(hip_state_e value){
switch(value) {
case IS_INTEGRATING:
return "IS_INTEGRATING";
case IS_SENDING_SPI_COMMAND:
return "IS_SENDING_SPI_COMMAND";
case NOT_READY:
return "NOT_READY";
case READY_TO_INTEGRATE:
return "READY_TO_INTEGRATE";
case WAITING_FOR_ADC_TO_SKIP:
return "WAITING_FOR_ADC_TO_SKIP";
case WAITING_FOR_RESULT_ADC:
return "WAITING_FOR_RESULT_ADC";
}
return NULL;
}
const char *getIdle_mode_e(idle_mode_e value){
switch(value) {
case Force_4_bytes_size_idle_mode:

View File

@ -1,4 +1,4 @@
// 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 Fri Apr 30 05:39:10 UTC 2021
// 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 Sat May 08 16:52:29 MSK 2021
// see also gen_config_and_enums.bat
@ -30,7 +30,6 @@ const char *getEtb_function_e(etb_function_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);

View File

@ -1,7 +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 Tue May 04 14:13:03 UTC 2021
// 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 Sat May 08 16:45:49 MSK 2021
// see also gen_config_and_enums.bat
@ -1066,23 +1066,6 @@ case GPPWM_LessThan:
}
return NULL;
}
const char *getHip_state_e(hip_state_e value){
switch(value) {
case IS_INTEGRATING:
return "IS_INTEGRATING";
case IS_SENDING_SPI_COMMAND:
return "IS_SENDING_SPI_COMMAND";
case NOT_READY:
return "NOT_READY";
case READY_TO_INTEGRATE:
return "READY_TO_INTEGRATE";
case WAITING_FOR_ADC_TO_SKIP:
return "WAITING_FOR_ADC_TO_SKIP";
case WAITING_FOR_RESULT_ADC:
return "WAITING_FOR_RESULT_ADC";
}
return NULL;
}
const char *getIdle_mode_e(idle_mode_e value){
switch(value) {
case Force_4_bytes_size_idle_mode:

View File

@ -1,4 +1,4 @@
// 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 Fri Apr 30 05:39:11 UTC 2021
// 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 Sat May 08 16:45:49 MSK 2021
// see also gen_config_and_enums.bat
@ -30,7 +30,6 @@ const char *getEtb_function_e(etb_function_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);

View File

@ -1,7 +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 Tue May 04 14:13:01 UTC 2021
// 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 Sat May 08 16:52:29 MSK 2021
// see also gen_config_and_enums.bat
@ -1042,23 +1042,6 @@ case GPPWM_LessThan:
}
return NULL;
}
const char *getHip_state_e(hip_state_e value){
switch(value) {
case IS_INTEGRATING:
return "IS_INTEGRATING";
case IS_SENDING_SPI_COMMAND:
return "IS_SENDING_SPI_COMMAND";
case NOT_READY:
return "NOT_READY";
case READY_TO_INTEGRATE:
return "READY_TO_INTEGRATE";
case WAITING_FOR_ADC_TO_SKIP:
return "WAITING_FOR_ADC_TO_SKIP";
case WAITING_FOR_RESULT_ADC:
return "WAITING_FOR_RESULT_ADC";
}
return NULL;
}
const char *getIdle_mode_e(idle_mode_e value){
switch(value) {
case Force_4_bytes_size_idle_mode:

View File

@ -1,4 +1,4 @@
// 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 Fri Apr 30 05:39:09 UTC 2021
// 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 Sat May 08 16:52:29 MSK 2021
// see also gen_config_and_enums.bat
@ -30,7 +30,6 @@ const char *getEtb_function_e(etb_function_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);

View File

@ -931,31 +931,6 @@ typedef enum {
Internal_ForceMyEnumIntSize_can_nbc = ENUM_32_BITS,
} can_nbc_e;
typedef enum {
NOT_READY,
/**
* the step after this one is always IS_INTEGRATING
* We only integrate if we have RPM
*/
READY_TO_INTEGRATE,
/**
* the step after this one is always WAITING_FOR_ADC_TO_SKIP
*/
IS_INTEGRATING,
/**
* the step after this one is always WAITING_FOR_RESULT_ADC
*/
WAITING_FOR_ADC_TO_SKIP,
/**
* the step after this one is always IS_SENDING_SPI_COMMAND or READY_TO_INTEGRATE
*/
WAITING_FOR_RESULT_ADC,
/**
* the step after this one is always READY_TO_INTEGRATE
*/
IS_SENDING_SPI_COMMAND,
} hip_state_e;
typedef enum {
TCHARGE_MODE_RPM_TPS = 0,
TCHARGE_MODE_AIR_INTERP = 1,

View File

@ -540,6 +540,15 @@ void initHip9011() {
/* Debug functions. */
/*==========================================================================*/
static const char *hip_state_names[] =
{
"Not ready/calculating",
"Ready for integration",
"Integrating",
"Waiting for first ADC sample",
"Waiting for second ADC sample"
};
static void showHipInfo(void) {
if (!CONFIG(isHip9011Enabled)) {
efiPrintf("hip9011 driver not active");
@ -548,7 +557,7 @@ static void showHipInfo(void) {
efiPrintf("HIP9011: enabled %s state %s",
boolToString(CONFIG(isHip9011Enabled)),
getHip_state_e(instance.state));
hip_state_names[instance.state]);
efiPrintf(" Advanced mode: enabled %d used %d",
CONFIG(useTpicAdvancedMode),

View File

@ -20,6 +20,19 @@
#define GAIN_LOOKUP_SIZE 64
#define BAND_LOOKUP_SIZE 64
typedef enum {
/* initial state and state used during value read and calculations */
NOT_READY,
/* chip is configuread and ready for next integration */
READY_TO_INTEGRATE,
/* integration is in progress */
IS_INTEGRATING,
/* in default mode driver is waiting for first ADC callback */
WAITING_FOR_ADC_TO_SKIP,
/* in default mode driver is waiting for second ADC callback, saves it and switched to NOT_READY state */
WAITING_FOR_RESULT_ADC
} hip_state_e;
/**
* this interface defines hardware communication layer for HIP9011 chip
*/