From 3a45a8eae6882e2efb1b27ea1132037c84cb2fbb Mon Sep 17 00:00:00 2001 From: Lee Atkinson Date: Mon, 15 Aug 2022 07:52:34 -0400 Subject: [PATCH] Adding ifdef in __init__.c --- shared-bindings/analogio/__init__.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shared-bindings/analogio/__init__.c b/shared-bindings/analogio/__init__.c index 0033b2a66d..c4cca3c51d 100644 --- a/shared-bindings/analogio/__init__.c +++ b/shared-bindings/analogio/__init__.c @@ -32,9 +32,12 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/analogio/__init__.h" #include "shared-bindings/analogio/AnalogIn.h" -#include "shared-bindings/analogio/AnalogFastIn.h" #include "shared-bindings/analogio/AnalogOut.h" +#ifdef CIRCUITPY_ANALOGFASTIN +#include "shared-bindings/analogio/AnalogFastIn.h" +#endif + //| """Analog hardware support //| //| The `analogio` module contains classes to provide access to analog IO @@ -71,8 +74,10 @@ STATIC const mp_rom_map_elem_t analogio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_analogio) }, { MP_ROM_QSTR(MP_QSTR_AnalogIn), MP_ROM_PTR(&analogio_analogin_type) }, - { MP_ROM_QSTR(MP_QSTR_AnalogFastIn), MP_ROM_PTR(&analogio_analogfastin_type) }, { MP_ROM_QSTR(MP_QSTR_AnalogOut), MP_ROM_PTR(&analogio_analogout_type) }, + #ifdef CIRCUITPY_ANALOGFASTIN + { MP_ROM_QSTR(MP_QSTR_AnalogFastIn), MP_ROM_PTR(&analogio_analogfastin_type) }, + #endif }; STATIC MP_DEFINE_CONST_DICT(analogio_module_globals, analogio_module_globals_table);