Adding ifdef in __init__.c

This commit is contained in:
Lee Atkinson 2022-08-15 07:52:34 -04:00
parent c53c1c0927
commit 3a45a8eae6
1 changed files with 7 additions and 2 deletions

View File

@ -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);