auto-sync

This commit is contained in:
rusEfi 2016-07-15 23:01:38 -04:00
parent 08cb967b87
commit 77de014ae3
2 changed files with 8 additions and 2 deletions

View File

@ -143,11 +143,11 @@ ADC_TwoSamplingDelay_5Cycles, // cr1
AdcDevice fastAdc(&adcgrpcfg_fast);
static void pwmpcb_slow(PWMDriver *pwmp) {
void doSlowAdc(void) {
efiAssertVoid(getRemainingStack(chThdSelf())> 32, "lwStAdcSlow");
#if EFI_INTERNAL_ADC
(void) pwmp;
/* Starts an asynchronous ADC conversion operation, the conversion
will be executed in parallel to the current PWM cycle and will
@ -170,6 +170,11 @@ static void pwmpcb_slow(PWMDriver *pwmp) {
#endif
}
static void pwmpcb_slow(PWMDriver *pwmp) {
(void) pwmp;
doSlowAdc();
}
static void pwmpcb_fast(PWMDriver *pwmp) {
efiAssertVoid(getRemainingStack(chThdSelf())> 32, "lwStAdcFast");
#if EFI_INTERNAL_ADC

View File

@ -20,6 +20,7 @@ void initAdcInputs(bool boardTestMode);
void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n);
ioportid_t getAdcChannelPort(adc_channel_e hwChannel);
adc_channel_e getAdcChannel(brain_pin_e pin);
void doSlowAdc(void);
int getAdcHardwareIndexByInternalIndex(int index);