94 if ((
channel < EFI_ADC_NONE) || (
channel >= EFI_ADC_TOTAL_CHANNELS)) {
95 efiPrintf(
"Invalid ADC channel %d",
channel);
100 efiPrintf(
"adc %d input %.3fV",
channel, voltsInput);
108 int adcValue = adcGetRawValue(
"print", hwChannel);
112 efiPrintf(
" %s ch[%2d] @ %s%d ADC%d 12bit=%4d %.3fV input %.3fV",
114 hwChannel - EFI_ADC_0 + 1,
115 adcValue, volts, voltsInput);
123 for (
int internalIndex = 0; internalIndex <
fastAdc.
size(); internalIndex++) {
132 for (
int internalIndex = 0; internalIndex < ADC_MAX_CHANNELS_COUNT; internalIndex++) {
227 chThdSleepMilliseconds(1);
232 efiPrintf(
"initAdcInputs()");
249 efiPrintf(
"ADC disabled");
253 chThdSleepMilliseconds(1);
typedef __attribute__
Ignition Mode.
adc_channel_e getAdcChannelByInternalIndex(int index) const
int enableChannel(adc_channel_e hwChannel)
adcsample_t getAvgAdcValue(adc_channel_e hwChannel)
static void UpdateSubscribers(efitick_t nowNt)
TunerStudioOutputChannels outputChannels
void addConsoleActionI(const char *token, VoidInt callback)
Register a console command with one Integer parameter.
void setAdcChannelOverrides()
bool readSlowAnalogInputs(adcsample_t *convertedSamples)
float getMcuTemperature()
int getAdcChannelPin(adc_channel_e hwChannel)
ioportid_t getAdcChannelPort(const char *msg, adc_channel_e hwChannel)
const char * portname(ioportid_t GPIOx)
static EngineAccessor engine
static constexpr engine_configuration_s * engineConfiguration
bool warning(ObdCode code, const char *fmt,...)
uint16_t adcsample_t
ADC sample data type.
GPIO_TypeDef * ioportid_t
Port Identifier.
static union @47 NO_CACHE
@ CUSTOM_OBD_ANALOG_INPUT_NOT_CONFIGURED
void protectedGpio_check(efitick_t nowNt)
air_pressure_sensor_config_s sensor
float analogInputDividerCoefficient
adc_channel_e auxFastSensor1_adcChannel
uint8_t slowAdcErrorCount
uint16_t fastAdcConversionCount