diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 5c5f05ca3a..5fc6b1fa16 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -390,9 +390,6 @@ SRC_COMMON_HAL_ALL = \ alarm/time/TimeAlarm.c \ alarm/touch/TouchAlarm.c \ analogio/AnalogIn.c \ -#ifdef CIRCUITPYTHON_ANALOGFASTIN - analogio/AnalogFastIn.c \ -#endif analogio/AnalogOut.c \ analogio/__init__.c \ audiobusio/I2SOut.c \ @@ -482,6 +479,13 @@ SRC_C += \ endif +ifeq ($(CIRCUITPYTHON_ANALOGFASTIN),1) +# Needed for AnalogFastIn +SRC_COMMON_HAL_ALL += \ + analogio/AnalogFastIn.c \ + +endif + SRC_COMMON_HAL = $(filter $(SRC_PATTERNS), $(SRC_COMMON_HAL_ALL))