From 086d79fbad0e0f9934090c5cb6b8e0ec052feb77 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Wed, 17 May 2017 19:50:39 +0200 Subject: [PATCH] nrf5/drivers/ticker: Add compile config guard in ticker.c to only include the driver if SOFT_PWM is configured in by board. --- nrf5/drivers/ticker.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nrf5/drivers/ticker.c b/nrf5/drivers/ticker.c index efaca823c7..10bb506b67 100644 --- a/nrf5/drivers/ticker.c +++ b/nrf5/drivers/ticker.c @@ -26,6 +26,8 @@ #include "py/mphal.h" +#if MICROPY_PY_MACHINE_SOFT_PWM + #include "ticker.h" #define FastTicker NRF_TIMER0 @@ -169,3 +171,5 @@ int set_low_priority_callback(callback_ptr callback, int id) { NVIC_SetPendingIRQ(LowPriority_IRQn); return 0; } + +#endif // MICROPY_PY_MACHINE_SOFT_PWM