diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-08-22 01:29:34 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-08-22 01:29:34 -0400 |
| commit | acc6df49590bf9982a616a703393aba7ff5e07ba (patch) | |
| tree | 56ce1a85fa9a9598fe484805960a55dea7b5b4e2 /ports | |
| parent | d94023e9b310731807785ffc6f4249faf4912554 (diff) | |
| parent | 524fa8209282cd727c01c32ccd85ee14f12623af (diff) | |
merge similar fix in
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c | 2 | ||||
| -rw-r--r-- | ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h | 3 | ||||
| -rw-r--r-- | ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk | 3 | ||||
| -rw-r--r-- | ports/nrf/mpconfigport.h | 5 | ||||
| -rw-r--r-- | ports/nrf/mpconfigport.mk | 5 | ||||
| -rw-r--r-- | ports/nrf/peripherals/nrf/clocks.c | 1 |
6 files changed, 10 insertions, 9 deletions
diff --git a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c index e3bcf395b..0922718f9 100644 --- a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c @@ -35,7 +35,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t* self, const mcu_pin_obj_t* pin_a, const mcu_pin_obj_t* pin_b) { - if (!pin_a->has_extint || !pin_a->has_extint) { + if (!pin_a->has_extint || !pin_b->has_extint) { mp_raise_RuntimeError(translate("Both pins must support hardware interrupts")); } diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h index f618a652c..c422dbd55 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h @@ -36,6 +36,9 @@ #define MICROPY_HW_LED_STATUS (&pin_P1_14) +// Unusually, board does not have a 32 kHz xtal. Nearly all boards do. +#define BOARD_HAS_32KHZ_XTAL (0) + #if QSPI_FLASH_FILESYSTEM #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 21) #define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 23) diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk index 44c385c5b..dbb32629c 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk @@ -10,9 +10,6 @@ MCU_CHIP = nrf52840 SD ?= s140 SOFTDEV_VERSION ?= 6.1.0 -# Unusually, board does not have a 32 kHz xtal. -BOARD_HAS_32KHZ_XTAL = 0 - BOOT_SETTING_ADDR = 0xFF000 ifeq ($(SD),) diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 5ed521e85..3f939b492 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -38,6 +38,11 @@ #define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_UJSON (1) +#ifndef BOARD_HAS_32KHZ_XTAL +// Assume crystal is present, which is the most common case. +#define BOARD_HAS_32KHZ_XTAL (0) +#endif + // TODO this is old BLE stuff #if BLUETOOTH_SD #define MICROPY_PY_BLEIO (1) diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index 11058cd7e..55920b3f4 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -28,11 +28,6 @@ CIRCUITPY_RTC = 1 # frequencyio not yet implemented CIRCUITPY_FREQUENCYIO = 0 -ifndef BOARD_HAS_32KHZ_XTAL -# Assume crystal is present, which is the most common case. -BOARD_HAS_32KHZ_XTAL = 1 -endif - # CircuitPython doesn't yet support NFC so force the NFC antenna pins to be GPIO. # See https://github.com/adafruit/circuitpython/issues/1300 # Defined here because system_nrf52840.c doesn't #include any of our own include files. diff --git a/ports/nrf/peripherals/nrf/clocks.c b/ports/nrf/peripherals/nrf/clocks.c index b8f231385..67c748488 100644 --- a/ports/nrf/peripherals/nrf/clocks.c +++ b/ports/nrf/peripherals/nrf/clocks.c @@ -26,6 +26,7 @@ */ #include "nrfx.h" +#include "mpconfigboard.h" void nrf_peripherals_clocks_init(void) { |
