summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/eic_handler.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
index 017510be8..97e854a11 100644
--- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
@@ -13,6 +13,7 @@ LONGINT_IMPL = NONE
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_MATH = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
+CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
diff --git a/ports/atmel-samd/eic_handler.c b/ports/atmel-samd/eic_handler.c
index e53d51e9e..db5f260e5 100644
--- a/ports/atmel-samd/eic_handler.c
+++ b/ports/atmel-samd/eic_handler.c
@@ -40,13 +40,17 @@ void set_eic_handler(uint8_t channel, uint8_t eic_handler) {
void shared_eic_handler(uint8_t channel) {
uint8_t handler = eic_channel_handler[channel];
switch (handler) {
+#if CIRCUITPY_PULSEIO
case EIC_HANDLER_PULSEIN:
pulsein_interrupt_handler(channel);
break;
+#endif
+#if CIRCUITPY_ROTARYIO
case EIC_HANDLER_INCREMENTAL_ENCODER:
incrementalencoder_interrupt_handler(channel);
break;
+#endif
default:
break;