summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-04-16 11:15:42 -0700
committerScott Shawcroft <scott@tannewt.org>2019-04-16 11:15:42 -0700
commit55782901d09167e591d45699cd5db48c5619e1e9 (patch)
treed40ecae503ca5f1bfa74bb54f7ed63dabe4023fc /ports
parent190bdf811716e35df086d317f01f97a10746790d (diff)
Actually call gamepadshift_tick
Diffstat (limited to 'ports')
-rw-r--r--ports/atmel-samd/tick.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ports/atmel-samd/tick.c b/ports/atmel-samd/tick.c
index 149347793..dde473375 100644
--- a/ports/atmel-samd/tick.c
+++ b/ports/atmel-samd/tick.c
@@ -29,10 +29,16 @@
#include "peripheral_clk_config.h"
#include "supervisor/shared/autoreload.h"
-#include "shared-module/gamepad/__init__.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/microcontroller/Processor.h"
+#if CIRCUITPY_GAMEPAD
+#include "shared-module/gamepad/__init__.h"
+#endif
+
+#if CIRCUITPY_GAMEPADSHIFT
+#include "shared-module/gamepadshift/__init__.h"
+#endif
// Global millisecond tick count
volatile uint64_t ticks_ms = 0;
@@ -51,7 +57,12 @@ void SysTick_Handler(void) {
#endif
#ifdef CIRCUITPY_GAMEPAD_TICKS
if (!(ticks_ms & CIRCUITPY_GAMEPAD_TICKS)) {
+ #if CIRCUITPY_GAMEPAD
gamepad_tick();
+ #endif
+ #if CIRCUITPY_GAMEPADSHIFT
+ gamepadshift_tick();
+ #endif
}
#endif
}